<s>[INST] Solving a Polynomial Equation by Factoring. $n^3+12n^2+48n+64$
I know the sum of two cubes formula, $(a+b)(a^2-ab+b^2)$. I'm not sure how to apply it here? Any help would be appreciated.
 [/INST] Factor out a $64$ to get:
$$64 \left(\frac{n^3}{64} + \frac{12n^2}{64} + \frac{48n}{64} +1\right) = 64 \left(\frac{n^3}{64} + 3 \cdot\frac{n^2}{16} + 3 \cdot \frac{n}{4} +1\right)$$
$$= 64 \left( \left(\frac{n}{4}\right)^3 + 3\left(\frac{n}{4}\right)^2 + 3 \left(\frac{n}{4}\right) + 1 \right)$$
$$= 64(n/4 + 1)^3 = (4 \cdot n/4 + 4 \cdot1)^3 = (n+4)^3$$
where we have used the binomial theorem in the last line, and the fact that $4^3 = 64$.
This can be seen as the reverse of the AC method, where we instead factor out the largest perfect square of the constant term. This is $64 = 8^2$ in this question.
</s>