how to solve a system of diff eq ?
05-01-2016, 09:14 AM
Post: #1
 hpfx Junior Member Posts: 28 Joined: Jan 2015
how to solve a system of diff eq ?
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 ?
05-01-2016, 10:30 AM
Post: #2
 roadrunner Senior Member Posts: 446 Joined: Jun 2015
RE: how to solve a system of diff eq ?
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
05-01-2016, 11:39 AM
Post: #3
 parisse Senior Member Posts: 1,316 Joined: Dec 2013
RE: how to solve a system of diff eq ?
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)
 « Next Oldest | Next Newest »

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