Travelling (soliton) Wave solution to 1D GPE equation I have a non-dimensional version of the Gross-Pitaevskii equation:
$$ 2i \frac{\partial \psi}{\partial t} = - \frac{\partial^2\psi}{\partial x^2} + \left|\psi \right|^2\psi -\psi, $$
where $\psi(x,t)$ is the wave-function for a BEC. My aim is to find a travelling wave solution. I suspect this solution is of the form:
$$\psi(x,t) = f(x-ut)\,e^{-i\mu t}  ,$$ where $\mu, u$ are constants ($u$ is the speed).
From reading around online (specifically, the book "A Primer on Quantum Fluids"), I think the final solution for $\psi(x,t)$ is of the general form:
$$ \psi(x,t) = \tanh\left( (x-ct)\,+i\frac{u}{c} \right)\,e^{-i\mu t}. $$
I have tried to substitute my form of the solution into it to find $f$, and so far I am at the current stage:
$$ \frac{\partial^2f}{\partial x^2} - i\,2u\frac{\partial f}{\partial x} -f^3 +(1+2\mu)f = 0,$$
but after carrying on with this and applying some basic differential equation solver techniques, it doesn't seem to get me to the right place. It is also possible that I have made mistakes leading up to this point, and I'm not too sure whether that's the case or where to go from here. This particular solution is for dark solitons. I also need to find bright soliton solutions but this should proceed in a similar manner. Any help would be greatly appreciated!
 A: To make things easier when calculating derivatives etc, we let $\eta = x-ut$ where $u$ is the speed of our travelling soliton. So now we can calculate the necessary derivatives in order to substitute them into our original nondimensional GPE:
\begin{align}\label{eq: equation eta derivatives}
\frac{\partial^2\psi}{\partial x^2} &= \frac{df}{d\eta} e^{-i\mu t}, \\
\frac{\partial\psi}{\partial t} &= -u\frac{df}{d\eta} e^{-i\mu t} - i\mu f(\eta)e^{-i\mu t}, \hspace{1em} \text{(using product rule)} \\
|\psi|^2 \psi &= f^3 e^{-i\mu t}.
\end{align}
So after substituting these derivatives into our original equation, we have the following:
\begin{align}
 2iu \frac{df}{d\eta} e^{-i\mu t} &= \frac{d^2 f}{d\eta^2}e^{-i\mu t} +f\,(2\mu -|f|^2)\,e^{-i\mu t}, \\
   \tag{1}\label{eq: soleq to be solved} 2iu \frac{df}{d\eta} &= \frac{d^2f}{d\eta^2} +f\,(2\mu -|f|^2).
\end{align}
Since wave-functions are not typically real-valued, we do not assume that $f(\eta)$ is real-valued. Hence we can write this in complex form: $f=f_{1} +if_{2}. $ Now after substituting this and taking only the imaginary part of this, we obtain the following:
\begin{equation}
2u \frac{d f_1}{d\eta} = \frac{d^2 f_2}{d\eta^2} + f_2 (2\mu -f_{1}^{2}-f_{2}^{2}).
\end{equation}
This can now be solved by treating $f_{2}$ as a constant, which can be seen by looking at what type of solution you would find from the imaginary part of \eqref{eq: soleq to be solved}. Without loss of generality we let $f_{2} = 2u$, then solving the following nonlinear separable ODE:
\begin{equation}\label{soliton2}
    \frac{d f_1}{d\eta} = 2\mu -f_{1}^{2}-f_{2}^{2},
\end{equation}.
After some separation and integration we obtain the following result:
\begin{align}
    \eta &= -\frac{i}{\sqrt{2\mu -4u^2}} \arctan \Big(\frac{if_1}{\sqrt{2\mu -4u^2}}\Big)+c \\
    &= \frac{1}{\sqrt{2\mu - 4u^2}}\, \text{arctanh}\, \Big(\frac{f_1}{\sqrt{2\mu -4u^2}}\Big)+c, \hspace{1em}\text{(c is constant)}
\end{align}
which yields the following final answer, after applying limits:
\begin{align}\tag{2}\label{dark soliton solution}
    \psi(x,t) &= \Big(\zeta \tanh \big[\zeta(x-ut)\big]+i\,2u\Big)\,e^{-i\mu t}, \\
    \text{with}\hspace{2em} \zeta &= \sqrt{2\mu -4u^2}\,.
\end{align}
I plotted this dark soliton solution in Matlab with different speed values, I will leave my plot attached.
Thank you to all those who commented and gave advice and guidance, this answer and plot was completed as part of my Year 3 Maths Research Project surrounding vortex interaction in a superfluid.

