Given that $f: [1,e] \to \mathbb{R}$ is a continuous function, show $$ \left( \int_1^e f(x) \; dx \right)^2 \leq \int_1^e x\,f(x)^2 \; dx $$
My Attempt: At first it looked rather like a Cauchy-Schwartz Inequality so it made me think to use Holder's Inequality, but I have not found a way to make this work. I feel like this might also be a trick since $x \geq 1$ on $[1,e]$ so that we have the inequality $xf(x) \geq f(x)$ and that perhaps we actually have the inequality $$ \left( \int_1^e f(x) \; dx \right)^2 \leq \int_1^e f(x)^2 \; dx $$ so that the given one follows trivially. But this easily fails by taking $ f(x)=\frac{1}{x}$. Of course, seeing the $e$ and $1$ in the integrand make me think this involves $e^x$ or $\ln x$, but I do not see how. Any hints on how to proceed?
Defining $$ \langle f , g \rangle\equiv \int_{1}^{e} f(x) g(x) dx $$ for real functions $f$ and $g$, Cauchy-Schwartz says that $$ \left|\langle f, g \rangle\right|^2 \le \langle f,f\rangle \cdot \langle g,g\rangle. $$ In your case, it says that for any positive function $h$, $$ \left(\int_{1}^{e}f(x) dx\right)^2=\left|\left\langle \frac{f}{h}, h \right\rangle\right|^2 \le \left\langle \frac{f}{h},\frac{f}{h}\right\rangle \cdot \langle h,h\rangle=\int_{1}^{e}\frac{f(x)^2}{h(x)^2} dx \cdot \int_{1}^{e} h(x)^2dx \\ =\int_{1}^{e}\left[\frac{\int_{1}^{e}h(y)^2 dy}{h(x)^2}\right]f(x)^2 dx. $$ You want to choose $h$ so that the term in square brackets is no greater than $x$ over the interval $[1,e]$. As pointed out in a comment, taking $h(x)=x^{-1/2}$ gives $$ \left[\frac{\int_{1}^{e}h(y)^2 dy}{h(x)^2}\right]=\frac{\int_{1}^{e}y^{-1}dy}{x^{-1}}=x\cdot\left(\log y\big\vert_{1}^{e}\right)=x $$ exactly.