# How can I solve this systems of differential equation and show a plot?

$$\frac{\mathrm du}{\mathrm dt} = 1 - u \mathrm e^{\epsilon(8q-1)}$$ $$\frac{\mathrm dq}{\mathrm dt} = u \mathrm e^{\epsilon (q-1)} - q$$

$$0 \leq \epsilon \leq 0.1$$

$$u(0) = 0$$ and $$q(0)=0$$

I try whit this but I can't

https://reference.wolfram.com/language/tutorial/DSolveSystemsOfNonlinearODEs.html

system = {u'[t] + u[t] E^(\[Epsilon] (q - 1)) == 1, u[0] == 0,
q'[t] - u[t] E^(\[Epsilon] (q - 1)) + q[t] == 0, q[0] == 0};

sol = DSolve[system, {u, q}, t]


• Can you provide some of the code you've tried to solve this with so far? – user6014 Oct 22 '18 at 22:28
• Sure system = {u'[t] + u[t] E^([Epsilon] (q - 1)) == 1, u[0] == 0, q'[t] - u[t] E^([Epsilon] (q - 1)) + q[t] == 0, q[0] == 0}; sol = DSolve[system, {u, q}, t] – Conan Oct 22 '18 at 22:36
• Use q[t] instead of q in your equations – Carl Woll Oct 22 '18 at 22:36
• look at the images, it did not work. – Conan Oct 22 '18 at 22:55
• Clear[q], and use q[0] == 0 instead of q[0] = 0. – AccidentalFourierTransform Oct 22 '18 at 23:17

## 1 Answer

Try this:

Clear[Evaluate[Context[] <> "*"]];
Clear[sol, u, q];
Manipulate[
sol = NDSolve[{
u'[t] + u[t]*Exp[\[Epsilon] (q[t] - 1)] == 1,
q'[t] - u[t]*Exp[\[Epsilon] (q[t] - 1)] + q[t] == 0,
q[0] == 0,
u[0] == 0
},
{u, q},
{t, 0, 60}];
Plot[{u[t],q[t]} /.sol, {t, 0, 60}],
{{\[Epsilon], 0}, 0, 1}
]


EDIT 1

Can you try this? It takes a long time to solve it in my computer. Note that in Mathematica e is represented by Exp[].

DSolve[{
u'[t] + u[t]*Exp[\[Epsilon] (q[t] - 1)] == 1,
q'[t] - u[t]*Exp[\[Epsilon] (q[t] - 1)] + q[t] == 0,
q[0] == 0,
u[0] == 0
},
{u, q}, t]

• thanks soo much, i try whir Ruge Kutta Method $$E7 = NDSolve[{u'[t] + u[t] E^(\[Epsilon] (q[t] - 1)) - 1 == 0, u[0] == 0, q'[t] - u[t] E^(\[Epsilon] (q[t] - 1)) + q[t] == 0, q[0] == 0}, {u, q}, {t, 0, 6}, Method -> {"ExplicitRungeKutta", "DifferenceOrder" -> 4}];$$ – Conan Oct 25 '18 at 22:49