I am trying to solve a system of coupled differential equations
xmax = 15;ϵ = 0.1;
s = NDSolve[{z''[x] == (1 - ϵ/2)*Sin[z[x]] - ϵ/2*Sin[y[x]],
y''[x] == (1 - ϵ/2)*Sin[y[x]] - ϵ/2*Sin[z[x]],
y[-xmax] == 0, y[xmax] == 2*π, z[-xmax] == 0,z[xmax] == 0}, {y, z}, {x, -xmax, xmax},
MaxSteps -> 10^8, AccuracyGoal -> Automatic, PrecisionGoal -> 50,
WorkingPrecision -> MachinePrecision];
Plot[0.5*(y[x] + z[x]) /. s, {x, -xmax, xmax}, PlotRange -> All] //Print;
If I run this for small value of xmax like xmax = 5, it works just fine and gives the solution as expected. But for higher values of xmax, it runs into tolerance problems and doesn't give the solution as expected. What is the reason for this error?
I see now that for small $\epsilon$, I can uncouple the equation and solve the following equation but it still runs into the same tolerance problem:
xmax = 5; ϵ = 0;
s = NDSolve[{y''[x] == y[x] - 0.5*Sin[4*ArcTan[Exp[-x]]],y[-xmax] == 0, y[xmax] == 0}, y,
{x, -xmax, xmax},MaxSteps -> 10^8, AccuracyGoal -> 8, PrecisionGoal -> 30,
WorkingPrecision -> MachinePrecision];
Plot[y[x] /. s, {x, -xmax, xmax}, PlotRange -> All] // Print;
How can I correct this?








xmax? – xzczd Jan 26 '17 at 10:11