# Derivative of rational function help.

consider $$f(x)=\frac{1}{2x-4}$$

The derivative should be $\displaystyle -\frac{1}{2(2x-4)^2}$ However I get $\displaystyle -\frac{2}{(2x-4)^2}$

my workflow: $$\begin{array}{} f'(x)&= &(2x-4)^{-1} \\ &=&-1(2)(2x-4)^{-2} \\ &=&-2(2x-4)^{-2} \end{array}$$

So why does the -2 multiply the denominator and not the numerator? After all, $\displaystyle 2\frac{1}{2}$ is 1 not $\displaystyle \frac{1}{4}$. I feel like I'm missing the obvious.

Thanks all.

• Your answer is correct. It can however be simplified as $\frac{-1}{2(x-2)}$ Commented Jun 20, 2014 at 14:00
• next time, please use MathJax
– Alex
Commented Jun 20, 2014 at 14:00
• Note that $-2(2x-4)^{-2} \; = \; -2 \cdot (2x-4)^{-2} \; = \; -2 \cdot \frac{1}{(2x-4)^2} \; = \; \frac{-2}{(2x-4)^2},$ so for what you wrote, the $-2\;$ does multiply the numerator, and not the denominator. Commented Jun 20, 2014 at 14:36
• @Mathmo123: you forgot the square
– Alex
Commented Jun 20, 2014 at 14:41

On the first glance logging makes things harder, but at the end of the day it doesn't. So, $$\log f(x) = - \log (2x -4) = - \log 2 - \log (x-2)\\ \frac{d \log f(x)}{dx} = \frac{f'(x)}{f(x)} = -\frac{1}{x-2}\\ f'(x) = -\frac{f(x)}{x-2} =-\frac{1}{2(x-2)^2}$$

The derivative should be $$-\dfrac1{2(x-2)^2}.$$

If so, then your answer is correct since: $$-\dfrac2{(2x-4)^2}=-\dfrac2{(2(x-2))^2}=-\dfrac2{4(x-2)^2}=-\dfrac1{2(x-2)^2}.\tag{\star}$$ I will present here 3 different ways to achieve this result:

Quotient rule:

$$\dfrac{\mathrm d}{\mathrm dx}\left[\dfrac{g(x)}{h(x)}\right] = \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}.\tag{h(x)\neq0}$$

\eqalign{\dfrac{\mathrm d}{\mathrm dx}\left[\dfrac{1}{2x-4}\right] &\;=\dfrac{0\cdot(2x-4)-1\cdot 2}{(2x-4)^2} \\ &\;=\dfrac{-2}{(2x-4)^2}\\ &\overset{\displaystyle(\star)}=-\dfrac1{2(x-2)^2}.\\ }

Chain rule: $$\dfrac{\mathrm d}{\mathrm dx}f\big(g(x)\big)=f'\big(g(x)\big)\,g'(x).$$

We know that: $$\dfrac{\mathrm d}{\mathrm dx}\dfrac1x=-\dfrac1{x^2}\quad\color{grey}{\text{ and }}\quad\dfrac{\mathrm d}{\mathrm dx}\big(2x-4\big)=2.$$ Therefore by the chain rule: \eqalign{ \dfrac{\mathrm d}{\mathrm dx}\left[\dfrac{1}{2x-4}\right] &\;=-\dfrac1{(2x-4)^2}\cdot 2\\ &\;=-\dfrac{2}{(2x-4)^2}\\ &\overset{\displaystyle(\star)}=-\dfrac1{2(x-2)^2}.\\ }

Reciprocal rule: $$\frac{\mathrm d}{\mathrm dx}\left(\frac{1}{g(x)}\right) = \frac{- g'(x)}{(g(x))^2}. \tag{g(x)\neq0}$$

This is straightforward: \eqalign{\dfrac{\mathrm d}{\mathrm dx}\left[\dfrac{1}{2x-4}\right] &\;=\dfrac{-2}{(2x-4)^2}\\ &\overset{\displaystyle(\star)}=-\dfrac1{2(x-2)^2}.\\ }