- #1
soopo
- 225
- 0
Homework Statement
We have the following x, y values
x ||| y
1.0 -0.15
1.5 0.24
2.0 0.68
2.5 1.04
3.0 1.21
3.5 1.15
4.0 0.86
4.5 0.41
5.0 -0.08
How can you find the equation
[tex]y(x) = ax^2 + bx + c[/tex]
by least squares?
The Attempt at a Solution
I know how to calculate the equation for a line by solving
Ax = b
taking transposes of A at the both sides
[tex]A^TAx = A^Tb[/tex]
and then solving for x.
My second attempt
I made a 9 x 3 matrix for A where the first two columns are ones, 3 x 1 for x and 9 x 1 for b.
However, I get a singular matrix for
[tex]A^TA.[/tex]
Apparently, my method is not right.
I could make 3 equations such as
y(0), y(1) and y(2)
and solve for a, b and c.
However, I see that the method is not least squares and also rather inaccurate, since
not all points are considered.
Last edited: