I am stacked with a partial differential equation as follows: This is the $\LaTeX$ expression for the equation
$$\frac{\partial y}{\partial t}=\frac{\partial^2 y(x,t)}{\partial x^2} -\left(a-\frac{1}{\cosh ^2(x)}\right) y(x,t)-y^3(x,t)$$
The Mathematica code is here. This is the equation with with $a=0.2$ to be specific:
eq = D[y[x, t], t] ==
D[y[x, t], {x, 2}] - 0.2 *y[x, t] + Cosh[x]^-2*y[x, t] - y[x, t]^3;
and here are the boundary and initial conditions:
bc1 = y[-10, t] == 0;
bc2 = y[10, t] == 0;
ic = y[x, 0] == 0.001*(Exp[-x^2] - Exp[-10^2]);
Here I solve and plot it:
s = NDSolve[{eq, bc1, bc2, ic}, y[x, t], {x, -10, 10}, {t, 0, 20},
PrecisionGoal -> 2];
Plot[Evaluate[y[x, t] /. s /. t -> 20], {x, -10, 10},
AxesLabel -> {Style["x", 16, Italic], Style["y(t=20)", 16, Italic]}]
The result looks like this:
and qualitatively it is what I expect.
It should be explained here that this equation has a fixed point. Depending upon the parameter $a$ it may be either $y=0$, or a solution like the one shown in the image above. I am only interested in the system behavior in the fixed point. Intermediate steps are of no interest. For this reason I plot the result at $t=20$, expecting that the solution is already close enough to the fixed point.
Let us check the conversion of the obtained solution. The simplest way to do that is to look at the evolution of $y(0,t)$. Here it is:
The conclusion is that what we see is, so far, non-converging. I checked up to $t=200$ with the output of the same type showing non-convergence. It seems to be so for any time duration.
However, I solved the same equation with COMSOL, and there it nicely converges after only a small number of time steps (five or so). For technical reasons I would, nevertheless, prefer it solved with Mathematica, rather than with whatever else.
My question: do you see any workaround?