HP Forums
how to solve a system of diff eq ? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: how to solve a system of diff eq ? (/thread-6183.html)



how to solve a system of diff eq ? - hpfx - 05-01-2016 09:14 AM

Hello,
I try to solve this small system of differential equation :

x'(t)+y(t)=t^2
x'(t)+y'(t)=6

with initial conds : x(0)=0 and y(0)=1

I tried with desolve on 10077,
something like that desolve({x'+y=t^2, x'+y'=6} and x(0)=0 and y(0)=1, {x,y})
but I didn't get any result.

does someone knows how to do ?


RE: how to solve a system of diff eq ? - roadrunner - 05-01-2016 10:30 AM

Three points:

1. I solved the second equation for x', plug it into the first equation, and solved for x and y separately;
2. I think you have to tell desolve that t is the time variable or it assumes x;
3. I have never had luck typing y'. Typing diff(y) seems to work better.

Here's the code:

desolve(((6-(y')+y) = (t^2)) AND ((y(0)) = 1),t,y)
returns y:
t^2+5*e^t+2*t-4

diff(t^2+5*e^t+2*t-4,t)
returns y':
5*e^t+2*t+2

desolve(((x'+5*e^t+2*t+2) = 6) AND ((x(0)) = 0),t,x)
returns x:
-t^2-5*e^t+4*t+5


RE: how to solve a system of diff eq ? - parisse - 05-01-2016 11:39 AM

desolve solves differential equations, not systems, except for linear systems with constant coefficient for the homogeneous part, then the syntax is
desolve(y'=A*y+b) where A is the matrix and b a vector (second member)