We begin with some definitions. Let $\gamma \geqslant 1,\,p \in \left[ {1,\infty } \right)$, we define $$L_\gamma ^p\left( {0,1} \right) = \left\{ {v:\left( {0,1} \right) \to \mathbb{R}:{{\left\| v \right\|}_p} = {{\left( {\int_0^1 {{x^\gamma }{{\left| {v\left( x \right)} \right|}^p}{\text{d}}x} } \right)}^{\frac{1}{p}}} < \infty } \right\},$$
$$W_\gamma ^{1,2}\left( {0,1} \right) = \left\{ {v \in L_\gamma ^2\left( {0,1} \right):{v_x} \in L_\gamma ^2\left( {0,1} \right)} \right\},$$ with $${\left\| v \right\|_{W_\gamma ^{1,2}}} = \sqrt {\left\| v \right\|_2^2 + \left\| {{v_x}} \right\|_2^2} .$$ With some elementary inequalities, I can prove that $W_\gamma ^{1,2}\left( {0,1} \right) \hookrightarrow L_\gamma ^p\left( {0,1} \right)$ is continuous with some $p \in \left[ {1,{\gamma ^*}} \right)$. But I don't have any idea to prove the compact embedding from $W_\gamma ^{1,2}\left( {0,1} \right)$ to $L_\gamma ^p\left( {0,1} \right)$. How can we do it?