# What is the derivative of (x^2+x)^2?

Jul 30, 2015

${y}^{'} = 4 {x}^{3} + 6 {x}^{2} + 2 x$

#### Explanation:

You can differentiate this function by using the sum and power rules. Notice that you can rewrite this function as

$y = {\left({x}^{2} + x\right)}^{2} = {\left[x \left(x + 1\right)\right]}^{2} = {x}^{2} \cdot {\left(x + 1\right)}^{2}$

$y = {x}^{2} \cdot \left({x}^{2} + 2 x + 1\right) = {x}^{4} + 2 {x}^{2} + {x}^{2}$

Now, the sum rule tells you that for functions that take the form

$y = {\sum}_{i = 1}^{\infty} {f}_{i} \left(x\right)$

you can find the derivative of $y$ by adding the derivatives of those individual functions.

color(blue)(d/dx(y) = f_1^'(x) + f_2^'(x) + ...

${y}^{'} = \frac{d}{\mathrm{dx}} \left({x}^{4} + 2 {x}^{2} + {x}^{2}\right)$

${y}^{'} = \frac{d}{\mathrm{dx}} \left({x}^{4}\right) + \frac{d}{\mathrm{dx}} \left(2 {x}^{2}\right) + \frac{d}{\mathrm{dx}} \left({x}^{2}\right)$

${y}^{'} = \frac{d}{\mathrm{dx}} \left({x}^{4}\right) \cdot 2 \frac{d}{\mathrm{dx}} \left({x}^{3}\right) \cdot \frac{d}{\mathrm{dx}} \left({x}^{2}\right)$

To differentiate this fractions, use the power rule

$\textcolor{b l u e}{\frac{d}{\mathrm{dx}} \left({x}^{a}\right) = a {x}^{a - 1}}$

So, your derivative will come out to be

${y}^{'} = 4 {x}^{4 - 1} + 2 \cdot 3 {x}^{3 - 1} + 2 {x}^{2 - 1}$

${y}^{'} = \textcolor{g r e e n}{4 {x}^{3} + 6 {x}^{2} + 2 x}$

Alternatively, you can use the chain rule to differentiate $y$.

$\textcolor{b l u e}{\frac{d}{\mathrm{dx}} \left(y\right) = \frac{d}{\mathrm{du}} \left(y\right) \cdot \frac{d}{\mathrm{dx}} \left(u\right)}$

In your case, you have $y = {u}^{2}$ and $u = {x}^{2} + x$, so that you get

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{du}} {u}^{2} \cdot \frac{d}{\mathrm{dx}} \left({x}^{2} + x\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 u \cdot \left(2 x + 1\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 \left({x}^{2} + x\right) \cdot \left(2 x + 1\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = \left(2 {x}^{2} + 2 x\right) \cdot \left(2 x + 1\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 4 {x}^{3} + 2 {x}^{2} + 4 {x}^{2} + 2 x = \textcolor{g r e e n}{4 {x}^{3} + 6 {x}^{2} + 2 x}$