## Big Rudin: Chapter 4, Exercise 15

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.

Compute

$\displaystyle\min_{a,b,c\in\mathbb{R}}\int_{0}^{\infty}\left|x^{3}-a-bx-cx^{2}\right|^{2}e^{-x}dx$

State and solve the corresponding maximum problem, as in Exercise 14.

Define a weight function $w:[0,\infty)\rightarrow[0,\infty)$ by $w(x):=e^{-x}$. Note that the expression

$\displaystyle\langle{f,g}\rangle_{w}=\int_{0}^{\infty}f(x)\overline{g(x)}w(x)dx$

is well-defined for measurable complex-valued functions $f$ and $g$ satisfying

$\displaystyle\max\left\{\int_{0}^{\infty}\left|f(x)\right|^{2}w(x)dx,\int_{0}^{\infty}\left|g(x)\right|^{2}w(x)\right\}<\infty$

since, by Cauchy-Schwarz,

$\displaystyle\int_{0}^{\infty}\left|f(x)\overline{g(x)}w(x)\right|dx=\int_{0}^{\infty}\left|f(x)w(x)^{\frac{1}{2}}\right|\left|\overline{g(x)}w(x)^{\frac{1}{2}}\right|dx\leq\left\|f\right\|_{w}\left\|g\right\|_{w}$

I leave it to the reader that $\langle{,}\rangle_{w}$ defines an inner product.

Define polynomials $p_{0}:=1$, $p_{1}:=x$, and $p_{2}:=x^{2}$. We use the Gram-Schmidt algorithm to obtain an orthonormal basis for $M$. First, an elementary integral calculus lemma.

Lemma 1. Let $n$ be a nonnegative natural number. Then

$\displaystyle\int_{0}^{\infty}x^{n}e^{-x}dx=n!$

Proof. We prove this result by induction on $n$. From basic integral calculus, we see that

$\displaystyle\int_{0}^{\infty}e^{-x}dx=\left[-e^{-x}\right]_{x=0}^{x=\infty}=1$

Now suppose that the result is true for some $n>1$. Integrating by parts, we obtain

$\displaystyle\int_{0}^{\infty}x^{n+1}e^{-x}dx=\left[-x^{n+1}e^{-x}\right]_{x=0}^{x=\infty}+(n+1)\int_{0}^{\infty}x^{n}e^{-x}dx=(n+1)n!=(n+1)!$

$\Box$

An easy consequence of the lemma and the linearity of the integral is that, for any polynomial $p=a_{0}+a_{1}x+\cdots+a_{n}x^{n}$ of degree $n$,

$\displaystyle\int_{0}^{\infty}p(x)e^{-x}dx=\sum_{i=0}^{n}a_{i}\int_{0}^{\infty}x^{i}e^{-x}dx=\sum_{i=0}^{n}a_{i}i!$

Using the lemma, we see that

$\left\|p_{0}\right\|=\left(\int_{0}^{\infty}e^{-x}dx\right)^{\frac{1}{2}}=\left(\left[-e^{-x}\right]_{x=0}^{x=\infty}\right)^{\frac{1}{2}}=1$

So we define $e_{0}:=p_{0}=1$. Applying the Gram-Schmidt algorithm, we obtain that

$\begin{array}{lcl}\displaystyle e_{1}:=\dfrac{x-\langle{x,1}\rangle_{w}}{\left\|x-\langle{x,1}\rangle_{w}\right\|}=\dfrac{x-\int_{0}^{\infty}xe^{-x}dx}{\left\|x-\langle{x,1}\rangle_{w}\right\|}&=&\displaystyle\dfrac{x-\int_{0}^{\infty}e^{-x}dx}{\left\|x-\langle{x,1}\rangle_{w}\right\|}\\[2 em]&=&\displaystyle\dfrac{x-1}{\left(\int_{0}^{\infty}(x-1)^{2}e^{-x}dx\right)^{\frac{1}{2}}}\\[2 em]&=&\displaystyle x-1\end{array}$

Lastly,

