Solution (source code)

= Solution

Assume $\alpha<\beta$ and abbreviate
$$
A=\int_\alpha^\beta f^2\,dx,\qquad B=\int_\alpha^\beta fg\,dx,\qquad C=\int_\alpha^\beta g^2\,dx.
$$
The <integral> of the nonnegative square expands to $A+2\lambda B+\lambda^2C\geq0$ for every real $\lambda$. If $C>0$, completing the square, or choosing $\lambda=-B/C$, gives $A-B^2/C\geq0$. Hence the <Cauchy-Schwarz inequality> is
$$
\boxed{\left(\int_\alpha^\beta fg\,dx\right)^2
\leq\left(\int_\alpha^\beta f^2\,dx\right)
\left(\int_\alpha^\beta g^2\,dx\right)}.
$$
If $C=0$, <continuity> and nonnegativity imply $g=0$ throughout the interval, so the same inequality is immediate.

When $C>0$, equality holds exactly when $\int(f-(B/C)g)^2dx=0$. The <integrand> is continuous and nonnegative, so it must vanish everywhere, giving $f=(B/C)g$. Including the case of a zero <function>, equality is equivalent to <linear dependence> of $f$ and $g$ as elements of the real <vector space> of continuous <functions> on the interval.