  Consider the following inequalities due to Caffarelli, Kohn and Nirenberg
{\it (Compositio Mathematica,1984):} $$\Big(\int_\Omega
\frac{|u|^r}{|x|^s}dx\Big)^{\frac{1}{r}}\leq
C(p,q,r,\mu,\sigma,s)\Big(\int_\Omega \frac{|\nabla
u|^p}{|x|^\mu}dx\Big)^{\frac{a}{p}}\Big(\int_\Omega
\frac{|u|^q}{|x|^\sigma}dx\Big)^{\frac{1-a}{q}},$$ where $\Omega \subset \R^N
(N\geq 2)$ is an open set; $p, q, r, \mu, \sigma, s, a$ are some parameters
satisfying some balanced conditions. When $\Omega$ is a cone in $\R^N$ (for
example, $\Omega=\R^N)$, we prove the sharp constant $C(p,q,r,\mu,\sigma,s)$
can be achieved for a very large parameter space. Besides, we find some
sufficient conditions which guarantee that the following Sobolev spaces
$$W_{\mu}^{1,p}(\Omega),\; W_{\mu}^{1,p}(\Omega)\cap L^p(\Omega), \;
H^{1,p}(\R^N) $$ are compactly embedded into $L^r(\R^N, \frac{dx}{|x|^s})$ for
some new ranges of parameters, where $\displaystyle W_{\mu}^{1,p}(\Omega)$ is
the completion of $C_0^\infty(\Omega)$ with respect to the norm $\displaystyle
\Big(\int_\Omega \frac{ |\nabla u|^p}{|x|^\mu}dx\Big)^{\frac{1}{p}}. $ As
applications, we also study the equation $$\displaystyle -div\Big(\frac{|\nabla
u|^{p-2}\nabla u}{|x|^\mu}\Big)=\lambda V(x)|u|^{q-2}u, \;\;\; u\in
W_{\mu}^{1,p}(\Omega)$$ under some proper conditions on $V(x)$.
