Home:ALL Converter>Solving a system of coupled differential equations with dsolve_system in python (sympy)

Solving a system of coupled differential equations with dsolve_system in python (sympy)

Ask Time:2020-12-21T21:37:53         Author:Isabel Waibel

Json Formatter

I want to solve a system of 4 coupled differential equations with python (sympy):

eqs = [Eq(cP1(t).diff(t), k1*cE1(t)**3), Eq(cE1(t).diff(t), -k1 * cE1(t)**3 + k6 * cE3(t)**2), Eq(cE2(t).diff(t), -k8 * cE2(t)), Eq(cE3(t).diff(t), k8 * cE2(t) - k6 * cE3(t)**2)]

When I try to solve the system with "dsolve_system":

solution = dsolve_system(eqs, ics={cP1(0): 0, cE1(0): cE1_0, cE2(0):cE2_0, cE3(0):cE3_0})

I get the answer: "NotImplementedError:
The system of ODEs passed cannot be solved by dsolve_system."

Does anyone know, whats the problem? Or is there a better way of solving this system of Differential equations in Sympy?
Thanks a lot!

Author:Isabel Waibel,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/65393787/solving-a-system-of-coupled-differential-equations-with-dsolve-system-in-python
yy