12

Problem: Prove that $1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ for $n \in \mathbb{N}$.

My work: So I think I have to do a proof by induction and I just wanted some help editing my proof.

My attempt:

Let $P(n)=1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ for $n \in \mathbb{N}$. Then $$P(1)=1^2=\frac{1(1+1)(2+1)}{6}$$ $$1=\frac{6}{6}.$$ So $P(1)$ is true.

Next suppose that $P(k)=1^2+2^2+\cdots+k^2=\frac{k(k+1)(2k+1)}{6}$ for $k \in \mathbb{N}$. Then adding $(k+1)^2$ to both sides of $P(k)$ we obtain the following: $$1^2+2^2+\cdots+k^2+(k+1)^2=\frac{k(k+1)(2k+1)}{6}+(k+1)^2$$ $$=\frac{2k^3+3k^2+k+6(k^2+2k+1)}{6}$$ $$=\frac{2k^3+9k^2+13k+6}{6}$$ $$=\frac{(k^2+3k+2)(2k+3)}{6}$$ $$=\frac{(k+1)(k+2)(2k+3)}{6}$$ $$=\frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}$$ $$=P(k+1).$$ Thus $P(k)$ is true for $k \in \mathbb{N}$. Hence by mathematical induction, $1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ is true for $n \in \mathbb{N}$.

Math Major
  • 2,234
  • Is the question here more so "how to write a nice proof"? – Daniel W. Farlow Feb 26 '15 at 05:31
  • 2
    @crash it is tagged verification. They probably want to know if they are correct. – dustin Feb 26 '15 at 05:32
  • 2
    @crash basically yea, I want to know what edits I can make to improve it, if im missing anything, etc. I'm new to proof writing – Math Major Feb 26 '15 at 05:33
  • @dustin It seems a little ambiguous here in my opinion--prima facie I don't see any issues; thus, it seems like "editing" in this scenario means more concerning presentation than proof veracity. – Daniel W. Farlow Feb 26 '15 at 05:34
  • @crash my intention was both presentation and proof veracity editing. I wasn't even sure if my answer was correct – Math Major Feb 26 '15 at 05:35
  • 6
    In terms of small edits: I believe that your $P(k)$ is a proposition, so it might not be best to follow it with an equal sign (maybe you could use a colon instead). I found this read slightly strange when you mentioned adding $(k+1)^2$ "to both sides of $P(k)$." – Benjamin Dickman Feb 26 '15 at 05:35
  • Do you like the proof by induction, or by algebra? –  Feb 26 '15 at 05:36
  • @Garvil What do you mean by algebra? Are you saying there's another way to prove it other than induction, using algebra? – Math Major Feb 26 '15 at 05:40
  • 4
    Oh yes, would you like to know? –  Feb 26 '15 at 05:41
  • 1
    @MathMajor When this formula was derived, it had to be derived without induction. – AvZ Feb 26 '15 at 05:41
  • 1
    @Garvil Yes please! – Math Major Feb 26 '15 at 05:43
  • @MathMajor I just answered with what I, personally, think is a very good way of giving the solution (my opinion). It is very cleanly laid out. The claims are very clear. All of the steps are also clearly outlined. It could obviously be trimmed considerably, but it is up to the proof writer to omit steps where s/he sees fit. – Daniel W. Farlow Feb 26 '15 at 05:46
  • Related : https://math.stackexchange.com/questions/48080/sum-of-first-n-squares-equals-fracnn12n16 – Arnaud D. Apr 15 '19 at 19:10

3 Answers3

17

Consider any natural number $r$. You have $$r^3-(r-1)^3=3r^2-3r+1.$$

Now telescope it: $$ 1^3-0^3=3-3+1 $$ $$2^3-1^3=3\cdot2^2-3\cdot2+1 $$ $$\vdots $$ $$ n^3-(n-1)^3=3n^2-3n+1 $$ Now add, and see them cancel out. You are left with $$n^3=3(1^2+2^2+\cdots+ n^2)-3(1+2+3+\cdots+n)+n$$ You must know $$ 1+2+3+\cdots+n=\frac{n(n+1)}{2}. $$ Plug it in, and you get the answer. Also, please see that this method works even for $\sum r^4,r^5,\cdots$. I have tried it out. All you need is the sum of its previous powers.

8

I am going to provide what I think is a nice way of writing up a proof, both in terms of accuracy and in terms of communication. You be the judge(s).


Claim: For $n\geq 1$, let $S(n)$ be the statement $$ S(n) : 1^2+2^2+3^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}. $$

Base step $(n=1)$: The statement $S(1)$ says $1^2=1(2)(3)/6$ which is true.

