TypeError: cannot solve differential equation

asked 2019-03-09 03:19:34 -0600

updated 2019-03-09 12:05:36 -0600

calc314 gravatar image

I am trying to use sagemath to solve a system of ordinary differential equation. However, I failed and got an TypeError (This returns the following error: TypeError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation may help). Here is my code for it. Could anyone help me with this? Thank you.

A=Matrix([[5/3, -4/3], [4/3, -5/3]])
B=Matrix([[2],[1]])
C=Matrix([-1,2])
D=Matrix([0])
t = var('t')
X=symb_mat(2,1,'X',t);
diffeqns = [eql == eqr \
            for (eql,eqr) in zip(*[diff(X,t).list(),(A*X+B*u).list()])]
desolve_system(diffeqns,X.list(),ics=[0,1,2],ivar=t)
edit retag flag offensive close merge delete

Comments

Would you mind typing your code in a way that makes it readable ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-03-09 05:48:24 -0600 )edit

Also, what is your symb_mat function ? I'm running H. sapiens sapiens L. v 1.0, without divinatory processor nor telepathic interface...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-03-09 05:56:00 -0600 )edit
1

Thnks, calc314 : now one can read the code. But that still doesn't tell us what sumb_mat is supposed to do...

I also see something called u used in the penultimate line, without a clue about what it could be.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-03-09 14:08:25 -0600 )edit