g(x) be two continuous functions on

1. Cauchy-Schwarz inequality
All the functions here are assumed to be real-valued.
Let f (x), g(x) be two continuous functions on a bounded closed interval [a, b]. Then
f (x)2 , f (x)g(x), g(x)2 are continuous on [a, b]; they are all Riemnan integrable on [a, b].
Define a function F (t) on R by
Z b
F (t) =
(tf (x) − g(x))2 dx.
a
Assume that f (x) is not the zero function. Expanding (tf (x) − g(x))2 , we see that F is a
polynomial function:
Z b
Z b
Z b
2
2
2
F (t) =
f (x) dx t − 2
f (x)g(x)dx t +
g(x) dx .
a
Z
Denote A =
a
b
f (x)2 dx and B =
a
Z
a
b
Z
f (x)g(x)dx and C =
a
b
g(x)2 dx. Since f is nonzero,
a
A > 0.
Since (tf (x) − g(x))2 is nonnegative for all t, F (t) ≥ 0 for all t. Then the minimum of F
is also nonnegative. The critical point of F obeys F 0 (t) = 0. In this case, F 0 (t) = 2At − 2B
implies that t∗ = B/A. We can check that F 00 (t∗ ) = 2A > 0, and hence t∗ is a local minimum
of F (t). Since F is a degree two polynomial function, t∗ is the minimum. The minimum of
F is given by
2
B
AC − B 2
B
− 2B · + C =
.
F (t∗ ) = A ·
A
A
A
Since F (t∗ ) ≥ 0 and A > 0, we obtain AC − B 2 ≥ 0. In other words,
Z b
2 Z b
Z b
2
2
f (x)g(x)dx ≤
f (x) dx
g(x) dx .
a
a
a
The equality holds if and only F (t∗ ) = 0. In this case,
Z b
(t∗ f (x) − g(x))2 dx = 0.
a
g(x))2
Since (t∗ f (x) −
is a nonnegative continuous function on [a, b], the above equality
implies that (t∗ f (x) − g(x))2 = 0. Then t∗ f (x) = g(x) for all x ∈ [a, b]. We conclude that
Theorem 1.1. (Cauchy-Schwarz inequlaity) Let f (x), g(x) be continuous functions on [a, b].
Then
Z b
2 Z b
Z b
2
2
f (x)g(x)dx ≤
f (x) dx
g(x) dx
a
a
a
The equality holds if and only if there exists c ∈ R so that cf (x) = g(x).
1