interpolate 3
Foufou,
The equation for a quadratic is y = a + bx + cx^2
Suppose the tree points are
x=1, y=1
x=2, y=3
x=3, y=4
Evaluationg the quadratic equation at these three points yields
Eq 1: 1 = a + b + c
Eq 2: 3 = a + 2b + 4c
Eq 3: 4 = a + 3b + 9c
You have three equations in 3 unknowns. Solve for a, b, c.
There are several ways to do this: Detrminants, Gaussian elimination, etc.
Here is one way:
subtracting eq 1 from eq 2 yields
b-+3c = 2
Eq A: b = 2-3c
replace b by (2-3c) in eq 1
Eq C: a-c = -1
replace by (2-3c) in eq 2
Eq D: a-2c = -3
Subtract Eq B from eq A
c = -2
Sustitute -2 for c in Eq A
b = 8
Substitute c = -2, b= 8 into equation 1
1 = a + 8 -2
a = -5
So the quadratic equation is
***** y = -5 +8x -2x^2 *****
There are many math packages that will do this for you, including
. MatCad
. MATLAB
Also, see any book on linear algebra.
Regards,
Kral
Added after 2 minutes:
There are several typos in my reply. The most important is "MatCad" should be "MathCad.