by Guest » Sat Jul 20, 2019 8:26 am
If you are wondering about that formula for "sum of squares", there are several ways to derive it. The simplest is to recognize that the sum of powers, sum i^k for fixed k and I from 0 to n is a polynomial in n to degree k+ 1. In particular, the sum of the first n square, 1+ 4+ 9+ 16+ …+ n^2, is a cubic polynomial is n: An^3+ Bn^2+ Cn+ D. We want to determine A, B, C, and D and we need four equations to do that. When n= 0, An^3+ Bn^2+ Cn+ D= D= 0. When n= 1, An^3+ Bn^2+ Cn+ D= A+ B+ C+ D= 0+1= 1. When n= 2, An^3+ Bn^2+ Cn+ D= 8A+ 4B+ 2D+ D= 0+ 1+ 4= 5. When n= 3, An^3+ Bn^2+ Cn+ D= 27A+ 9B+ 3C+ D= 0+ 1+ 4+ 9= 14.
Since we have immediately that D= 0, we have the three equations A+ B+ C= 1, 8A+ 4B+ 2C= 5, and 27A+ 9B+ 3C= 14 to solve for A, B, and C. Multiply the first equation by 2, to get 2A+ 2B+ 2D= 2, and subtract from the second: 6A+ 2B= 3. Multiply the first equation by 3, to get 3A+ 3B+ 3C= 3, and subtract from the third: 24A+ 6B= 11. Multiply 6A+ 2B= 3 by 3, to get 18A+ 6B= 9, and subtract from 24A+ 6B= 11 to get 6A= 2 so A= 1/3. Then 6A+ 2B= 2+ 2B= 3, 2B= 1 so B= 1/2. Finally A+ B+ C= 1/3+ 1/2+ C= 5/6+ C= 1 so C= 1/6.
We have 1+ 4+ 9+ …+ n^2= (1/3)n^3+ (1/2)n^2+ (1/6)n= (1/6)(2n^3+ 3n^2+ n)= (1/6)n(2n^2+ 3n+ 1)= (1/6)n(n+ 1)(2n+ 1).