0
$\begingroup$

I have a differential equation I am trying to solve using

DSolve[{f''[x] + f[x] - f[x]^3 == 0}, {f[x]}, x]

with the boundary condition $f(\pm\infty)\rightarrow \pm 1$. I already know the solution, $f(x)=\tanh(x/\sqrt{2})$, but I'm wondering if there's a way I could have found this with Mathematica, which outputs an elliptic JacobiSN function.

$\endgroup$
  • $\begingroup$ No time to write a long answer, but: DSolve[{f''[x] + f[x] - f[x]^3 == 0}, f[x], x] /. {C[1] -> 1/2, C[2] -> 0} $\endgroup$ – J. M. will be back soon Apr 3 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.