Find the function $\hat{g}$ that maximizes $\int_0^1 x^2g(x)dx$ over the set of all functions that satisfy the following conditions:

165 Views Asked by At

Find the function $\hat{g}$ that maximizes $\int_0^1 x^2g(x)dx$ over the set of all functions that satisfy the following conditions:

$\int_0^1 |g(x)|^2dx =1$, $\int_0^1 g(x)dx=0$, and $\int_0^1xg(x)dx=0$.

Any solutions or hints are greatly appreciated. I've been stuck on this for a bit. I'm not sure how to find $\hat{g}$. I know the following, but I don't know if it's useful:

$||x\sqrt{g(x)}||^2$ =$<x\sqrt{g(x)}, x\sqrt{g(x)}>=\int_0^1x^2g(x)dx$.

3

There are 3 best solutions below

1
On

Since $\int_0^1\,g(x)\,\text{d}x=0$ and $\int_0^1\,x\,g(x)\,\text{d}x=0$, we have $$\int_0^1\,x^2\,g(x)\,\text{d}x=\int_0^1\,\left(x^2-x+\frac{1}{6}\right)\,g(x)\,\text{d}x\leq\int_0^1\,\left|x^2-x+\frac{1}{6}\right|\,\big|g(x)\big|\,\text{d}x\,.$$ By the Cauchy-Schwarz Inequality, $$\int_0^1\,x^2\,g(x)\,\text{d}x\leq\int_0^1\,\left|x^2-x+\frac{1}{6}\right|\,\big|g(x)\big|\,\text{d}x \leq \sqrt{\int_0^1\,\left|x^2-x+\frac{1}{6}\right|^2\,\text{d}x}\sqrt{\int_0^1\,\big|g(x)\big|^2\,\text{d}x}\,.$$ From $\int_0^1\,\big|g(x)\big|^2\,\text{d}x=1$, we conclude that $$\int_0^1\,x^2\,g(x)\,\text{d}x\leq \sqrt{\int_0^1\,\left(x^2-x+\frac{1}{6}\right)^2\,\text{d}x}=+\frac{1}{6\sqrt{5}}\,.$$ The equality holds if and only if $g(x)=+6\sqrt{5}\left(x^2-x+\frac{1}{6}\right)=+\sqrt{5}\left(6x^2-6x+1\right)$ for almost every $x\in[0,1]$ (which coincidentally satisfies all three required conditions).

Similarly, $\int_0^1\,x^2\,g(x)\,\text{d}x\geq-\frac{1}{6\sqrt{5}}$. The inequality becomes an equality if and only if $g(x)=-6\left(x^2-x+\frac{1}{6}\right)=-\sqrt{5}\left(6x^2-6x+1\right)$ for almost every $x\in[0,1]$.

How did I find $f(x)=x^2-x+\frac{1}{6}$?

Well, I wanted a quadratic function $f(x)=x^2+ax+b$ for $x\in[0,1]$ such that $\int_0^1\,f(x)\,\text{d}x=0$ and $\int_0^1\,x\,f(x)\,\text{d}x=0$. Hence, I had to solve the simultaneous system of equations $\frac{1}{3}+\frac{1}{2}a+b=0$ and $\frac{1}{4}+\frac{1}{3}a+\frac{1}{2}b=0$, which would give $a=-1$ and $b=\frac{1}{6}$.

0
On

The domain of "all functions" seems a little too broad here. I think we should restrict ourselves to functions in $L^2[0, 1]$, so at least we may work within a Hilbert space.

Notice that $\phi : f \mapsto \int_0^1 x^2 f(x) \mathrm{d}x = \langle f(x), x^2 \rangle$ is a bounded linear functional, mapping $L^2[0, 1] \rightarrow \mathbb{R}$. We want to maximise $\phi$ on the unit ball, restricted to the orthogonal complement of $\lbrace 1, x \rbrace$.

Now, $V = \lbrace 1, x \rbrace^\perp$ is a Hilbert Space itself, and $\phi\rvert_V$ is still a bounded linear functional. By the Riesz Representation Theorem, there ought to be some $f \in V$ such that $\phi(g) = \langle g, f \rangle = \int_0^1 f(x)g(x) \mathrm{d}x$ for all $g \in V$. We need to find this $f$. Note that $f(x) = x^2$ will not do, since $x^2 \notin V$.

