<s>[INST] Explaining an algebra step in $ \frac{n^2(n+1)^2}{4} + (n+1)^3 = \frac{(n+1)^2}{4}(n^2+4n+4)$ I have encountered this step in my textbook and I do not understand it, could someone please list the intermediate steps?
$$ \frac{n^2(n+1)^2}{4} + (n+1)^3 = \frac{(n+1)^2}{4}(n^2+4n+4). $$
Thanks, 
 [/INST] Add the fractions, factor out common terms in the numerator and then rearrange:
$$

\displaystyle\; \; \frac{n^2(n^2 + 1)^2}{4} + (n + 1)^3

$$
$$
= \displaystyle\frac{n^2(n^2 + 1)^2}{4} + \frac{4(n + 1)^3}{4}
$$
$$
= \displaystyle\frac{n^2(n^2 + 1)^2 + 4(n+1)^3}{4}
$$
$$
= \displaystyle\frac{(n^2 + 1)^2(n^2 \cdot 1 + 4(n + 1))}{4}
$$
$$
= \displaystyle\frac{(n^2 + 1)^2(n^2  + 4n + 4)}{4}
$$
$$
= \displaystyle\frac{(n^2 + 1)^2}{4}(n^2 + 4n + 4)
$$
</s>