Higher Degree Polynomials:
Let the general form for a polynomial of order n.
f (x) = a0 + a1 x + a2 x2 + . . . + an xn
The solution for this set of n + 1 constants a0, a1, . . . , an, we need n + 1 simultaneous equations and we need n + 1 data points. By using least square approach and Gaussian elimination technique the best fit polynomial may be evaluated.
X = A- 1 B
where all of summations are over i = 1, . . . , n data points.