It is well known that the non-linear equation $f'' + 2f(1-f^2) = 0$ admits a soliton solution $f = \tanh(x)$.
Is it possible to solve this equation numerically? For example on a finite interval $[-L,L]$, with boundary conditions $f(-L) = -1$, and $f(L) = 1$? (I guess this might not be possible since solitons-antisoliton pair can be inserted. So may be more conditions are needed.)
Are there any numerical stable iterative algorithm, so that the initial guess like $f_0(x) = x/L$ would converges to the solution $\tanh(x)$?