# How to maximize this integral?

Rudin asked me to maximize $$\int^{1}_{-1}x^{3}g(x)dx$$ under the restraint that $$\int^{1}_{-1}g(x)=\int^{1}_{-1}xg(x)dx=\int^{1}_{-1}x^{2}g(x)dx=0$$

This is clearly a Hilbert space problem need to use orthogonal relations. I computed $x^{3}$'s coefficients under the $L^{2}$ inner product and it turns out $x^{3}=\frac{3}{5}x^{2}+c$, with $c$ being orthogonal to $\{1,x,x^{2}\}$. But how does this help to find $g$?

A related question I also do not know how to solve is to find the minimum of $$\int^{\infty}_{0}|x^{3}-a-bx-cx^{2}|^{2}e^{-x}dx$$And it is not clear to me what the linearly independent underlying set is - $\{1,x,x^{2},e^{-x/2}\}$?

-
I finally had some ideas, we just need to normalize $c$ to get $g$. – user32240 Dec 29 '12 at 3:01

1
Hint for the second one: $e^{-x}$ is the weight function in the inner product. Also, do you know about Laguerre polynomials and/or Gram-Schmidt with respect to a weighted inner product? – JohnD Dec 29 '12 at 3:10
No I don't. I have to sleep now but really grateful for the hint. – user32240 Dec 29 '12 at 3:15

## 1 Answer

Hopefully you can recognize the second question as an application of what is sometimes called the "best approximation theorem" or "orthogonal projection theorem" in a Hilbert space. I'll show one approach, but there are others that people can chime in on.

If $\{\varphi_i(x)\}$ forms a complete orthonormal family on an interval $I$, with respect to the weight function $w(x)$, i.e., $$\langle \varphi_i,\varphi_j\rangle_w:=\int_I \varphi_i(x)\varphi_j(x)w(x)\,dx=\begin{cases} 0, &i\not=j,\\ 1, &i=j,\end{cases}$$ and we want to approximate $f\in L^2_w(I)$ as $$f(x)\approx\sum_{i=1}^n c_i \varphi_i(x), \quad x\in I,$$ then the "best" choice for the coefficients $c_i$ in the sense of minimizing the weighted $L^2$ norm of the error, $$\left\|f(x)-\sum_{i=1}^n c_i \varphi_i(x)\right\|_{L^2_w(I)},$$ is simply $c_i=\langle f,\varphi_i\rangle_w$, $i=1,\dots,n$.

To bring this to bear on your problem, the weight on the inner product is $e^{-x}$, $I=[0,\infty)$, $f(x)=x^3$, and we want to minimize the weighted $L^2_w(I)$ error when using the approximation $$x^3\approx a+bx+cx^2=\sum_{i=0}^2 c_i L_i(x),$$ where $L_i(x)$ denotes the $i$th Laguerre polynomial.

Since $L_0(x)=1$, $L_1(x)=1-x$, and $L_2(x)={1\over 2}(2-4x+x^2)$, from the best approximation theorem above, \begin{align} c_0&=\langle x^3,L_0\rangle_w=\int_0^\infty x^3 e^{-x}\,dx=6,\\ c_1&=\langle x^3,L_1\rangle_w=\int_0^\infty x^3(1-x)e^{-x}\,dx=-18,\\ c_2&=\langle x^3,L_2\rangle_w=\int_0^\infty x^3\cdot{1\over 2}(2-4x+x^2)e^{-x}\,dx=18, \end{align} which results in $$a=c_0+c_1+c_2=6, \quad b=-c_1-2c_2=-18, \quad c={c_2\over 2}=9.$$

Of course, if we want to let Mathematica do the work for us, it can:

but where's the fun in that? ;-)

Hope that helps.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 27, "mathjax_display_tex": 8, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9058251976966858, "perplexity_flag": "head"}