Solution (source code)

= Solution

For finite $p>n$, choose
$$
q=\frac{2p}{p-2},\qquad \frac12=\frac1p+\frac1q.
$$
Since $n\geq3$ and $p>n$, we have $2<q<2^*=2n/(n-2)$. The zero-boundary versions of the <Sobolev embedding theorem> and <Rellich-Kondrachov compactness theorem> say that $W_0^{1,2}(\Omega)$ embeds continuously into $L^{2^*}$ and compactly into $L^q$ for $q<2^*$ on a bounded open set. These versions hold on arbitrary bounded open sets by zero extension; a boundary extension operator is not needed.

If $(v_j)$ is bounded in $L^2$, then $(Tv_j)$ is bounded in $W_0^{1,2}$ by the preceding part. A subsequence consequently converges in $L^q$ to some $z$. <Hölder's inequality> gives
$$
\|w(Tv_j-z)\|_2\leq\|w\|_p\|Tv_j-z\|_q\longrightarrow0.
$$
Multiplication by $w$ is bounded from $L^q$ to $L^2$, and the same estimate proves that $K$ is bounded and well defined. Every bounded input sequence has a subsequence whose images converge in $L^2$, so $\boxed{K\text{ is compact}}$. If $p=\infty$ is included, take $q=2$ and use the same argument. This is the <compact L2 potential perturbation of the Dirichlet Laplacian> mechanism.