Python 最后时刻条件固定的 ODE 的数值解
Numerical solution of ODE with fixed condition at the final time with Python
我正在尝试求解形式为
的 ODE
x'=f(x), x(T)=x_{T}
在 python 中使用 scipy.integrate.odeint。
但是,它具有以下形式:
scipy.integrate.odeint(func, y0, t,...),其中 y0 是初始条件的向量。我没有初始向量,相反,我有一个最终时间 T 的向量。我应该如何修改 scipy.integrate.odeint 例程?
提前致谢
odeint
可以整合"backwards"。给出已知值 x(T)
作为 "initial" 条件,然后从 T
到你希望解决方案停止的任何地方按降序给出 t
值。
有关示例,请参阅 this answer。
我正在尝试求解形式为
的 ODEx'=f(x), x(T)=x_{T}
在 python 中使用 scipy.integrate.odeint。
但是,它具有以下形式: scipy.integrate.odeint(func, y0, t,...),其中 y0 是初始条件的向量。我没有初始向量,相反,我有一个最终时间 T 的向量。我应该如何修改 scipy.integrate.odeint 例程?
提前致谢
odeint
可以整合"backwards"。给出已知值 x(T)
作为 "initial" 条件,然后从 T
到你希望解决方案停止的任何地方按降序给出 t
值。
有关示例,请参阅 this answer。