For the three measurements b=0, 3, 12 at times t=0, 1, 2 find the best parabola y=C+Dt+E$t^2$

46 Views Asked by At

So I know how to do least squares regression using matrices to solve for Ax=b. I simply do $A^TAx=A^Tb$. However I don't really know how to account for the second power in a typical parabola equation. Should I just use Lagrangian interpolation or is there something simpler?

1

There are 1 best solutions below

0
On

There's something simpler: you want to find $C, D, E$, each of which appears linearly. The first and 2nd equation are:

$$ 1C + 0D + 0^2 E = 0\\ 1 C + 3D + 3^2 E = 3 $$ You can fill in the third. This gives you a matrix equation that looks like $$ \begin{bmatrix} 1 & 0 & 0 \\ 1 & 3 & 3^2 \\ * & * & * \end{bmatrix} \begin{bmatrix} C\\D\\E \end{bmatrix} = \begin{bmatrix} 0\\3\\12 \end{bmatrix} $$ which you can now solve for $C,D,E$.

By the way, in inverting the $3 \times 3$ matrix, you're more or less doing Lagrange interpolation in disguise. But if you had, say, 5 known points, perhaps with some error, then you'd have a $5 \times 3$ matrix, a 3-vec of unknowns, and a 5-vec of results. That's overdetermined, but you can use the pseudoinverse to find a pretty good solution, and that's actually fundamentally different from Lagrance interpolation.