So the objective of this problem is to find a (n-1)th degree polynomial for a finite set of data with n terms.
So if the set has five terms then the general equation would be
ax
4+bx
3+cx
2+dx+e=t
where x is the term number minus 1 and t is the term and a, b, c, d, e are the coefficients.
Using the example of {0, -33 , i, 27, 6}, we can substitute the values in for x and t.
(in this case we have to make the assumption that 0^0 = 1 or else everything falls apart)
0a + 0b + 0c + 0d + 1e = 0
1a + 1b + 1c + 1d + 1e = -33
16a + 8b + 4c + 2d + 1e = i
81a + 27b + 9c + 3d + 1e = 27
256a + 64b + 16c + 4d + 1e = 6
This is can be solved more easily by using matrices (really you can kinda skip to this step)
[A] =
0 | 0 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 1 |
16 | 8 | 4 | 2 | 1 |
81 | 27 | 9 | 3 | 1 |
256 | 64 | 16 | 4 | 1 |
[B] =
[C] =
(excuse my messy matrices)
So [A]*[B] = [C]
Since we already know what [A] and [C] are, we need to solve for [B]
[A]
-1*[A]*[B]=[A]
-1*[C]
[B]=[A]
-1*[C]
Multiply and you'll have your coefficients!
I know the TI-84 and the TI-Nspire CX can handle inverse matrices and I know the Nspire can handle non-real values in the matrices.
Otherwise writing algorithms for this isn't that hard to do.
It works for any length of set as long as you can calculate (n-1)
(n-1); but the calculator is often imprecise with inverse matrices.