<s>[INST] induction proof: $\sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$ I encountered the following induction proof on a practice exam for calculus:
$$\sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$$
I have to prove this statement with induction.
Can anyone please help me with this proof?
 [/INST] If $P(n): \sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6},$
we see $P(1): 1^2=1$ and $\frac{1(1+1)(2\cdot1+1)}{6}=1$ so, $P(1)$ is true
Let $P(m)$ is true, $$\sum_{k=1}^mk^2 = \frac{m(m+1)(2m+1)}{6}$$
For $P(m+1),$
$$ \frac{m(m+1)(2m+1)}{6}+(m+1)^2$$
$$=\frac{m(m+1)(2m+1)+6(m+1)^2}6$$
$$=\frac{(m+1)\{m(2m+1)+6(m+1)\}}6$$
$$=\frac{(m+1)(m+2)\{2(m+1)+1\}}6$$  as $m(2m+1)+6(m+1)=2m^2+7m+6=(m+2)(2m+3)$
So, $P(m+1)$ is true if $P(m)$ is true
</s>