Feature request: Solving linear systems of first order DE's

themadmathematician shared this idea 10 years ago
Under Consideration

It would be nice if the new GIAC engine allowed the solution of linear systems of first-order differential equations, like


dA/dt = aA - bB

dB/dt = cB + dA


The command would be something like SolveODESystem[ <List of eqns>, <List of independent vars>, <dependent var>, ... ]


and would give a list of functions as output.


Very useful for modelling work...

Comments (4)

photo
1

There is no command in giac/xcas for that but you can do it via Laplace transform. Let M be the matrix of the system

    M:=[[-1,1],[2,4];

    [U,V]:=(p-M)^(-1)*[u,v];

    A:=invlaplace(U,p,x); B:=invlaplace(V,p,x);

Check:

simplify([diff(A,x),diff(B,x)]-M*[A,B]);

subst(A,x,0); subst(B,x,0)

If you have a second member, add the Laplace transform to [u.v]

photo
1

Your example is slightly over my head, furthermore I suspect there are errors in it.


Matrices are handled in the following way in GeoGebra, using curly braces rather than square brackets.504daede8015654a59dae5fe12cbfb8c

However there seems to be no such command as InvLaplace in GeoGebra. If there is one in Giac then it perhaps it is not implemented yet?


I was hoping to find solutions to the Lotka-Volterra equations without doing a numerical solution using the spreadsheet which is rather tehnical for the students. Involving inverse laplace transforms will be even more technical I'm afraid.

photo
1

Sorry, I should have precised that the commands were giac commands, not geogebra ones. Might be useful for a future geogebra interface to solve linear differential systems with constant coefficients, like the linearization of a Volterra system near an equilibrum (for non linear or non constant coefficients, there are in general no symbolic solution, but numerical approximations are also available in giac for non-stiff problems).

photo
1

Update: GeoGebra now supports inverse Laplace transform https://www.geogebra.org/ma...


https://www.geogebra.org/ma...

© 2023 International GeoGebra Institute