Fit a quadratic function of the form ????(????)=c0+c1????+c2????2f(t)=c0+c1t+c2t2 to the data points (0,10)(0,10), (1,6)(1,6), (2,26)(2,26), (3,30)(3,30), using least squares.

Respuesta :

Answer:

Therefore the quadratic function is

[tex]f(x=\frac{19}{2}+\frac{17}{2}t -\frac12 t^2[/tex]

Step-by-step explanation:

We want find a quadratic function

[tex]f(t)=c_0+c_1t+c_2t^2[/tex]

such that, f(0)=10, f(1)=16, f(2)=26, f(3)=30

These conditions gives the following system of linear equations

[tex]c_0+0.c_1+0.c_2=10[/tex]

[tex]c_0+1.c_1+1.c_2=16[/tex]

[tex]c_0+2.c_1+4.c_2=26[/tex]

[tex]c_0+3.c_1+9.c_2=30[/tex]

Let

[tex]A=\left[\begin{array}{ccc}1&0&0\\1&1&1\\1&2&4\\1&3&9\end{array}\right][/tex],  [tex]\vec x= \left[\begin{array}{c}c_0\\c_1\\c_2\end{array}\right][/tex]    and   [tex]\vec b=\left[\begin{array}{ccc}10\\16\\26\\30\end{array}\right][/tex]

The unique least square solution is [tex]A\vec x=\vec b[/tex]

[tex]\vec x= (A^TA)^{-1}A^T \vec b[/tex]

[tex]\left[\begin{array}{c}c_0\\c_1\\c_2\end{array}\right]=\left(\left[\begin{array}{cccc}1&1&1&1\\0&1&2&3\\0&1&4&9\end{array}\right] \left[\begin{array}{ccc}1&0&0\\1&1&1\\1&2&4\\1&3&9\end{array}\right]\right)^{-1}\left[\begin{array}{cccc}1&1&1&1\\0&1&2&3\\0&1&4&9\end{array}\right]\left[\begin{array}{ccc}10\\16\\26\\30\end{array}\right][/tex]

[tex]\left[\begin{array}{c}c_0\\c_1\\c_2\end{array}\right]=\left(\left[\begin{array}{ccc}4&6&14\\6&14&36\\14&36&98\end{array}\right] \right)^{-1}\left[\begin{array}{cccc}1&1&1&1\\0&1&2&3\\0&1&4&9\end{array}\right] \left[\begin{array}{ccc}10\\16\\26\\30\end{array}\right][/tex]

[tex]\left[\begin{array}{c}c_0\\c_1\\c_2\end{array}\right]=\left[\begin{array}{ccc}\frac{19}{20}&-\frac{21}{20}&\frac14 \\ \\-\frac{21}{20}&\frac{49}{20}&-\frac{3}{4}\\ \\ \frac14&-\frac34& \frac14 \end{array}\right] \left[\begin{array}{cccc}1&1&1&1\\0&1&2&3\\0&1&4&9\end{array}\right] \left[\begin{array}{ccc}10\\16\\26\\30\end{array}\right][/tex]

[tex]\left[\begin{array}{c}c_0\\c_1\\c_2\end{array}\right]= \left[\begin{array}{c}\frac{19}{2}\\ \\\frac{17}{2}\\ \\-\frac12\end{array}\right][/tex]

Therefore [tex]c_0 = \frac{19}{2}[/tex],  [tex]c_1=\frac{17}{2}[/tex] and [tex]c_2=-\frac12[/tex].

Therefore the quadratic function is

[tex]f(x=\frac{19}{2}+\frac{17}{2}t -\frac12 t^2[/tex]