If I have a series of numbers such as 1, 4, 26, 137, how do I work out an equation that will define the function that produces it?
Watch the left-hand numbers 1,3,19,70:Code:1 4 26 137 3 22 111 19 89 70
1 + 3(n-1) + 19(n-1)(n-2) / 2! + 70(n-1)(n-2)(n-3) / 3! : see the pattern?
Simplifies to:
(70n^3 - 363n^2 + 617n - 324) / 6
You can now get next term (407) and see what it "gives":
OK?Code:1 4 26 137 407 3 22 111 270 19 89 159 70 70 0
I do agree that this function is more suited to a cubic, but if you wanted to derive a quadratic equation from a set of data, you could use Wilmer's method, or you could simply substitute points into the standard form of a quadratic, and solve for a, b, and c.