Solve System of differential equations

01032019, 09:09 AM
Post: #1




Solve System of differential equations
How can I solve a system of differential equations in the HP Prime? Something like this:
x1'=x1+2*x2
x2'=3*x1+2*x2 I've tried to use desolve, but it seems it only works for one differential equation. Thanks! 

01032019, 12:44 PM
Post: #2




RE: Solve System of differential equations
desolve(y'=[[1,2],[3,2]]*y,t,y)


01032019, 07:39 PM
Post: #3




RE: Solve System of differential equations
But it seems that HP Prime it's doing something wrong if I do that. For example:
desolve(y'=[[1,0],[0,2]]*y,t,y) gives the same solution as desolve(y'=[[1,0],[0,2]]*y + [[3],[4]] ,t,y) I think it is because the calculator is interpreting [[1,0],[0,2]]*y as [[y,0],[0,2y]] (it doesn't take into account that y is a vector) How could I solve this? Am I doing something wrong? Thanks! 

01052019, 08:47 PM
Post: #4




RE: Solve System of differential equations
Correct syntax for second member is
s:=desolve(y'=[[1,0],[0,2]]*y + [3,4] ,t,y) The reason is that y is a line vector, not a column vector. Indeed desolve returns a list of generic solutions, even for linear ODE, because you might get several generic solutions for non linear ODE. That mean that the solution y is s[0], i.e. a line vector. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)