Solution (source code)

= Solution

Substituting the prolonged formulas shows
$$
i\widetilde ψ_t+\widetilde ψ_{xx}/2+|\widetilde ψ|^2\widetilde ψ
=e^{i\Phi}(iψ_t+ψ_{xx}/2+|ψ|^2ψ),
$$
so the nonlinear Schrödinger equation is invariant. Applying the symmetry to the given solitary wave produces
$$
ψ(t,x)=a\exp\{i[sx+(a^2-s^2)t/2]\}\operatorname{sech}(a(x-st)),
$$
which travels with speed $s$.