Prove $\int_{B(x,r)}|\nabla u|^2\leq \frac{C}{r^2}\int_{B(x,2r)}|u|^2$ if $-\Delta u(x)+f(x)u(x)=0.$ Let $\Omega $ a smooth domain of $\mathbb R^d$ ($d\geq 2$), $f\in \mathcal C(\overline{\Omega })$. Let $u\in \mathcal C^2(\overline{\Omega })$ solution of $$-\Delta u(x)+f(x)u(x)=0\ \ in\ \ \Omega .$$
Assume that $f(x)\geq 0$ for $x\in \Omega $. Prove that $$\int_{B(x,r)}|\nabla u|^2\leq \frac{C}{r^2}\int_{B(x,2r)}|u|^2,$$
for all $x\in \Omega $ and $r>0$, $B(x,2r)\subset \subset \Omega $ for somme $C\geq 0$ independant of $u,f,x$ and $r$.
My attempts
Using divergence theorem and that $\Delta u=fu$ in $\Omega $, I have that $$\int_{B(x,r)}|\nabla u|^2=\int_{B(x,r)}\text{div}(u\nabla u)-\int_{B(x,r)}u\Delta u=\int_{\partial B(x,r)}u\nabla u\cdot \nu-\int_{B(x,r)}fu^2.$$
But I can't do better. Any help would be welcome.
 A: Suppose that $\varphi : \bar{B}(x,2r) \to [0,\infty)$ is Lipschitz and $\varphi =0$ on $\partial B(x,2r)$.  Note that since $\varphi$ is Lipschitz, it is differentiable almost everywhere by Rademacher's theorem.  Then 
$$
0 \le \int_{B(x,2r)} \varphi^2 f u^2 = \int_{B(x,2r)} \varphi^2 u \Delta u = \int_{B(x,2r)} - \nabla (\varphi^2 u) \cdot \nabla u
$$
since $\varphi$ vanishes on $\partial B(x,2r)$.  Since 
$$
\nabla(\varphi^2 u) = 2 \varphi \nabla \varphi u + \varphi^2 \nabla u
$$
we find, upon plugging in above, that 
$$
0 \le -\int_{B(x,2r)}2 \varphi u \nabla \varphi \cdot \nabla u + \varphi^2 |\nabla u|^2,
$$
and so 
$$
\int_{B(x,2r)} \varphi^2 |\nabla u|^2 \le \int_{B(x,2r)} -2 \varphi u \nabla \varphi \cdot \nabla u \le 2 \left(\int_{B(x,2r)} \varphi^2 |\nabla u|^2\right)^{1/2} \left(\int_{B(x,2r)} u^2 |\nabla \varphi|^2 \right)^{1/2}.
$$
From this we then see that 
$$
\int_{B(x,2r)} \varphi^2 |\nabla u|^2 \le 4 \int_{B(x,2r)} u^2 |\nabla \varphi|^2. 
$$
With the last inequality in hand we can prove the result.  Set 
$$
\varphi(y) =
\begin{cases}
1 & \text{if } |x-y| \le r \\
2 - |x-y|/r & \text{if } r < |x-y| \le 2r. 
\end{cases}
$$
It's easy to see that $\varphi \ge 0$, $\varphi$ vanishes on the boundary, and $\varphi$ is Lipschitz.  Also 
$$
|\nabla \varphi(y)| =
\begin{cases}
0 & \text{if } |x-y| \le r \\
1/r & \text{if } r < |x-y| \le 2r. 
\end{cases}
$$
Plugging this in above then gives the inequality
$$
\int_{B(x,r)} |\nabla u|^2 \le \int_{B(x,2r)} \varphi^2 |\nabla u|^2 \le 4 \int_{B(x,2r)} u^2 |\nabla \varphi|^2 = \frac{4}{r^2} \int_{B(x,2r) \backslash B(x,r)} u^2.
$$
This is actually stronger than the desired inequality.
A: Denote $B(x,r)$ by $B_r$ and choose a smooth function $\xi$ to have the following property
$$ \xi=\left\{\begin{array}{lcr}1,&\text{if }x\in B_r\\
\ge 0,&\text{if }x\in B_{2r}\setminus B_r\\
0,&\text{if }x\in\Omega\setminus B_{2r},
\end{array}
\right. $$
satisfying $|\nabla \xi|\le \frac{C}{r}$. Using $u\xi^2$ as a test function in the equation, one has
$$ \int_{\Omega}\nabla u\nabla(u\xi^2)dx=-\int_{\Omega}fu^2\xi^2dx\le0. $$
Thus
$$ \int_{\Omega}\xi^2|\nabla u|^2dx\le-2\int_{\Omega}(\xi\nabla u)(u\nabla\xi) dx. $$
By using $2ab\le \frac{1}{2}a^2+2b^2$, one has
$$ \int_{\Omega}\xi^2|\nabla u|^2dx\le \frac12\int_{\Omega}\xi^2|\nabla u|^2dx+2\int_{\Omega}|u\nabla\xi|^2 dx $$
and hence
$$ \int_{\Omega}\xi^2|\nabla u|^2dx\le 4\int_{\Omega}|u\nabla\xi|^2 dx. $$
So using the property of $\xi$, one has
$$ \int_{B_r}|\nabla u|^2dx\le \frac{C}{r^2}\int_{B_{2r}}|u|^2 dx. $$
