【问题标题】:Numerical solution of ODE with fixed condition at the final time with Python用 Python 求解最后时刻固定条件 ODE 的数值解
【发布时间】:2019-03-02 17:14:45
【问题描述】:

我正在尝试求解形式的 ODE

x'=f(x), x(T)=x_{T}

在 python 中使用 scipy.integrate.odeint。

但是,它具有以下形式: scipy.integrate.odeint(func, y0, t,...),其中 y0 是初始条件的向量。我没有初始向量,相反,我有一个最后一次 T 的向量。我应该如何修改 scipy.integrate.odeint 例程?

提前致谢

【问题讨论】:

    标签: python scipy numerical-methods ode


    【解决方案1】:

    odeint 可以“向后”集成。将已知值 x(T) 作为“初始”条件,然后将 t 值从 T 递减到您希望解决方案停止的任何位置。

    有关示例,请参阅 this answer

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-24
      • 1970-01-01
      • 2019-06-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多