Solution (source code)

= Solution

First use weak compactness of bounded sets in the <Hilbert space> $L^2(\Omega)$ to pass to a subsequence with $u_k\rightharpoonup u$ globally in $L^2$. The <weak lower semicontinuity of the Hilbert norm> gives $\|u\|_{L^2(\Omega)}\leq K$. This global step also applies if $\Omega$ is unbounded.

Choose a nested exhaustion $U_j\Subset U_{j+1}\Subset\Omega$ by bounded smooth open sets. Part (i) bounds $u_k$ in $H^1(U_j)$ for every $j$. By the <Rellich-Kondrachov compactness theorem>, $H^1(U_j)$ embeds compactly in $L^2(U_j)$. Weak compactness in $H^1(U_j)$ and a <diagonal subsequence argument> therefore give, for the same subsequence,
$$
u_k\rightharpoonup u\text{ in }H^1(U_j),\qquad u_k\longrightarrow u\text{ in }L^2(U_j)\quad\text{for every }j.
$$
The local limit agrees with the global weak $L^2$ limit. Using smooth exhaustion sets avoids imposing any unprinted boundary regularity on a general $\Omega'$.

For a smooth <compactly supported> <test function>, the weak equation passes to the limit: the fixed bounded coefficients multiply fixed <test functions>, and local <weak gradient> convergence handles both the principal and drift terms. The zeroth-order term passes by local $L^2$ convergence. Thus $Lu=f$ weakly, $u\in H^1_{\mathrm{loc}}(\Omega)$, and the global bound already proved gives $u\in S_K$.

To improve convergence of the <gradients>, put $w_k=u_k-u$. Crucially the forcing is the same for all $k$, so $Lw_k=0$. Given $\Omega'\Subset\Omega$, choose $j$ with $\overline{\Omega'}\subset U_j$. Apply part (i) on $U_j$ to the homogeneous equation for $w_k$:
$$
\|w_k\|_{H^1(\Omega')}\leq C\|w_k\|_{L^2(U_j)}\longrightarrow0.
$$
This establishes <strong local Sobolev compactness for a fixed elliptic equation> and proves
$$
\boxed{u\in S_K,\qquad u_{k'}\longrightarrow u\text{ in }W^{1,2}(\Omega')\text{ for every }\Omega'\Subset\Omega.}
$$