Least squares in polynomial space

functional-analysisleast squareslinear algebra

Problem.
Use linear algebra to find $f(x) \in \mathcal{P}_2(\mathbb{R}) = \{ f \in \mathbb{R}[x] \mid \text{deg}(f) \leq 2\}$ such that $f'(0) = 0$ and $f(x)$ minimizes $$\int_0^1 (2x – f(x))^2 dx.$$


This problem came up on my qualifying exam, and I would like to understand it. It looks suspiciously like a least squares problem, wherein we attempt to minimize $\| b – Ax \|$ for some overdetermined system of equations $A$. Driving my suspicion is the fact that I recognize that the integral is the $L^2$ norm. So $2x$ could be serving the role of $b$, and $f(x)$ would be serving the role of $Ax$. One more fact I think I have gathered is that the condition $f'(0) = 0$ means that $f(x)$ will be of the form $f(x) = ax^2 + 0x + b$. If this is a least squares problem, then I think the solution is found by simply solving $A^* b = 0$, though I will need to do more research to be sure.

So if all of the above is correct, then I am struggling to understand what $A$ and $x$ are in this problem. In particular, how does $f(x) = ax^2 + b$ represent an overdetermined system of equations $A$ multiplied by some vector $x$?

Best Answer

You can think of $W= (\mathcal{P}_2(\mathbb{R}), \langle \cdot , \cdot \rangle _{L^2})$ as an inner product space, with $$ \langle p_1, p_2\rangle _{L^2} = \int_0^1 p_1(x) p_2(x) dx.$$

Then $V = \{ f\in \mathcal P_2 (\mathbb R): f'(0) = 0\} = \{ ax^2 + b : a, b\in \mathbb R\}$ is a 2-dimensional subspace in $W$ and $2x$ is in $W$ but not in $V$. Now you want to find $f\in V$ closest to $2x$. Then this element should be $(2x)^\top$, where $(\cdot)^\top$ is the othogonal projection $W \to V$.

The rest are simple linear algebra: pick any orthonormal basis of $V$, say $$\left\{1, \frac{\sqrt 5}{2} (3x^2-1)\right\},$$ then

\begin{align} (2x)^\top &= \langle 2x, 1\rangle_{L^2} 1 + \left\langle 2x, \frac{\sqrt 5}{2} (3x^2-1) \right\rangle _{L^2} \frac{\sqrt 5}{2} (3x^2-1) \\ &= 1 + \frac{5}{4} \langle 2x, 3x^2-1\rangle_{L^2} \ (3x^2-1) \\ &= 1 + \frac{5}{8}(3x^2-1). \end{align}

Related Question