# How do you find the second derivative of z=(x-5)/(x+2)?

Mar 31, 2017

$\frac{{d}^{2} z}{\mathrm{dx}} ^ 2 = - \frac{14}{x + 2} ^ 3$

#### Explanation:

Calculate the first derivative using the quotient rule:

$\frac{\mathrm{dz}}{\mathrm{dx}} = \frac{\left(x + 2\right) \frac{d}{\mathrm{dx}} \left(x - 5\right) - \left(x - 5\right) \frac{d}{\mathrm{dx}} \left(x + 2\right)}{x + 2} ^ 2$

$\frac{\mathrm{dz}}{\mathrm{dx}} = \frac{x + 2 - x + 5}{x + 2} ^ 2 = \frac{7}{x + 2} ^ 2$

Then using the chain rule:

$\frac{{d}^{2} z}{\mathrm{dx}} ^ 2 = \frac{d}{\mathrm{dx}} \left(\frac{7}{x + 2} ^ 2\right) = - \frac{14}{x + 2} ^ 3 \frac{d}{\mathrm{dx}} \left(x + 2\right) = - \frac{14}{x + 2} ^ 3$

Alternatively you can write the function as:

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

and you can see that:

(d^nz)/dx^n = 7(-1)^(n+1)(n!)/(x+2)^(n+1)

Mar 31, 2017

$\frac{{d}^{2} z}{\mathrm{dx}} ^ 2 = \frac{- 14}{x + 2} ^ 3$

#### Explanation:

One way is to express the function as a product and differentiate using the product rule.

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

differentiate using the $\textcolor{b l u e}{\text{product rule}}$

$\text{Given "z=g(x)h(x)" then}$

$\textcolor{red}{\overline{\underline{| \textcolor{w h i t e}{\frac{2}{2}} \textcolor{b l a c k}{\frac{\mathrm{dz}}{\mathrm{dx}} = g \left(x\right) h ' \left(x\right) + h \left(x\right) g ' \left(x\right)} \textcolor{w h i t e}{\frac{2}{2}} |}}}$

$\Rightarrow \frac{\mathrm{dz}}{\mathrm{dx}} = \left(x - 5\right) . - 1 {\left(x + 2\right)}^{-} 2 + {\left(x + 2\right)}^{- 1} .1$

$\text{to obtain "(d^2z)/(dx^2)" differentiate } \frac{\mathrm{dz}}{\mathrm{dx}}$

differentiate the first term using the $\textcolor{b l u e}{\text{product rule}}$

$\Rightarrow \frac{{d}^{2} z}{{\mathrm{dx}}^{2}} = \left(x - 5\right) .2 {\left(x + 2\right)}^{-} 3 - {\left(x + 2\right)}^{- 2} .1 - {\left(x + 2\right)}^{-} 2$

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

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

$= - \frac{14}{x + 2} ^ 3$