If $f$ is real-valued and continuously differentiable on $\mathbb{R}$, prove that $$ \left(\int|f|^2dx\right)^2\le 4\left(\int|xf(x)|^2dx\right)\left(\int|f'|^2dx\right) $$
Attempt: I tried the Cauchy-Schwarz inequality as well as the Plancherel theorem, but none of them seems to work.
For well behaved $f$ (and usually suppressing limits of integration):
$$\int_{-\infty}^\infty xff' \ dx = \left[\frac 12 xf^2 \right]_{-\infty}^\infty - \int \frac 12 f^2 \ dx = - \frac 12 \int f^2 dx$$
Now applying Cauchy-Schwarz,
$$\left( \int |f|^2 \ dx \right)^2 = 4 \left( \int xff' \ dx \right)^2 \leq 4 \left( \int |xf|^2 \ dx \right) \left( \int |f'|^2 \ dx \right)$$