# NDSolve returns “stiffness” error

I have the following differential system:

s = NDSolve[{x1'[t] == -x2[t] - x3[t], x2'[t] == x1[t],
x3'[t] ==
0.75*w1[t] + 0.5*w1[t]^4 + 5.5*w2[t] - 1.5*w2[t]^2 -
2.*w2[t]^3 + 0.5*w2[t]^4 +
w1[t]^2*(-3.5 - 2.*w2[t] + 1.*w2[t]^2) - 2.*x1[t] + 3.*x2[t] -
0.5*x2[t]^2 + 2.*x3[t], w1'[t] == 0.5 w2[t],
w2'[t] == -0.5 w1[t], w1[0] == 0.1, w2[0] == 0.1, x1[0] == 0.4,
x2[0] == - 0.4, x3[0] == -0.7} /. {b -> 0.5, a -> 0.5}, {x1, x2,
x3, w1, w2}, {t, 0, 800}, Method -> {"Shooting"},
InterpolationOrder -> All, MaxSteps -> \[Infinity]];


Mathematica returns a "stiffness" problem. How can I turn around this?

EDIT. The error message is:

NDSolve::ndsz: At t == 3.4583389520816175, step size is effectively zero; singularity or stiff system suspected.

• x1,x2,x3 reach a singularity at t==3.458, so obviously NDSolve[] can't progress from there. – Feyre Nov 8 '16 at 15:11
• Are there any recommendations in these cases? @Feyre – Mirko Aveta Nov 8 '16 at 15:12
• Please include the error message in your question. – Michael E2 Nov 8 '16 at 15:15
• There's just no way to interpret the system beyond that point, the values all become infinite. There may be something wrong with your DE. – Feyre Nov 8 '16 at 15:15
• Wait, you don't have a BVP, so the shooting method is an inappropriate choice. (I noticed only Method -> {"Shooting"}.) Feyre, is right, your solution reaches an asymptote at t == 3.458`. That means the solution can be defined only up to that point. Usually that is the answer and one is satisfied with that. In this answer I was able to projectivize the ODE and extend the solution past a singularity. You might be able to do it your case, but it's not clear whether that would be appropriate. – Michael E2 Nov 8 '16 at 17:20