From Wikibooks, open books for an open world
Template:Landmark Page
∀
n
∈
N
:
∑
i
=
1
n
i
2
=
n
(
n
+
1
)
(
2
n
+
1
)
6
{\displaystyle \displaystyle \forall n\in \mathbb {N} :\sum _{i\mathop {=} 1}^{n}i^{2}={\frac {n(n+1)(2n+1)}{6}}}
{{:proofwiki:Sum of Sequence of Squares/Proof by Induction}}
{{:proofwiki:Sum of Sequence of Squares/Proof by Products of Consecutive Integers}}
{{:proofwiki:Sum of Sequence of Squares/Proof by Telescoping Series}}
File:Sum of Sequences of Squares.jpg
We can observe from the above diagram that:
∀
n
∈
N
:
∑
i
=
1
n
i
2
=
∑
i
=
1
n
(
∑
j
=
i
n
j
)
{\displaystyle \displaystyle \forall n\in \mathbb {N} :\sum _{i\mathop {=} 1}^{n}i^{2}=\sum _{i\mathop {=} 1}^{n}\left({\sum _{j\mathop {=} i}^{n}j}\right)}
Therefore we have:
∑
i
=
1
n
i
2
=
∑
i
=
1
n
(
∑
j
=
i
n
j
)
=
∑
i
=
1
n
(
∑
j
=
1
n
j
−
∑
j
=
1
i
−
1
j
)
=
∑
i
=
1
n
(
n
(
n
+
1
)
2
−
i
(
i
−
1
)
2
)
⟹
2
∑
i
=
1
n
i
2
=
n
2
(
n
+
1
)
−
∑
i
=
1
n
i
2
+
∑
i
=
1
n
i
⟹
3
∑
i
=
1
n
i
2
=
n
2
(
n
+
1
)
+
∑
i
=
1
n
i
⟹
3
∑
i
=
1
n
i
2
=
n
2
(
n
+
1
)
+
n
(
n
+
1
)
2
[[Closed Form for Triangular Numbers]]
⟹
6
∑
i
=
1
n
i
2
=
2
n
2
(
n
+
1
)
+
n
(
n
+
1
)
=
n
(
n
+
1
)
(
2
n
+
1
)
⟹
∑
i
=
1
n
i
2
=
n
(
n
+
1
)
(
2
n
+
1
)
6
{\displaystyle {\begin{array}{rrl}&\displaystyle \sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle =\sum _{i\mathop {=} 1}^{n}\left({\sum _{j\mathop {=} i}^{n}j}\right)\\&&\displaystyle =\sum _{i\mathop {=} 1}^{n}\left({\sum _{j\mathop {=} 1}^{n}j-\sum _{j\mathop {=} 1}^{i-1}j}\right)\\&&\displaystyle =\sum _{i\mathop {=} 1}^{n}\left({{\frac {n\left({n+1}\right)}{2}}-{\frac {i\left({i-1}\right)}{2}}}\right)\\\implies &\displaystyle 2\sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle =n^{2}\left({n+1}\right)-\sum _{i\mathop {=} 1}^{n}i^{2}+\sum _{i\mathop {=} 1}^{n}i\\\implies &\displaystyle 3\sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle =n^{2}\left({n+1}\right)+\sum _{i\mathop {=} 1}^{n}i\\\implies &\displaystyle 3\sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle =n^{2}\left({n+1}\right)+{\frac {n\left({n+1}\right)}{2}}&{\text{[[Closed Form for Triangular Numbers]]}}\\\implies &\displaystyle 6\sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle =2n^{2}\left({n+1}\right)+n\left({n+1}\right)\\&&\displaystyle =n\left({n+1}\right)\left({2n+1}\right)\\\implies &\displaystyle \sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle ={\frac {n\left({n+1}\right)\left({2n+1}\right)}{6}}\\\end{array}}}
Template:Qed
∑
i
=
1
n
(
(
i
+
1
)
3
−
i
3
)
=
∑
i
=
1
n
(
i
3
+
3
i
2
+
3
i
+
1
−
i
3
)
[[Binomial Theorem]]
=
∑
i
=
1
n
(
3
i
2
+
3
i
+
1
)
=
3
∑
i
=
1
n
i
2
+
3
∑
i
=
1
n
i
+
∑
i
=
1
n
1
[[Summation is Linear]]
=
3
∑
i
=
1
n
i
2
+
3
n
(
n
+
1
)
2
+
n
[[Closed Form for Triangular Numbers]]
{\displaystyle {\begin{aligned}\sum _{i\mathop {=} 1}^{n}\left({\left({i+1}\right)^{3}-i^{3}}\right)&=\sum _{i\mathop {=} 1}^{n}\left({i^{3}+3i^{2}+3i+1-i^{3}}\right)&{\text{[[Binomial Theorem]]}}\\&=\sum _{i\mathop {=} 1}^{n}\left({3i^{2}+3i+1}\right)\\&=3\sum _{i\mathop {=} 1}^{n}i^{2}+3\sum _{i\mathop {=} 1}^{n}i+\sum _{i\mathop {=} 1}^{n}1&{\text{[[Summation is Linear]]}}\\&=3\sum _{i\mathop {=} 1}^{n}i^{2}+3{\frac {n\left({n+1}\right)}{2}}+n&{\text{[[Closed Form for Triangular Numbers]]}}\\\end{aligned}}}
On the other hand:
∑
i
=
1
n
(
(
i
+
1
)
3
−
i
3
)
=
(
n
+
1
)
3
−
n
3
+
n
3
−
(
n
−
1
)
3
+
(
n
−
1
)
3
−
⋯
+
2
3
−
1
3
Definition of [[Definition:Summation!Summation]]
=
(
n
+
1
)
3
−
1
3
[[Telescoping Series/Example 2!Telescoping Series: Example 2]]
=
n
3
+
3
n
2
+
3
n
+
1
−
1
[[Binomial Theorem]]
=
n
3
+
3
n
2
+
3
n
{\displaystyle {\begin{aligned}\sum _{i\mathop {=} 1}^{n}\left({\left({i+1}\right)^{3}-i^{3}}\right)&=\left({n+1}\right)^{3}-n^{3}+n^{3}-\left({n-1}\right)^{3}+\left({n-1}\right)^{3}-\cdots +2^{3}-1^{3}&{\text{Definition of [[Definition:Summation!Summation]]}}\\&=\left({n+1}\right)^{3}-1^{3}&{\text{[[Telescoping Series/Example 2!Telescoping Series: Example 2]]}}\\&=n^{3}+3n^{2}+3n+1-1&{\text{[[Binomial Theorem]]}}\\&=n^{3}+3n^{2}+3n\\\end{aligned}}}
Therefore:
3
∑
i
=
1
n
i
2
+
3
n
(
n
+
1
)
2
+
n
=
n
3
+
3
n
2
+
3
n
⟹
3
∑
i
=
1
n
i
2
=
n
3
+
3
n
2
+
3
n
−
3
n
(
n
+
1
)
2
−
n
{\displaystyle {\begin{array}{rrl}&\displaystyle 3\sum _{i\mathop {=} 1}^{n}i^{2}+3{\frac {n\left({n+1}\right)}{2}}+n&\displaystyle =n^{3}+3n^{2}+3n\\\implies &\displaystyle 3\sum _{i\mathop {=} 1}^{n}i^{2}&\displaystyle =n^{3}+3n^{2}+3n-3{\frac {n\left({n+1}\right)}{2}}-n\\\end{array}}}
Therefore:
∑
i
=
1
n
i
2
=
1
3
(
n
3
+
3
n
2
+
3
n
−
3
n
(
n
+
1
)
2
−
n
)
=
1
3
(
n
3
+
3
n
2
+
3
n
−
3
n
2
2
−
3
n
2
−
n
)
=
1
3
(
n
3
+
3
n
2
2
+
n
2
)
=
1
6
n
(
2
n
2
+
3
n
+
1
)
=
1
6
n
(
n
+
1
)
(
2
n
+
1
)
{\displaystyle {\begin{aligned}\sum _{i\mathop {=} 1}^{n}i^{2}&={\frac {1}{3}}\left({n^{3}+3n^{2}+3n-3{\frac {n\left({n+1}\right)}{2}}-n}\right)\\&={\frac {1}{3}}\left({n^{3}+3n^{2}+3n-{\frac {3n^{2}}{2}}-{\frac {3n}{2}}-n}\right)\\&={\frac {1}{3}}\left({n^{3}+{\frac {3n^{2}}{2}}+{\frac {n}{2}}}\right)\\&={\frac {1}{6}}n\left({2n^{2}+3n+1}\right)\\&={\frac {1}{6}}n\left({n+1}\right)\left({2n+1}\right)\\\end{aligned}}}
Template:Qed
{{:proofwiki:Sum of Sequence of Squares/Proof by Binomial Coefficients}}
{{:proofwiki:Sum of Sequence of Squares/Proof using Bernoulli Numbers}}
{{:proofwiki:Sum of Sequence of Squares/Historical Note}}