Home:ALL Converter>how to solve first-order linear differential equations analytically and numerically with sympy?

how to solve first-order linear differential equations analytically and numerically with sympy?

Ask Time:2015-03-08T00:41:36         Author:lgd

Json Formatter

How can simple linear differential equations like this one be solved in sympy?

y' + p(t)y = q(t)

I'm looking to solve it in two ways: symbolically (analytically) if possible, if sympy can derive the integrating factor, etc., and also a way to do it numerically so that the two can be compared. how can this be done in sympy? is sympy.mpmath.odefun the right place to look?

Author:lgd,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/28917249/how-to-solve-first-order-linear-differential-equations-analytically-and-numerica
yy