Differentiating $(2x+1)^3(1-x)^4$, this is what I came up with:
$\begin{align}=&(2x+1)^3(4)(1-x)^3(-1) + (1-x)^4(3)(2x+1)^2(2) \\ =&(2x+1)^3(-4)(1-x)^3+(1-x)^4(6)(2x+1)^2\end{align}$
However my textbook further simplifies it into this:
$2(2x+1)^2(1-x)^3(1-7x)$
Can anyone help me understand how the simplification took place? I'm a bit lost.
It is a factorization. Since $2(2x+1)^2(1-x)^3$ is a common factor of $(2x+1)^3(-4)(1-x)^3$ and $(1-x)^4(6)(2x+1)^2$, \begin{align} &(2x+1)^3(-4)(1-x)^3+(1-x)^4(6)(2x+1)^2\\\ &=2(2x+1)^2(1-x)^3(-2(2x+1)+3(1-x))\\\ &=2(2x+1)^2(1-x)^3(1-7x). \end{align}