$\begin{array}{lcl}\displaystyle e_{2}&=&\displaystyle\dfrac{x^{2}-\langle{x^{2},e_{1}}\rangle_{w}e_{1}-\langle{x^{2},e_{0}}\rangle_{w}e_{0}}{\left\|x^{2}-\langle{x^{2},e_{1}}\rangle_{w}e_{1}-\langle{x^{2},e_{0}}\rangle_{w}\right\|_{w}}\\[2 em]&=&\displaystyle\dfrac{x^{2}-\left(\int_{0}^{\infty}x^{2}(x-1)e^{-x}dx\right)(x-1)-\left(\int_{0}^{\infty}x^{2}e^{-x}dx\right)}{\left\|x^{2}-\langle{x^{2},e_{1}}\rangle_{w}e_{1}-\langle{x^{2},e_{0}}\rangle_{w}\right\|_{w}}\\[2 em]&=&\displaystyle\dfrac{x^{2}-4(x-1)-2}{\left\|x^{2}-\langle{x^{2},e_{1}}\rangle_{w}e_{1}-\langle{x^{2},e_{0}}\rangle_{w}\right\|_{w}}\\[2 em]&=&\displaystyle\dfrac{x^{2}-4x+2}{\left(\int_{0}^{\infty}(x^{2}-4x+2)^{2}e^{-x}dx\right)^{\frac{1}{2}}}\\[2 em]&=&\displaystyle\dfrac{x^{2}-4x+2}{\left(\int_{0}^{\infty}[x^{4}-8x^{3}+20x^{2}-16x+4]e^{-x}dx\right)^{\frac{1}{2}}}\\[2 em]&=&\displaystyle\dfrac{1}{2}x^{2}-2x+1\end{array}$

The element of $M$ which minimizes the weighted $L^{2}$-distance to $x^{3}$ is the polynomial

$\displaystyle\langle{x^{3},e_{2}}\rangle_{w}e_{2}+\langle{x^{3},e_{1}}\rangle_{w}e_{1}+\langle{x^{3},e_{0}}\rangle_{w}e_{0}$

$\displaystyle\langle{x^{3},e_{2}}\rangle_{w}=\int_{0}^{1}x^{3}\left(\dfrac{1}{2}x^{2}-2x+1\right)e^{-x}dx=\dfrac{5!}{2}-2(4!)+3!=18$

Next,

$\displaystyle\langle{x^{3},e_{1}}\rangle_{w}=\int_{0}^{1}x^{3}(x-1)e^{-x}dx=4!-3=18$

Lastly,

$\displaystyle\langle{x^{3},e_{0}}\rangle_{w}=\int_{0}^{1}x^{3}e^{-x}dx=6$

Substituting in the computed coefficients, we see that the solution to the minimization problem is the polynomial

$\displaystyle3\left(6x^{2}+6x-1\right)$

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 $x_{0}\in H$ and $M$ is a closed subspace of $H$, then

$\displaystyle\min\left\{\left\|x-x_{0}\right\|:x\in M\right\}=\max\left\{\left|\langle{x_{0},y}\rangle\right|:y\in M^{\perp},\left\|y\right\|=1\right\}$

Proof. Fix $x_{0}\in M$. Let $\delta_{1}$ and $\delta_{2}$ denote the quantities on the left- and right-hand sides, respectively. Since $M$ is a closed and a fortiori convex, there exist unique elements $Px_{0}\in M$ and $Qx_{0}\in M^{\perp}$ such that $x_{0}=Px_{0}+Qx_{0}$. Observe that

$\displaystyle\left\|Px_{0}-x_{0}\right\|=\delta_{1}\text{ and }\left\|Qx_{0}-x_{0}\right\|=\min\left\{\left\|y-x_{0}\right\|: y \in M^{\perp}\right\}$

For any element $y\in M^{\perp}$ with $\left\|y\right\|=1$, we have that

$\displaystyle\left|\langle{x_{0},y}\rangle\right|=\left|\langle{Qx_{0}+Px_{0},y}\rangle\right|=\left|\langle{Qx_{0},y}\rangle\right|\leq\left\|Qx_{0}\right\|\left\|y\right\|=\left\|Qx_{0}\right\|=\delta_{1}$,

where we use the orthogonality $Px_{0}\perp M^{\perp}$ and the Cauchy-Schwarz inequality. Taking the supremum of the left-hand side of the inequality over $\left\{y \in M^{\perp}:\left\|y\right\|=1\right\}$, we see that $\delta_{2}\leq\delta_{1}$. But the element $\frac{Qx_{0}}{\left\|Qx_{0}\right\|}$ has norm $1$, belongs to $M^{\perp}$, and attains the upper bound, which shows that $\delta_{2}=\delta_{1}$. $\Box$