The differential equation at hand is this :
$$ \frac{\text{d}\psi}{\text{d}x}+2\tanh(x)\,\psi\left(x\right)=0\ $$ And what I have tried is this : $$ \int_{}^{} \frac{\text{d}\psi}{\psi}=-2\int_{}^{} \tanh(x)\,dx$$ and $$ \ln\psi \left(x\right)=-2\cosh^{-2}\left(x\right)+C\ $$
And the solution of this elementary problem comes out to be : $$ \psi\left(x\right)=Ae^{-2\cosh^{-2}\left(x\right)}$$ But clearly, $$ \psi\left(x\right)\ = \cosh^{-2}\left(x\right)\ $$ is a solution. But why can't I find it through integration?
Actually, we have that $$\int\tanh(x) dx=\int\frac{d(\cosh(x))}{\cosh(x)}=\ln(\cosh(x))+c$$ and
$$D(\tanh(x))=\frac{1}{\cosh^2(x)}.$$ So you confused the derivative with the integral...