# Proving the Cauchy-Schwarz inequality

By using $F(t)=(u_1-tv_1)^2+\cdots+(u_n-tv_n)^2$ prove that

$$(u_1v_1+\cdots+u_nv_n)^2\leq(u_1+\cdots+u_n)^2(v_1+\cdots+v_n)^2.$$

I have no idea to relate the $F(t)$ with the inequality.

Or can it be done by using induction?

Note that $F(t) = \sum_{i} u_i^2 + t^2 \sum_i v_i^2 - 2t \sum_i u_i v_i$. The minimum occurs at $F'(t^*) = 0$. This gives us $$t^* = \dfrac{\sum_i u_i v_i}{\sum_i v_i^2}$$ Now $F(t^*) \geq 0$, gives us the Cauchy-Schwarz inequality.
Note that: $F(t) = \left(\displaystyle \sum_{k=1}^n v_k^2\right)t^2 - 2\left(\displaystyle \sum_{k=1}^nu_kv_k\right)t + \displaystyle \sum_{k=1}^n u_k^2 \geq 0$, $\forall t \in \mathbb{R} \to \triangle' \leq 0$, the answer follows.