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

-
$\dfrac{du}{dx} = 2x+2$ and replace $(x+1)^2=x^2+2x+1$ and $2x+2=2\cdot(x+1)$ in $3(x^2+2x+1)^2 (2x+2)$. –  Raymond Manzoni Apr 6 '12 at 7:34
@SbSangpi I don't understand the two cases you make for the derivative of $u$ wrt $x$. Are you trying to guess or what are the two cases? –  user21436 Apr 6 '12 at 7:41
yea.I'm confuse with du/dx that's why I try to guess one by one to get answer! –  Sb Sangpi Apr 6 '12 at 7:43
Where did the $y$ come from? –  copper.hat Apr 6 '12 at 7:44
@copper: it was $y=u^3$ (it should be separated from 2x+2 and written... :-)) –  Raymond Manzoni Apr 6 '12 at 7:46

by Chain rule :

$f'(x)=3(x^2+2x+1)^2 \cdot(x^2+2x+1)'=3\cdot(x+1)^4\cdot(2x+2)=$

$=6\cdot(x+1)^4\cdot(x+1)=6(x+1)^5$

-

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}

-