Here is my version of the proof that \( \sum_{i=0}^{n}i^2=\frac{1}{6}n(n+1)(2n+1) \) that I came up with earlier.
Start by writing out a few terms, then the differences, and continue until the nth differences are the same:
2, 2, 2 are the third differences, which means that the polynomial which generates the original terms is a cubic equation in the form \( an^3+bn^2+cn+d \)
Because there are 4 variables, a, b, c and d, we will need 4 equations to find the value of each of them.
When n = 1, we want the equation to equal 1 (the first term), therefore \( a(1)^3+b(1)^2+c(1)+d=a+b+c+d=1 \), so the first equation is \( a+b+c+d=1 \).
When n = 2, the equation must equal 5, so \( a(2)^3+b(2)^2+c(2)+d=8a+4b+2c+d=5 \).
When n = 3, the equation must equal 14, so \( a(3)^3+b(3)^2+c(3)+d=27a+9b+3c+d=14 \).
When n = 4, the equation must equal 30, so \( a(4)^3+b(4)^2+c(4)+d=64a+16b+4c+d=30 \).
So now we have 4 equations to work with:
1. \( a+b+c+d=1 \)
2. \( 8a+4b+2c+d=5 \)
3. \( 27a+9b+3c+d=14 \)
4. \( 64a+16b+4c+d=30 \)
Let's work with equations 1 and 2 first. Rearrange equation 1 to make d the subject, \( d=1-a-b-c \), and substitute it into equation 2, \( 8a+4b+2c+1-a-b-c=5 \), simplify and get \( 7a+3b+c=4 \). This is the first equation with only 3 variables.
Now work with equations 2 and 3. Rearrange equation 2 to make d the subject, \( d=5-8a-4b-2c \), and substitute it into equation 3, \( 27a+9b+3c+5-8a-4b-2c=14 \), simplify and get \( 19a+5b+c=9 \).
Now work with equations 3 and 4. Rearrange equation 3 to make d the subject, \( d=14-27a-9b-3c \), substitute into equation 4, \( 64a+16b+4c+14-27a-9b-3c=30 \), simplify to get, \( 37a+7b+c=16 \)
Now we have 3 equations with 3 variables:
1. \( 7a+3b+c=4 \)
2. \( 19a+5b+c=9 \)
3. \( 37a+7b+c=16 \)
Work with equations 1 and 2. Rearrange 1 to make c the subject, \( c=4-7a-3b \), substitute into 2, \( 19a+5b+4-7a-3b=9 \), simplify, \( 12a+2b=5 \) to get the first equation with only 2 variables.
Now use equations 2 and 3. Rearrange 2 to make c the subject, \( c=9-19a-5b \), substitute into 3, \( 37a+7b+9-19a-5b=16 \), simplify, \( 18a+2b=7 \).
Now we have 2 equations with 2 variables:
1. \( 12a+2b=5 \)
2. \( 18a+2b=7 \)
Rearrange equation 1 to make b the subject. Actually in this case, both equations contain the term 2b, so we can just rearrange to make 2b the subject. \( 2b=5-12a \), substitute into 2, \( 18a+5-12a=7 \), simplify, \( 6a+5=7 \), solve for a, \( 6a=2 \), \( a=\frac{1}{3} \).
Now that we know the value of one of the variables, we can substitute this value into equation 1 containing 2 variables, \( 12(\frac{1}{3})+2b=5 \), \( 4+2b=5 \), \( 2b=1 \), \( b=\frac{1}{2} \).
Now that 2 variables are known, substitute both values into equation 1 containing 3 variables, \( 7(\frac{1}{3})+3(\frac{1}{2})+c=4 \), \( \frac{7}{3}+\frac{3}{2}+c=4 \), \( c=4-\frac{7}{3}-\frac{3}{2} \), \( c=\frac{1}{6} \).
Finally, substitute all 3 values into equation 1 containing 4 variables. \( \frac{1}{3}+\frac{1}{2}+\frac{1}{6}+d=1 \), \( d=1-\frac{1}{3}-\frac{1}{2}-\frac{1}{6} \), \( d=0 \).
All variables are now known, so the final equation is:
\( \frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6} \)
\( \frac{1}{6}(2n^3+3n^2+n) \)
\( \frac{1}{6}n(2n^2+3n+1) \)
\( \frac{1}{6}n(n+1)(2n+1) \)
Therefore \( \sum_{i=0}^{n}i^2=\frac{1}{6}n(n+1)(2n+1) \)
Q.E.D.