<s>[INST] Simplifying the sum of terms that are "polynomial fractions" I need to simplify:
$$\left(\frac{z^2-2}{1+2z}\right)^2 \;+ \;\left(\frac{z^2-2}{1+2z}\right)$$
I get $2z^4-8z^2+8$ in the numerator when I know it should be $((z^2-2) (z^2+2 z-1))$.
 [/INST] $$\left(\frac{z^2-2}{1+2z}\right)^2+\left(\frac{z^2-2}{1+2z}\right)\;\;=\;\;\frac{(z^2-2)^2}{(1+2z)^2}+\frac{(z^2-2)}{(1+2z)}$$ 
$$=\frac{(z^2-2)^2+(z^2-2)(1+2z)}{(1+2z)^2}$$ 
$$=\frac{(z^2-2)\;[(z^2-2)+(1+2z)]}{(1+2z)^2}$$ 
$$=\frac{(z^2-2)(z^2+2z-1)}{(1+2z)^2}$$

Note that in general, $$\dfrac{m^2}{n^2} + \dfrac mn = \dfrac {m^2 + mn}{n^2} = \dfrac{m(m+n)}{n^2}.\;$$
</s>