Let $\Omega \subset \mathbb{R}^N$ be a smooth domain with bounded complement. Let $a \in C(\Omega)$ and let $u \in W_0^{1,2}(\Omega)$. Suppose that $a > 0$ in $\Omega$ and $\displaystyle \lim_{\vert x \vert \rightarrow \infty} = \alpha > 0$.
Is the following integral: $$I = \int_{\Omega} a u^2 \, dx$$ finite ?
Since $a$ is not necessarily continuous up to the boundary, bad things can happen on $\partial \Omega$. For example, the function $$a(x) = 1 - \frac{1}{\vert x \vert^2 - 1}$$ equals $\infty$ on $\partial \Omega$ where $\Omega = \mathbb{R}^N \setminus B(0;1)$.
But $u$ vanishes—in the sense of traces—on $\partial \Omega$. Is that enough to guarantee that $I < \infty$ ?
The fact that $u\in W^{1,2}_0$ gives a tiny amount of information on how it vanishes near the boundary. Thus, in order to get $\int au^2<\infty$ you need to know a lot about how $a$ can blow up. Absent such information, counterexamples are abundant: $$a(x)=1+\frac{1}{(|x|^2-1)^3}, \quad u(x)=(|x|-1)\exp(-|x|^2)$$