# 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,

-

Take out the common factor $(n+1)^{2}$ and simplify. So you get $$(n+1)^{2} \cdot \biggl[ \frac{n^{2}}{4} + (n+1)\Bigr] = (n+1)^{2} \cdot \biggl[ \frac{n^{2}+4n + 4}{4}\biggr]$$

-

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)$$

-

One way to see it is to factor out the $(n+1)^2/4$. Then \begin{align*} \frac{n^2(n+1)^2}{4} + (n+1)^3 &=\frac{(n+1)^2}{4}\bigl(n^2+4(n+1)\bigr) \\ &= \frac{(n+1)^2}{4}(n^2+4n+4) \end{align*} Since you factor out a $1/4$, you have to keep a $4$ in the numerator in the second term.

-