PanAkry
PanAkry

Reputation: 183

Solution of non-linear differential equation

I don't use Mathematica in general and I need it to compare with an other program. I want to solve a system of three differential and non linear equations. For this I use Dsolve. Everything goes wrong when I put the nonlinear term (exponential).

Here is my code:

equa = {x'[t] == z[t] - Exp[y[t]], 
y'[t] == z[t] - y[t], 
z'[t] == x[t] + y[t] - z[t], 
x[0] == 0, 
y[0] == 0, 
z[0] == 0};
slt = DSolve[equa, {x, y, z}, t]
Plot[{x[t] /. slt}, {t, 0, 10}]

And the errors are like this :

DSolve::dsvar: 0.1 cannot be used as a variable.

ReplaceAll::reps:{Dsolve[<<1>>]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing

Does someone know why the exponential term makes troubles ?

Thanks

Upvotes: 0

Views: 3629

Answers (1)

Dr. belisarius
Dr. belisarius

Reputation: 61046

You may try

s = NDSolve[equa, {x, y, z}, {t, 0, 10}];
Plot[Evaluate[({x[t], y[t], z[t]} /. s)], {t, 0, 1}]

enter image description here

Upvotes: 2

Related Questions