As promised, here is the solution to exercise 15 of chapter 4 in Walter Rudin’s Real and Complex Analysis. So the reader does not have to flip through the text, I have reproduced the statement of problem below.
State and solve the corresponding maximum problem, as in Exercise 14.
Define a weight function by . Note that the expression
is well-defined for measurable complex-valued functions and satisfying
since, by Cauchy-Schwarz,
I leave it to the reader that defines an inner product.
Define polynomials , , and . We use the Gram-Schmidt algorithm to obtain an orthonormal basis for . First, an elementary integral calculus lemma.
Lemma 1. Let be a nonnegative natural number. Then
Proof. We prove this result by induction on . From basic integral calculus, we see that
Now suppose that the result is true for some . Integrating by parts, we obtain
An easy consequence of the lemma and the linearity of the integral is that, for any polynomial of degree ,
Using the lemma, we see that
So we define . Applying the Gram-Schmidt algorithm, we obtain that
The element of which minimizes the weighted -distance to is the polynomial
Substituting in the computed coefficients, we see that the solution to the minimization problem is the polynomial
I am not going to prove the second part of the exercise; the reader has seen enough to solve it by him- or herself. However, I will prove a more general result, which may be of some help.
Proposition 2. If and is a closed subspace of , then
Proof. Fix . Let and denote the quantities on the left- and right-hand sides, respectively. Since is a closed and a fortiori convex, there exist unique elements and such that . Observe that
For any element with , we have that
where we use the orthogonality and the Cauchy-Schwarz inequality. Taking the supremum of the left-hand side of the inequality over , we see that . But the element has norm , belongs to , and attains the upper bound, which shows that .