## 每週問題 December 24, 2012

Let $C[0,1]$ be the continuous functions on the interval $[0,1]$ with the inner product defined by

$\left\langle f,g\right\rangle=\displaystyle\int_0^1f(x)g(x)dx$.

Find the closest straight line to $f(x)=x^2$ over $0\le x\le 1$.

$\mathbf{p}=x^2$$\mathbf{v}_1 = 1$$\mathbf{v}_2 = x$，最近似直線 $g(x) = c_1 + c_2x$ 滿足下列正規方程式 (normal equation)：

\begin{aligned} \left\langle \mathbf{v}_1, \mathbf{p} - c_1\mathbf{v}_1 - c_2\mathbf{v}_2\right\rangle &= 0\\ \left\langle \mathbf{v}_2, \mathbf{p}- c_1\mathbf{v}_1 - c_2\mathbf{v}_2\right\rangle &= 0.\end{aligned}

$\begin{bmatrix} \left\langle \mathbf{v}_1, \mathbf{v}_1\right\rangle & \left\langle \mathbf{v}_1, \mathbf{v}_2\right\rangle\\ \left\langle \mathbf{v}_2, \mathbf{v}_1\right\rangle & \left\langle \mathbf{v}_2, \mathbf{v}_2\right\rangle \end{bmatrix}\begin{bmatrix} c_1\\ c_2 \end{bmatrix}=\begin{bmatrix} \left\langle \mathbf{v}_1, \mathbf{p}\right\rangle \\ \left\langle \mathbf{v}_2, \mathbf{p}\right\rangle \end{bmatrix}$

$\begin{bmatrix} 1&\frac{1}{2}\\[0.3em] \frac{1}{2}&\frac{1}{3} \end{bmatrix}\begin{bmatrix} c_1\\ c_2 \end{bmatrix}=\begin{bmatrix} \frac{1}{3}\\[0.3em] \frac{1}{4} \end{bmatrix}$

PowSol-Dec-24-12