# Math Help - Least Squares Parabola

1. ## Least Squares Parabola

Hi all

I have been trying to find the values of the coefficients for the least squares parabola:

y = a + bx + cx^2

I have taken partial derivatives wrt a, b, c and now have three equations, but I don't know what to do next...any suggestions? Have you solved this before?

thank you very much!!

2. ## Re: Least Squares Parabola

$S=\sum_{i=1}^{n}(y_{i}-a-bx_{i}-cx_{i}^{2})^{2}.$

Differentiate $S$ partially wrt $a,b$ and $c,$ equate each derivative to zero and solve the resulting equations.

3. ## Re: Least Squares Parabola

Hi

Thank you for response. I am try to show that a,b,c are minimization. I took derivatives of proper equation wrt a,b,c set to zero but now am unsure of how to solve for a,b,c explicit

Thank you very much

4. ## Re: Least Squares Parabola

The equation that you should be differentiating is the one for $S.$

Differentiating wrt $a$ gives you

$\frac{\partial S}{\partial a}=-2\sum_{i=1}^{n}(y_{i}-a-bx_{i}-cx^{2}_{i})$

and on putting this equal to zero this can be rewritten as

$\sum_{i=1}^{n} y_{i}=an+b\sum_{i=1}^{n} x_{i}+c\sum_{i=1}^{n} x_{i}^{2}$

The summations are taken over the $n$ data points and will therefore be numbers.

Differentiate to find the other two equations and then solve them simultaneously for $a,b$ and $c.$

BTW, do not double post. The response that you are getting from your other posting is an alternative method, they produce the same end result.

5. ## Re: Least Squares Parabola

Originally Posted by BobP
The equation that you should be differentiating is the one for $S.$

Differentiating wrt $a$ gives you

$\frac{\partial S}{\partial a}=-2\sum_{i=1}^{n}(y_{i}-a-bx_{i}-cx^{2}_{i})$

and on putting this equal to zero this can be rewritten as

$\sum_{i=1}^{n} y_{i}=an+b\sum_{i=1}^{n} x_{i}+c\sum_{i=1}^{n} x_{i}^{2}$

The summations are taken over the $n$ data points and will therefore be numbers.

Differentiate to find the other two equations and then solve them simultaneously for $a,b$ and $c.$

BTW, do not double post. The response that you are getting from your other posting is an alternative method, they produce the same end result.
Much quicker than this method by the way...

6. ## Re: Least Squares Parabola

Hello
Subtract multiples of the first equation from the second and third equations to eliminate $a,$ say, from both of them, then take a multiple of one of the new equations from the other to eliminate $b.$
That allows you to calculate $c$ and you can back substitute to calculate $b$ and $a.$