2008年6月3日 星期二

Differential between x to the power n

This is first notice by me what I was in High School,

I discover that for the sequence of x²,
1,4,9,16,25.36

Their difference is respectively:
3,5,7,9,11

The difference of their difference is:
2,2,2,2

And the difference of difference of difference is all zero. For three identical steps we reduce the sequence to zero, and the power of x is 2. It also take 2 step to arrive at identical number.

Then I tried the sequence of x³:
1,8,27,64,125,216

Their difference is respectively:
7,19,37,61

The difference of their difference is:
12,18,24

The difference of their difference of their difference is:
6,6.

So now it take 3 iterations to reduce them to equal number, and it take four iterations to zero out all differentials. Notice the power of x is 3.

It doesn’t take long for me to realize the relationship between number of iterations to reduce the differential to equal number; and the number of iterations to zero out all differential is always one more than the power of x.

Therefore we can write the expression for the powers of x:
For x², (X(3)-X(2))-(X(2)-X(1))=(X(4)-X(3))-(X(3)-X(2))
or X(3)-2X(2)+X(1)= X(4)-2X(3)+X(2)
or X(4)-3X(3)+3X(2)-X(1)=0
Thus, X(4)=3X(3)-3X(2)+X(1)

For x³, ((X(4)-X(3))-(X(3)-X(2)))-((X(3)-X(2))-(X(2)-X(1)))=((X(5)-X(4))-(X(4)-X(3)))-((X(4)-X(3))-(X(3)-X(2)))
or X(4)-3X(3)+3X(2)-X(1)=X(5)-3X(4)+3X(3)-X(2)
or X(5)-4X(4)+6X(3)-4X(2)+X(1)=0
Thus, X(5)=4X(4)-6X(3)+4X(2)-X(1)

We could thus generalize the result for the sequence of X^n,
X(n+2)=(n+1)C(1)X(n)-(n+1)C(2)X(n-1)+(n+1)C(3)X(n-2)-(n+1)C(4)X(n-3)….+(-1)^(2+n)*(n+1)C(n+1)X(1)

Now for x^6, we have
X(8)=7X(7)-21X(6)+35X(5)-35X(4)+21X(3)-7X(2)+X(1)

Therefore, we have a more convenient way to calculated x to power n if we know the terms of the sequence from n+1 consecutive. Trust me, in my mind, that was better than the calculator to calculate the power of any number to any power at that time.

However, I notice that in the n iteration that the difference between x^n is equal to n!
i.e. For x², X(3)-2X(2)+X(1)=2, so we need only last 2 of the sequence in x²
For x³, X(4)-3X(3)+3X(2)-X(1)=6, so we need only last 3 of the sequence in x³

Therefore, for x^n, X(n+1)-nC(1)X(n)+nC(2)X(n-1)-nC(3)X(n-2)+nC(4)X(n-3)….+(-1)^(1+n)*nC(n+1)X(1)=n!

沒有留言: