Prove by mathematical induction that $$\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}$$ holds $\forall n\in\mathbb{N}$.
(1) Assume that $n=1$. Then left side is $1^2 =1$ and right side is $6/6 = 1$, so both sided are equal and expression holds for $n = 1$.
(2) Let $k \in \mathbb{N}$ is given. Assume that for $n = k$ expression holds. Then for $n = k+1$ we get $$\sum_{i = 1}^{k+1} i^2 = \left(\sum_{i = 1}^{k} i^2\right) + (k+1)^2 = \frac{k(k+1)(2k+1)}{6} + k^2 + 2k + 1 = \frac{2k^3 + 9k^2 + 13k + 6}{6}.$$ Factoring the result we get that $\frac{2k^3 + 9k^2 + 13k + 6}{6} = \frac{(k+1)(k+2)(2k+3)}{6}$ and thus expression holds for $n = k+1$.
Combining (1) and (2) we can conclude that the expression holds $\forall n \in \mathbb{N}$.
I have a few questions:
- Is my proof correct?
- If you would be a math professor, is this style of writing math proofs right and sufficient for freshman? Or is there something I miss?