<s>[INST] Algebra simplification in mathematical induction . I was proving some mathematical induction problems and came through an algebra expression that shows as follows:
$$\frac{k(k+1)(2k+1)}{6}  + (k + 1)^2$$
The final answer is supposed to be: 
$$\frac{(k+1)(k+2)(2k+3)}{6}$$
I walked through every possible expansion; I combine like terms, simplify, factor, but never arrived at the answer.
Could someone explain the steps? 
 [/INST] A good idea for this sort of thing is to use Wolfram Alpha to ensure that the two things are, indeed, equal.  In this case, they are, so we can spend some time looking to factor.
$$\begin{align}
\frac{k(k+1)(2k+1)}{6}  + (k + 1)^2 &= \frac{k(k+1)(2k+1)  + 6(k + 1)^2}{6}\\
&= \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}\\
\end{align}$$
EDIT: A helpful trick is the one I did in the step from line 1 to line 2: I factored out the $k+1$ immediately, rather than expanding the whole expression.  This makes it easier to deal with--most people have more practice factoring quadratics than cubics.
EDIT in response to comment:
$$\begin{align}
\frac{k(k+1)(2k+1)  + 6(k + 1)^2}{6} &= \frac{k\color{red}{(k+1)}(2k+1)  + 6\color{red}{(k+1)}(k+1)}{6}\\
&=\frac{\color{red}{(k+1)}\Big(k(2k+1)  + 6(k+1)\Big)}{6}
\end{align}$$
</s>