有什么方法可以解决python中的耦合微分方程组? [英] Any way to solve a system of coupled differential equations in python?

查看:29
本文介绍了有什么方法可以解决python中的耦合微分方程组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 sympy 和 scipy,但无法找到或弄清楚如何求解耦合微分方程组(非线性、一阶).

I've been working with sympy and scipy, but can't find or figure out how to solve a system of coupled differential equations (non-linear, first-order).

那么有没有办法解决耦合微分方程?

So is there any way to solve coupled differential equations?

方程的形式为:

V11'(s) = -12*v12(s)**2
v22'(s) = 12*v12(s)**2
v12'(s) = 6*v11(s)*v12(s) - 6*v12(s)*v22(s) - 36*v12(s)

具有 v11(s)、v22(s)、v12(s) 的初始条件.

with initial conditions for v11(s), v22(s), v12(s).

推荐答案

关于使用 scipy 的 ODE 数值解,请参见 scipy.integrate.solve_ivp, scipy.integrate.odeintscipy.integrate.ode.

For the numerical solution of ODEs with scipy, see scipy.integrate.solve_ivp, scipy.integrate.odeint or scipy.integrate.ode.

SciPy Cookbook 中给出了一些示例(向下滚动到普通微分方程").

Some examples are given in the SciPy Cookbook (scroll down to the section on "Ordinary Differential Equations").

这篇关于有什么方法可以解决python中的耦合微分方程组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