I'm a physics student and this question troubled me while reading solitons in $1+1$ dimensions.
Consider a real-valued, continuous, and bounded function $\phi(x,t)$, of two real variavles $x,t$ such that the quantity $$E[\phi]=\int\limits_{-\infty}^{+\infty} dx\, \left[\frac{1}{2}\left(\frac{\partial\phi}{\partial t}\right)^2+\frac{1}{2}\left(\frac{\partial \phi}{\partial x} \right)^2+a\phi^2+b\phi^4 \right]$$ is finite. Here, $a,b$ are non-zero real numbers but can be positive or negative.
What is the necessary condition that $\phi$, and its derivatives $\frac{\partial\phi}{\partial t}$ and $\frac{\partial \phi}{\partial x}$ must satisfy as $x\rightarrow\pm\infty$ so that $E[\phi]$ is finite?
Can we also say something about the sufficiency condition?