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.
 A: 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}
$$
A: 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}.\\
}$$
