Proof for Sum of squares of first n natural,even,odd numbers - pending

 


We want to prove:

k=1nk2=n(n+1)(2n+1)6\sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}

Method1: Polynomial Assumption and Coefficient Matching

The idea is to assume that the sum of squares is a cubic polynomial in nn:

k=1nk2=An3+Bn2+Cn+D\sum_{k=1}^{n} k^2 = An^3 + Bn^2 + Cn + D

But since k=10k2=0\sum_{k=1}^0 k^2 = 0, we know that when n=0n = 0, the sum is 0 ⇒ D=0D = 0.

So we assume:

k=1nk2=An3+Bn2+Cn\sum_{k=1}^{n} k^2 = An^3 + Bn^2 + Cn

Now compute the sum for small values of nn:

  • n=1n = 1:

    12=A(1)3+B(1)2+C(1)=A+B+CA+B+C=1(1)1^2 = A(1)^3 + B(1)^2 + C(1) = A + B + C \Rightarrow A + B + C = 1 \tag{1}
  • n=2n = 2:

    12+22=1+4=58A+4B+2C=5(2)1^2 + 2^2 = 1 + 4 = 5 \Rightarrow 8A + 4B + 2C = 5 \tag{2}
  • n=3n = 3:

    12+22+32=1+4+9=1427A+9B+3C=14(3)1^2 + 2^2 + 3^2 = 1 + 4 + 9 = 14 \Rightarrow 27A + 9B + 3C = 14 \tag{3}

Solving the system of equations

From (1):

A+B+C=1A + B + C = 1

From (2):

8A+4B+2C=58A + 4B + 2C = 5

From (3):

27A+9B+3C=1427A + 9B + 3C = 14

Step 1: Eliminate C

Multiply (1) by 2:

2A+2B+2C=22A + 2B + 2C = 2

Subtract from (2):

(8A+4B+2C)(2A+2B+2C)=526A+2B=3(4)(8A + 4B + 2C) - (2A + 2B + 2C) = 5 - 2 \Rightarrow 6A + 2B = 3 \tag{4}

Multiply (1) by 3:

3A+3B+3C=33A + 3B + 3C = 3

Subtract from (3):

(27A+9B+3C)(3A+3B+3C)=14324A+6B=11(5)(27A + 9B + 3C) - (3A + 3B + 3C) = 14 - 3 \Rightarrow 24A + 6B = 11 \tag{5}

Step 2: Solve equations (4) and (5)

From (4):

6A+2B=33A+B=1.5(6)6A + 2B = 3 \Rightarrow 3A + B = 1.5 \tag{6}

From (5):

24A+6B=114A+B=116(7)24A + 6B = 11 \Rightarrow 4A + B = \frac{11}{6} \tag{7}

Subtract (6) from (7):

(4A+B)(3A+B)=11632A=11696=26=13(4A + B) - (3A + B) = \frac{11}{6} - \frac{3}{2} \Rightarrow A = \frac{11}{6} - \frac{9}{6} = \frac{2}{6} = \frac{1}{3}

Now substitute A=13A = \frac{1}{3} into (6):

313+B=1.51+B=1.5B=0.5=123 \cdot \frac{1}{3} + B = 1.5 \Rightarrow 1 + B = 1.5 \Rightarrow B = 0.5 = \frac{1}{2}

Now substitute AA and BB into (1):

13+12+C=156+C=1C=16\frac{1}{3} + \frac{1}{2} + C = 1 \Rightarrow \frac{5}{6} + C = 1 \Rightarrow C = \frac{1}{6}

Final Formula

k=1nk2=An3+Bn2+Cn=13n3+12n2+16n\sum_{k=1}^{n} k^2 = An^3 + Bn^2 + Cn = \frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n

Factor:

=n(n+1)(2n+1)6= \frac{n(n+1)(2n+1)}{6}

✅ Q.E.D.



Method 2: Derivation Using Cubes

We start with the identity:

(n+1)3n3=3n2+3n+1(n+1)^3 - n^3 = 3n^2 + 3n + 1

Now, sum both sides from n=1n = 1 to n=Nn = N:

Left-hand side (LHS):

n=1N((n+1)3n3)\sum_{n=1}^N \left((n+1)^3 - n^3\right)

This is a telescoping sum:

(2313)+(3323)+(4333)++((N+1)3N3)(2^3 - 1^3) + (3^3 - 2^3) + (4^3 - 3^3) + \dots + ((N+1)^3 - N^3)

Almost everything cancels, and we're left with:

(N+1)313=(N+1)31(N+1)^3 - 1^3 = (N+1)^3 - 1


Right-hand side (RHS):

n=1N(3n2+3n+1)=3n=1Nn2+3n=1Nn+n=1N1\sum_{n=1}^N (3n^2 + 3n + 1) = 3 \sum_{n=1}^N n^2 + 3 \sum_{n=1}^N n + \sum_{n=1}^N 1

We use known formulas:

  • n=1Nn=N(N+1)2\sum_{n=1}^N n = \frac{N(N+1)}{2}

  • n=1N1=N\sum_{n=1}^N 1 = N

So,

(N+1)31=3n=1Nn2+3N(N+1)2+N(N+1)^3 - 1 = 3 \sum_{n=1}^N n^2 + 3 \cdot \frac{N(N+1)}{2} + N


Now Solve for n=1Nn2\sum_{n=1}^N n^2:

(N+1)31=3n=1Nn2+3N(N+1)2+N(N+1)^3 - 1 = 3 \sum_{n=1}^N n^2 + \frac{3N(N+1)}{2} + N

Move other terms to the left:

3n=1Nn2=(N+1)313N(N+1)2N3 \sum_{n=1}^N n^2 = (N+1)^3 - 1 - \frac{3N(N+1)}{2} - N

Now simplify the RHS:

  • (N+1)3=N3+3N2+3N+1(N+1)^3 = N^3 + 3N^2 + 3N + 1

  • So (N+1)31=N3+3N2+3N(N+1)^3 - 1 = N^3 + 3N^2 + 3N

Thus:

3n=1Nn2=N3+3N2+3N3N(N+1)2N3 \sum_{n=1}^N n^2 = N^3 + 3N^2 + 3N - \frac{3N(N+1)}{2} - N

Combine like terms:

=N3+3N2+3NN3N(N+1)2=N3+3N2+2N3N(N+1)2= N^3 + 3N^2 + 3N - N - \frac{3N(N+1)}{2} = N^3 + 3N^2 + 2N - \frac{3N(N+1)}{2}

Now write all with a common denominator:

=2N3+6N2+4N3N(N+1)2=2N3+6N2+4N3N23N2=2N3+3N2+N2= \frac{2N^3 + 6N^2 + 4N - 3N(N+1)}{2} = \frac{2N^3 + 6N^2 + 4N - 3N^2 - 3N}{2} = \frac{2N^3 + 3N^2 + N}{2}

So,

3n=1Nn2=2N3+3N2+N23 \sum_{n=1}^N n^2 = \frac{2N^3 + 3N^2 + N}{2}

Divide both sides by 3:

n=1Nn2=2N3+3N2+N6=N(N+1)(2N+1)6\sum_{n=1}^N n^2 = \frac{2N^3 + 3N^2 + N}{6} = \frac{N(N+1)(2N+1)}{6}


✅ Final Result:

k=1nk2=n(n+1)(2n+1)6\boxed{\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}}



From here, it's easy to prove for even number sum: multiply by 4.
Then subtract that from sum of first 2n numbers' squares to get the formula for odd number square sum.

Comments