The necessary condition for $\int\limits_{-\infty}^{+\infty}|\psi(x)|^2dx$ to be integrable is that $\psi(x)\rightarrow 0$ as $x\rightarrow\pm\infty$. But this is not the sufficient condition. For example, $\delta(x)$ vanishes as $x\rightarrow \pm \infty$, but it is not square-integrable. What is the sufficient criterion for $\int\limits_{-\infty}^{+\infty}|\psi(x)|^2dx$ to converge?
In the previous question $\psi(x)$ was an arbitrary function. If now $\psi(x,t)$ be an arbitrary solution (not necessarily a stationary state) of the time-dependent Schrodinger equation what is the sufficiency condition for $\int\limits_{-\infty}^{+\infty}|\psi(x,t)|^2dx$ to be finite?
Does this conditions remain valid in three-dimensions?
EDIT: Can we have a continuous function $\psi(x)$ which does not go to zero as $x\rightarrow \pm\infty$ and yet the integral $\int\limits_{-\infty}^{+\infty}|\psi(x)|^2dx$ converges?