# system of ODE through NDSolve

I am quite puzzled to solve the coupled ode's numerically. Please tell me why it runs for a long time and not giving any output in mathematica. I am using NDsolve. please have a look

NDSolve[{ x'[t] == x[t]/y[t] + x[t]/z[t] - x[t]/z[t]^2,
y'[t] == 1 + y[t]/z[t] - (2 y[t])/z[t]^2,
z'[t] == -z[t] - z[t]/y[t] - (2 z[t])/y[t]^2,
x == 2,
y == 5,
z == 7},
{x, y, z},
{t, -10, 10},
MaxSteps -> Infinity]

• Just a suggestion : you can simplify the system with the change of variable x[t]->Exp[p[t]], z[t]->Exp[q[t]]. Also, the first equation is actually decoupled so you only need to solve the remaining two. – b.gates.you.know.what Jun 2 '13 at 19:01

It seems there is a singularity in t=-4.64095 and t=2.2479405927739124. You can try:

sol = NDSolve[{Derivative[x][t] ==
x[t]/y[t] + x[t]/z[t] - x[t]/z[t]^2,
Derivative[y][t] == y[t]/z[t] - (2*y[t])/z[t]^2 + 1,
Derivative[z][t] == -(z[t]/y[t]) - (2*z[t])/y[t]^2 - z[t],
x == 2, y == 5, z == 7}, {x, y, z}, {t, -4.62, 2.23},
MaxSteps -> 1000000]

Plot[Evaluate[{x[t], y[t], z[t]} /. sol], {t, -4.62, 2.23},
Frame -> True, Axes -> None] • @Soodeh Z. your solution is very interesting. But how you find the singularity in the time point? – Enter Dec 7 '15 at 1:33
• @Enter NDSolve finds them for you: try NDSolve[sys, {x, y, z}, {t, -10, 10}, MaxSteps -> 10000] – Michael E2 Oct 15 '19 at 15:02