# 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[0] == 2,
y[0] == 5,
z[0] == 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.gatessucks 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[1][x][t] ==
x[t]/y[t] + x[t]/z[t] - x[t]/z[t]^2,
Derivative[1][y][t] == y[t]/z[t] - (2*y[t])/z[t]^2 + 1,
Derivative[1][z][t] == -(z[t]/y[t]) - (2*z[t])/y[t]^2 - z[t],
x[0] == 2, y[0] == 5, z[0] == 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]


-
thank you very much –  ricci1729 Jun 1 '13 at 9:38