Assume that $f: \mathbb{R}^{n} \rightarrow \mathbb{R}$ for $n \geq 3$ satisfies $$ \lim _{r \rightarrow 0} \sup _{x \in \mathbb{R}^{n}} \int_{|x-y| \leq r} \frac{|f(y)|}{|x-y|^{n-2}} d y=0 . $$ Prove that there exists a constant $c_{0}>0$ such that for all $u \in C_{0}^{\infty}\left(\mathbb{R}^{n}\right)$, $$ \int_{\mathbb{R}^{n}}|f(x)|^{2}|u(x)|^{2} d x \leq \frac{1}{4}\|\nabla u\|_{2}^{2}+c_{0}\|u\|_{2}^{2} . $$ Note that here $c_{0}$ is independent of $u$ but may depend on $f, n$.
Actually I can prove this inequality for $f(x)=1/|x|$ by the divergence theorem. But for the general case, I have no idea. Can anyone tell me the name of this inequality (if has one) and some references? Thanks for any help!