Home:ALL Converter>Solving Systems of Linear Homogeneous Ordinary Differential Equations in Sympy

Solving Systems of Linear Homogeneous Ordinary Differential Equations in Sympy

Ask Time:2022-11-12T16:00:46         Author:Daylight

Json Formatter

I am trying to solve an ODE of the form: (d/dt) x = A * x

given the square matrix A and the vector x at t=0 in sympy. The system I am studying has more than 50 equations.

As I defined it above, I believe these equations are linear, homogeneous, and first-order. When I looked in the sympy documentation, I found something similar ("system_of_odes_linear_neq_order1_type1"). I defined the system and am trying to solve with a command like so:

sympy.dsolve(system,hint='system_of_odes_linear_neq_order1_type1') The script has been running for a while without terminating so I'm getting a bit worried. On second look, I saw the system being called "nonhomogeneous" in the documentation:

https://www.cfm.brown.edu/people/dobrush/am33/SymPy/part2.html#sympy.solvers.ode._linear_neq_order1_type1

Why is it called "nonhomogeneous" here? Is type of solver I used incorrect and should I redefine the system/solver? I don't see many other options for systems of differential equations where there are more than 3 equations.

Author:Daylight,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/74411273/solving-systems-of-linear-homogeneous-ordinary-differential-equations-in-sympy
yy