To find $f$, all we need to do is apply Gram-Schmidt to $1, x, x^2$. I can't be bothered doing all the integrals, but your third polynomial should be a quadratic, that is, in the form $ax^2 + bx + c$ for some (potentially horrible) $a, b, c$. Take this quadratic, and scale it by $1/a$ (equivalently, while performing Gram-Schmidt, do not scale the final polynomial, so that it remains monic). This resulting monic quadratic is the $f$ you're looking for.

Why? Certainly $f$ is perpendicular to $1$ and $x$, by the Gram-Schmidt construction. Moreover, it has the form $f(x) = x^2 + bx + c$, so for any $g$ that is perpendicular to $1$ and $x$, we have, $$\langle g, f \rangle = \int_0^1 g(x)(x^2 + bx + c) \mathrm{d}x = \int_0^1 x^2g(x) \mathrm{d}x + b \int_0^1 x g(x) \mathrm{d}x + c \int_0^1 g(x) \mathrm{d}x,$$ but the final two integrals are $0$, since $g \in V$. So, for $g \in V$, we have, $$\phi(g) = \int_0^1 x^2g(x) \mathrm{d}x = \langle g, f \rangle,$$ as needed.

Now, finally, for the optimisation. The maximum value on the unit ball of $\phi(\cdot) = \langle \cdot, f \rangle$ is achieved at the unit vector $f/\|f\|$, with a maximum value of $\|f\|$. This should be easy to calculate, given $f$.

2
On

Perform the Gram-Schmidt process on $\{1,x,x^{2},\cdots\}$ to obtain an orthonormal sequence of polynomials $\{p_0,p_1,p_2,\cdots\}$, where $p_n$ is a polynomial of order $n$. Note that $p_n$ is orthogonal to $1,x,\cdots,x^{n-1}$. This sequence must be a complete orthonormal sequence because the polynomials are dense in $L^{2}[0,1]$.

If $g$ is a unit vector in $L^{2}$ for which $(g,x^{2})$ is maximized and $(g,x)=(g,1)=0$, then $$ g = \sum_{k=0}^{\infty}(g,p_k)p_k=\sum_{k=2}^{\infty}(g,p_k)p_k, \\ 1=\|g\|^{2}=\sum_{k=2}^{\infty}|(g,p_k)|^{2} \\ (g,x^{2})=\sum_{n=2}^{\infty}(g,p_k)(p_k,x^{2})=(g,p_2)(p_2,x^{2}). $$ It follows that $(g,x^{2})$ is maximized when $g=p_2$ or $g=-p_2$, and that maximum value is $|(p_2,x^{2})|$. This is because $|(g,p_2)| \le \|g\|\|p_2\|=1$ and $(p_2,p_2)=1$. Hence, $p_2$ is determined by Gram-Schmidt: \begin{align} p_0 &= 1,\\ p_1 &= \frac{x-(x,1)1}{\|x-(x,1)1\|} =\frac{x-1/2}{\|x-1/2\|}=2\sqrt{3}(x-1/2)\\ \pm g=p_2 &= \frac{x^{2}-(x^{2},p_1)p_1-(x^{2},p_0)p_0}{\|x^{2}-(x^{2},p_1)p_1-(x^{2},p_0)p_0\|} \\ & = \frac{x^{2}-12\int_{0}^{1}y^{2}(y-1/2)dy(x-1/2)-\int_{0}^{1}y^{2}dy}{\|x^{2}-12\int_{0}^{1}y^{2}(y-1/2)dy(x-1/2)-\int_{0}^{1}y^{2}dy\|} \\ % & = \frac{x^{2}-12(1/4-1/6)(x-1/2)-1/3}{\|x^{2}-12(1/4-1/6)(x-1/2)-1/3\|} \\ % & = \frac{x^{2}-(x-1/2)-1/3}{\|x^{2}-(x-1/2)-1/3\|} & =\frac{x^{2}-x+1/6}{\|x^{2}-x+1/6\|}. \end{align} Because $$ (p_2,x^{2})=\frac{(x^{2}-x+1/6,x^{2})}{\|x^{2}-x+1/6\|}=\frac{1/5-1/4+1/18}{\|x^{2}-x+1/6\|} > 0, $$ then $g=\|p_2\|^{-1}p_2$ maximizes $(g,x^{2})$ subject to $(g,1)=(g,x)=0$.