How can I solve this equation if I know the solution for a similar equation For equation
\begin{equation}
-y''-2a^2\operatorname{sech}^2(ax)~y=k^2y
\end{equation}
I know there is the solution
\begin{equation}
y(x)=C_1\frac{-a \tanh (a x)+i k}{a+i k}e^{i k x} +C_2\frac{-a \tanh (a x)-i k}{a-i k}e^{-i k x}
\end{equation}
How can I find the solution for equation
\begin{equation}
-y''-2a\operatorname{sech}^2(ax) y=k^2y \text{ ?}
\end{equation}
$a$ and $k$ are real numbers.
 A: Your reference book is lying!
Let $u=-\tanh ax$ ,
Then $\dfrac{dy}{dx}=\dfrac{dy}{du}\dfrac{du}{dx}=-a(\text{sech}^2ax)\dfrac{dy}{du}$
$\dfrac{d^2y}{dx^2}=\dfrac{d}{dx}\left(-a(\text{sech}^2ax)\dfrac{dy}{du}\right)=-a(\text{sech}^2ax)\dfrac{d}{dx}\left(\dfrac{dy}{du}\right)-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}=-a(\text{sech}^2ax)\dfrac{d}{du}\left(\dfrac{dy}{du}\right)\dfrac{du}{dx}-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}=-a(\text{sech}^2ax)\dfrac{d^2y}{du^2}(-a~\text{sech}^2ax)-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}=a^2(\text{sech}^4ax)\dfrac{d^2y}{du^2}-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}$
For $-y''-2a^2(\text{sech}^2ax)y=k^2y$ , the ODE becomes
$-\left(a^2(\text{sech}^4ax)\dfrac{d^2y}{du^2}-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}\right)-2a^2(\text{sech}^2ax)y=k^2y$
$a^2(\text{sech}^4ax)\dfrac{d^2y}{du^2}-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}+(k^2+2a^2\text{sech}^2ax)y=0$
$a^2(1-\tanh^2ax)^2\dfrac{d^2y}{du^2}-2a^2(\tanh ax)(1-\tanh^2ax)\dfrac{dy}{du}+(k^2+2a^2(1-\tanh^2ax))y=0$
$a^2(1-u^2)^2\dfrac{d^2y}{du^2}-2a^2u(1-u^2)\dfrac{dy}{du}+(k^2+2a^2(1-u^2))y=0$
For $-y''-2a(\text{sech}^2ax)y=k^2y$ , the ODE becomes
$-\left(a^2(\text{sech}^4ax)\dfrac{d^2y}{du^2}-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}\right)-2a(\text{sech}^2ax)y=k^2y$
$a^2(\text{sech}^4ax)\dfrac{d^2y}{du^2}-2a^2(\text{sech}^2ax\tanh ax)\dfrac{dy}{du}+(k^2+2a~\text{sech}^2ax)y=0$
$a^2(1-\tanh^2ax)^2\dfrac{d^2y}{du^2}-2a^2(\tanh ax)(1-\tanh^2ax)\dfrac{dy}{du}+(k^2+2a(1-\tanh^2ax))y=0$
$a^2(1-u^2)^2\dfrac{d^2y}{du^2}-2a^2u(1-u^2)\dfrac{dy}{du}+(k^2+2a(1-u^2))y=0$
Which both relates to the associated Legendre differential equation
