# How do you find the derivative of f(x)= (x-1/x+1)^3 using the chain rule?

Apr 17, 2018

$3 \left(1 - \frac{1}{x} ^ 2\right) {\left(x - \frac{1}{x} + 1\right)}^{2}$

#### Explanation:

We use the chain rule, which states that,

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$

Let $u = x - \frac{1}{x} + 1 , \therefore \frac{\mathrm{du}}{\mathrm{dx}} = 1 - \frac{1}{x} ^ 2$.

Then $y = {u}^{3} , \frac{\mathrm{dy}}{\mathrm{du}} = 3 {u}^{2}$.

And so,

$\frac{\mathrm{dy}}{\mathrm{dx}} = 3 {u}^{2} \left(1 - \frac{1}{x} ^ 2\right)$

Substitute back $u = x - \frac{1}{x} + 1$ to get the final answer:

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

I'll make this neater and rearrange it into:

$= 3 \left(1 - \frac{1}{x} ^ 2\right) {\left(x - \frac{1}{x} + 1\right)}^{2}$