I am trying to solve the non-linear differential equation: $$ \ddot{x}(t) =\frac{3kx(t)}{\gamma^2}\left[kx^4(t)-2 \right] $$
numerically on Mathematica, but I can not find a solution.
My code is:
k = 1;
\[Gamma] = 1;
NDSolve[{-6k x[t] + 3k^2 x[t]^5 - \[Gamma]^2 (x^\[Prime]\[Prime])[t] == 0, x[0] == 1, x'[0] == 1}, x, {t, 0, 5}]
and running it, I receive the following error:
NDSolve::ndsz: At t == 0.853147811022917', step size is effectively zero; singularity or stiff system suspected
The equation goes to zero for $x(t) =0 $ and $x(t)= (2/k)^{1/4}$, so I suppose the error may be due to that.
I tried the methods "ExplicitRungeKutta"
and "StiffnessSwitching"
but they did not help. Moreover, a change in the boundary conditions gave a scalar solution, which is not desired.
Can anyone help me to solve this? I also want to understand why the problem occurs at $t= 0.853147811022917$.