<s>[INST] Differentiate respect to $x$ $(x^2+2x+1)^3$ 
let u=$x^2+2x+1$   $\frac{du}{dx} = 2x$ or $2x+2$ $\frac{dy}{dx}=3u^2 $ 
if $\frac{du}{dx} = 2x$ then 
$3(x^2+2x+1)^2 (2x)$ 
answer is $6x(x^2+2x+1) $  
Or if $\frac{du}{dx} = 2x+2$ then 
$3(x^2+2x+1)^2 (2x+2)$ 
$6x(x^2+2x+1)+2$
however the right answer is $6(x+1)^5$
can please help me out? 
thanks in advance!
 [/INST] Hint
$$\begin{align}\dfrac{du}{dx}&=2x+2=2(x+1)\\x^2+2x+1 &=(x+1)^2\\(x^a)^b&=x^{ab}\end{align}$$ 
</s>