Specifically, the question is as follows:
Prove that for every integrable real-valued $f:\mathbb{R}\rightarrow\mathbb{R}$, $$\left(\int_1^ef(x)dx\right)^2\leq\int_1^ex(f(x))^2dx.$$
I'm really just looking for assistance getting started on this problem. It is homework, so I request hints, not a full solution. For reference, this was asked in the context of linear algebra, not real analysis.
I am able to show that $$\langle f,g\rangle=\int_1^ef(t)g(t)dt$$ is an inner product on $L^2$. We have developed the Cauchy-Schwarz inequality, but not Schwarz's inequality, so this question is presumably solvable simply using $$|\langle u,v\rangle|\leq\|u\|\|v\|$$ (where $u$ and $v$ are elements of some vector space). So, setting $g=1$, we have $$\left(\int_1^ef(x)dx\right)^2=|\langle f,g\rangle|^2\leq(\|f\|\|1\|)^2=(e-1)\int_1^e(f(x))^2dx.$$ But I don't see how to draw the desired conclusion from here (so maybe I'm not approaching it right??).
Hint: \begin{align} \int^e_1 \frac{dx}{x} = 1. \end{align}