1

In this question I found online:

  1. Show that $$ S(n):0^2 + 1^2 + 2^2 + · · · + n^2 = \frac{n(n + 1)(2n + 1)}{6}$$

I don't understand why for S(k+1) they wrote:

$$S(k+1):1^2+2^2+3^2+⋯+k^2+(k+1)^2=\frac{(k+1)(k+2)(2(k+1)+1)}{6}$$

instead of: $$S(k+1):1^2+2^2+3^2+⋯+(k+1)^2=\frac{(k+1)(k+2)(2(k+1)+1)}{6}$$

Why is the $k^2$ included in the $S(k+1)$ step I don't get it surely you just substitute $k+1$ for $n$ so I don't know why $k^2$ is needed there because in other proof by induction questions I've done for example for this proof: $$n<2^n$$

for the $k+1$ step the answer was not $$k + k + 1 < 2^k+1$$ it was: $$k+1 < 2^k+1$$

EDIT

People have mentioned that my version is correct and they just wrote it in a different way but why could I not prove both sides were equal? This is what I did:

$$S(k+1):1^2+2^2+3^2+⋯+(k+1)^2=\frac{(k+1)(k+2)(2(k+1)+1)}{6}$$

I expanded out $$(k+1)^2$$ which gave me $$k^2+2k+1$$

so going back to the k+1 statement we have:

$$S(k+1):1^2+2^2+3^2+⋯+k^2+2k+1=\frac{(k+1)(k+2)(2(k+1)+1)}{6}$$

I subbed in $$\frac{k(k+1)(2k+1)}{6}$$ for $$1^2+2^2+3^2+⋯+k^2$$ (the induction hypothesis) in the k+1 statement and got: $$\frac{k(k+1)(2k+1)}{6} + 2k+1=\frac{(k+1)(k+2)(2(k+1)+1)}{6}$$

long story short my proof failed and I couldn't prove both sides were equal but why was this if my version of S(k+1) was not incorrect?

  • It would be good to link or write up the proof you’re referencing – FShrike Aug 23 '21 at 21:19
  • https://everythingcomputerscience.com/books/PDFs/induction.pdf page 4, I wrote it word for word in my OP @FShrike – computerscienceisapain Aug 23 '21 at 21:25
  • What about avoiding induction? https://math.stackexchange.com/a/3757752/44121 – Jack D'Aurizio Aug 23 '21 at 21:46
  • 1
    There's literally no difference between the two expressions, other than presentation. Both are:

    $$\sum_{m=0}^{k+1} m^2.$$ They're writing it that way to emphasize that you're adding $(k+1)^2$ to the entire preceding sum (the sum arising from $S(k)$), but you're correct that they didn't have to write it out. They chose to do so for pedagogical (rather than mathematical) reasons.

    – Robert Shore Aug 23 '21 at 22:20
  • please check my edit in the OP @RobertShore – computerscienceisapain Aug 23 '21 at 22:31
  • That's fine, as long as the term immediately before $k^2+2k+1 (= (k+1)^2)$ is $k^2$. I now suspect that's where you made your mistake, just adding $2k+1$ instead of adding $(k+1)^2$ to the previous expression. – Robert Shore Aug 23 '21 at 23:16

2 Answers2

2

The sum you show is simply going up to $k+1$, which means the preceding term is $k^2$, and the final term is $(k+1)^2$. In the other proof you reference there is no sum.

Jacob A
  • 579
  • Why is my version incorrect? I just didn't include the $$k^2$$ – computerscienceisapain Aug 23 '21 at 21:42
  • @computerscienceisapain remember what $\ldots$ means; your version was not incorrect at all, just was written differently – FShrike Aug 23 '21 at 21:51
  • I didn't get to the correct answer because I expanded (k+1)^2 and got k^2... so i subbed in what 1^2+2^2+3^2+⋯+k^2 was equal to for k^2, simplified and I couldn't prove they were equal on both sides. I needed to include the k^2 which is confusing as you say my version was correct as well @FShrike – computerscienceisapain Aug 23 '21 at 22:18
  • @computerscienceisapain I can’t follow what you’re talking about but the statement: “$1^2+2^2+\cdots+k^2+(k+1)^2$” is equivalent to the statement: “$1^2+2^2+\cdots+(k+1)^2$” – FShrike Aug 23 '21 at 22:20
  • please check my edit in the OP I explained what I meant @FShrike – computerscienceisapain Aug 23 '21 at 22:32
  • 1
    @computerscienceisapain the original article wrote $\cdots+k^2+(k+1)^2$ to avoid the mistakes you’re making: you wrote $1+\cdots+(k+1)^2=1+\cdots+k^2+2k+1=2k+1+S(k)$ which is incorrect. This is because your $\cdots$ is misleading; to write it out fully, notice that $1+\cdots+k^2+(k+1)^2=1+\cdots+k^2+k^2+2k+1=S(k)+k^2+2k+1$. You forgot that there are two $k^2$ terms because you misunderstood what the $\cdots$ was representing – FShrike Aug 23 '21 at 22:37
2

Your mistake is in the last equation. It should read:

$$\frac{k(k+1)(2k+1)}{6} + (k+1)^2= \frac{(k+1)(k(2k+1)+6(k+1))}{6}= \frac{(k+1)(2k^2+7k+6)}{6} \\=\frac{(k+1)(k+2)(2k+3)}{6}=\frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}$$

Robert Shore
  • 23,332