For the boundary condition one gets an error:
DSolve[{D[u[x], {x, 2}] + (1 - u[x]^2) u[x] == 0, u[-Infinity] == -1, u[Infinity] == 1}, u, x]
Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>
DSolve::bvlim: For some branches of the general solution, unable to compute the limit at the given points. Some of the solutions may be lost. >>
Solve::incnst: Inconsistent or redundant transcendental equation. After reduction, the bad equation is 1-2 C[1] == 0. >>
the equation has a solution:
In[21]:= DSolve[D[u[x], {x, 2}] + (1 - u[x]^2) u[x] == 0, u, x]
During evaluation of In[21]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>
Out[21]= {{u ->
Function[{x},
I Sqrt[-(1/(1 - Sqrt[1 - 2 C[1]]))]
JacobiSN[Sqrt[
x^2 + x^2 Sqrt[1 - 2 C[1]] + 2 x C[2] +
2 x Sqrt[1 - 2 C[1]] C[2] + C[2]^2 + Sqrt[1 - 2 C[1]] C[2]^2]/
Sqrt[2], (1 - Sqrt[1 - 2 C[1]])/(1 + Sqrt[1 - 2 C[1]])] -
I Sqrt[-(1/(1 - Sqrt[1 - 2 C[1]]))] Sqrt[1 - 2 C[1]]
JacobiSN[Sqrt[
x^2 + x^2 Sqrt[1 - 2 C[1]] + 2 x C[2] +
2 x Sqrt[1 - 2 C[1]] C[2] + C[2]^2 + Sqrt[1 - 2 C[1]] C[2]^2]/
Sqrt[2], (1 - Sqrt[1 - 2 C[1]])/(
1 + Sqrt[1 - 2 C[1]])]]}, {u ->
Function[{x}, -I Sqrt[-(1/(1 - Sqrt[1 - 2 C[1]]))]
JacobiSN[Sqrt[
x^2 + x^2 Sqrt[1 - 2 C[1]] + 2 x C[2] +
2 x Sqrt[1 - 2 C[1]] C[2] + C[2]^2 + Sqrt[1 - 2 C[1]] C[2]^2]/
Sqrt[2], (1 - Sqrt[1 - 2 C[1]])/(1 + Sqrt[1 - 2 C[1]])] +
I Sqrt[-(1/(1 - Sqrt[1 - 2 C[1]]))] Sqrt[1 - 2 C[1]]
JacobiSN[Sqrt[
x^2 + x^2 Sqrt[1 - 2 C[1]] + 2 x C[2] +
2 x Sqrt[1 - 2 C[1]] C[2] + C[2]^2 + Sqrt[1 - 2 C[1]] C[2]^2]/
Sqrt[2], (1 - Sqrt[1 - 2 C[1]])/(1 + Sqrt[1 - 2 C[1]])]]}}
The printing stuff below and around the $MachinePrecision
means that it is not meaningful to print because it might or might not be zero, for Chop
it's clearly zero.