Inductive step $(S(k)\to S(k+1))$: Fix some $k\geq 1$ and suppose that $$ S(k) : 1^2+2^2+3^2+\cdots+k^2=\frac{k(k+1)(2k+1)}{6} $$ holds. To be shown is that $$ S(k+1) : 1^2+2^2+3^2+\cdots+k^2+(k+1)^2=\frac{(k+1)(k+2)(2(k+1)+1)}{6} $$ follows. Starting with the left-hand side of $S(k+1)$, \begin{align} \text{LHS} &= 1^2+2^2+3^2+\cdots+k^2+(k+1)^2\tag{definition}\\[1em] &= \frac{k(k+1)(2k+1)}{6}+(k+1)^2\tag{by $S(k)$}\\[1em] &= (k+1)\left[\frac{k(2k+1)}{6}+(k+1)\right]\\[1em] &= (k+1)\frac{k(2k+1)+6(k+1)}{6}\\[1em] &= (k+1)\frac{2k^2+k+6k+6}{6}\\[1em] &= (k+1)\frac{2k^2+7k+6}{6}\\[1em] &= (k+1)\frac{(k+2)(2k+3)}{6}\\[1em] &= \frac{(k+1)(k+2)(2(k+1)+1)}{6}\\[1em] &= \text{RHS}, \end{align} the right-hand side of $S(k+1)$ follows. This completes the inductive step.

Thus, by mathematical induction, for every $n\geq 1, S(n)$ is true. $\Box$

  • 5
    Teach me, oh master, the ways of typing your $L_AT_EX$ so fast – AvZ Feb 26 '15 at 05:47
  • @AvZ Haha. Lots of patience and practice--I think it mostly comes down to looking at MSWord as the absolutely ridiculously hideous beast that it is. :) – Daniel W. Farlow Feb 26 '15 at 05:49
  • 1
    @MathMajor Glad it helped! I maybe should add, given @AvZ's comment that part of the challenge with presenting nice proofs lies in the actual typesetting. You should definitely learn $\LaTeX$ and make it your best friend so that writing professional-looking math will be easy. For example, the align environment is something very useful for making things clear (helps to add comments on the side sometimes). – Daniel W. Farlow Feb 26 '15 at 05:55
  • Mathjax's cheats us with align though. We can't use \intertext{} within the environment which angers me. – dustin Feb 26 '15 at 06:10
  • @dustin Yes, there are several things that anger me in terms of what you can do concerning $\LaTeX$ and what you cannot do (on MSE, that is)--I was thinking about posting a Meta question in regards to what is not "implemented" or "imported" in terms of standard $\LaTeX$ distributions. I'm sure this has been asked before though--might you know of a good link that would be informative or is the standard tutorial really all there is? – Daniel W. Farlow Feb 26 '15 at 06:12
  • It isn't about the site but about Mathjaxs itself. You have to look at the documentation there to see what has been brought over. However, I think that is a waste. I figure it out as I go. If something doesn't render, it isn't configure in Mathjaxs. – dustin Feb 26 '15 at 06:14
  • @dustin Yeah, that sounds annoying. That's what I've been doing too so far. I guess I will continue in that manner (I agree that actually looking through all of the documentation would likely be a waste of time). Thanks for the link. – Daniel W. Farlow Feb 26 '15 at 06:20
0

Your inductive assumption is such that the formula marked $\color{red}{\mathrm{red}}$ (several lines below) holds for $i=k$:

$$\sum^{i=k}_{i=1} i^2=\frac{k(k+1)(2k+1)}{6} $$

You need to prove that for $i=k+1$: $$\sum^{i=k+1}_{i=1} i^2=\color{blue}{\frac{(k+1)(k+2)(2k+3)}{6}}$$

To do this you cannot use: $$\sum^{i=k}_{i=n} i^2=\color{red}{\frac{n(n+1)(2n+1)}{6}} $$ as this is what you are trying to prove.

So what you do instead is notice that: $$\sum^{i=k+1}_{i=1} i^2= \underbrace{\frac{k(k+1)(2k+1)}{6}}_{\text{sum of k terms}} + \underbrace{(k+1)^2}_{\text{(k+1)th term}}$$ $$\sum^{i=k+1}_{i=1} i^2= \frac{k(k+1)(2k+1)}{6}+\frac{6(k+1)^2}{6}$$ $$\sum^{i=k+1}_{i=1} i^2= \frac{(k+1)\left(k(2k+1)+6(k+1)\right)}{6}$$ $$\sum^{i=k+1}_{i=1} i^2= \frac{(k+1)(2k^2+\color{green}{7k}+6)}{6}=\frac{(k+1)(2k^2+\color{green}{4k+3k}+6)}{6}=\frac{(k+1)\left(2k(k+2)+3(k+2)\right)}{6}=\color{blue}{\frac{(k+1)(k+2)(2k+3)}{6}}\quad \forall \space k \in \mathbb{N}$$

Which is the relation we set out to prove. So the method is to substitute $i=k+1$ into the formula you are trying to prove and then use the inductive assumption to recover the $\color{blue}{\mathrm{blue}}$ equation at the end.

BLAZE
  • 8,458