[Math] Find the 2nd-degree polynomial that approximates with the method of the least squares the:$f(x)=\frac{1}{10}x^2-2x+10$

approximationorthogonal-polynomialspolynomials

It is known that a rectangular set of polynomials $\phi_k(x), k=0,1,\cdots,n$ for each $x\in[a,b]$ as to a weight function $w(x)$ can be constructed with the use of the following recursive type (Gram-Schmidt process):

$\phi_0(x)=1$

$\phi_1(x)=x- a_0$, where $a_0=\frac{(x\phi_0, \phi_0)}{(\phi_0,\phi_0)}$

and

$\phi_{k+1}(x)=(x-a_k)\phi_k(x)-\beta_k\phi_{k-1}(x),
k=1,2,\cdots,n-1$,

where $a_k=\frac{(x\phi_k, \phi_k)}{(\phi_k,\phi_k)}$, and $b_k=\frac{(x\phi_k, \phi_{k-1})}{(\phi_{k-1},\phi_{k-1})}$.

Using the Gram-Schmidt process above to find: the second-degree polynomial $p_2(x)$ that approximates with the method of the least squares the
$f(x)=\frac{1}{10}x^2-2x+10$

in points $(x_i,f_i), i=1,2,\cdots,6$

with $x_i=10+\frac{i-1}{5}$, $f_i=f(x_i)$ and $w(x)=1.$

Best Answer

First make a table of your data. $$\begin {array}{r|r|r} i&x_i&f(x_i)\\ \hline 1&10&0\\2&10.2&0.004\\3&10.4&0.016\\4&10.6&0.036\\5&10.8&0.064\\6&11&0.1 \end {array}$$ Then, as the instructions say, $\phi_0=1$ and $\phi_1=x-\frac {(x\phi_0,\phi_0)}{\phi_0,\phi_0}=x-\frac {(x,1)}{(1,1)}$ The terms in parentheses are sums over the products at the points. So $(x,1)=10*1+10.2*1+\ldots 11*1=63, (1,1)=6$, which gives $\phi_1(x)=x-10.5$. Now you need to find $\phi_2$, which will be a quadratic.
Then you can express $f(x)=a_0\phi_0+a_1\phi_1+a_2\phi_2$ You can either find the $a$'s by expanding out the right side and equating like coefficients of $x$, or use the orthogonality to write $a_i=\frac {(f(x_i),\phi_i)}{(\phi_i,\phi_i)}$

Related Question