1
$\begingroup$
η = 0.125; 
rg1s = Derivative[1][u1][t] - u1[t]*u3[t] - 3*u1[t]*u4[t] + u2[t]*u3[t] + 3*u2[t]*u4[t] + 2*(1 + 2*η)*u1[t]^2 == 0; 
rg2s = Derivative[1][u2][t] - u2[t]*u3[t] - 3*u2[t]*u4[t] + u1[t]*u3[t] + 3*u1[t]*u4[t] + 2*(1 + 2*η)*u2[t]^2 == 0; 
rg3t = Derivative[1][u3][t] - 0.5*((u1[t] - u2[t])^2 + u3[t]^2 - 3*u4[t]^2 + 6*u3[t]*u4[t]) == 0; 
rg4t = Derivative[1][u4][t] - 0.5*((u1[t] - u2[t])^2 + u3[t]^2 + 5*u4[t]^2 - 2*u3[t]*u4[t]) == 0; 
sol = NDSolve[{rg1s, rg2s, rg3t, rg4t, u1[0] == -0.6*0.2, u2[0] == -0.6*0.2, u3[0] == 0.6*0.2, u4[0] == 0.2}, {u1, u2, u3, u4}, {t, 1, 10}]

I am trying to solve four coupled nonlinear differential equations. But, everytime I am getting

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

I have tried all the possible ways to solve such kind of problem with similar kind of problems available in stack. I want to get the value of g1,g2,g3 and g4 for large value of t i.e. 1 to 100 but I am getting only for small value of t? Could you please suggest me some way to sort out the issue?

Thank you

$\endgroup$
  • 2
    $\begingroup$ You can format inline code and code blocks by selecting the code and clicking the {} button above the edit window. The edit window help button ? is useful for learning how to format your questions and answers. You may also find this meta Q&A helpful $\endgroup$ – Michael E2 Nov 15 at 4:27
  • 2
    $\begingroup$ Have you looked at the solution it computed? You probably have a singularity (perhaps a vertical asymptote). It is a feature of your IVP, not an error. $\endgroup$ – Michael E2 Nov 15 at 4:29
  • $\begingroup$ The plot doesn't have vertical asymptote but u1 and u2 being symmetric has the same solution. $\endgroup$ – Suman Nov 15 at 4:43
  • $\begingroup$ u3 and u4 appear to have vertical asymptotes when I run your code. $\endgroup$ – Michael E2 Nov 15 at 4:50
  • 1
    $\begingroup$ Your are right ,Plot[Evaluate[{u1[t], u2[t], u3[t], u4[t]} /. sol], {t, 1, 2}] gives vertical asymptote. $\endgroup$ – Suman Nov 15 at 5:06

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.