0
$\begingroup$

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.
$\endgroup$
  • $\begingroup$ x1,x2,x3 reach a singularity at t==3.458, so obviously NDSolve[] can't progress from there. $\endgroup$ – Feyre Nov 8 '16 at 15:11
  • $\begingroup$ Are there any recommendations in these cases? @Feyre $\endgroup$ – Mirko Aveta Nov 8 '16 at 15:12
  • $\begingroup$ Please include the error message in your question. $\endgroup$ – Michael E2 Nov 8 '16 at 15:15
  • 1
    $\begingroup$ 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. $\endgroup$ – Feyre Nov 8 '16 at 15:15
  • 1
    $\begingroup$ 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. $\endgroup$ – Michael E2 Nov 8 '16 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.