Why does this derivative equation hold? $$\frac{d(Q/x)}{dx} = \frac{x(\frac{dQ}{dx})-Q(\frac{dx}{dx})}{x^2}$$
Assume $Q$ is a function of $x$. This equation is in my microeconomics textbook, but I don't know how we can get from the left-hand side to the right-hand side. Can someone please explain?
 A: It is known as the quotient rule.  The more general derivative is given as:
$$\frac{d}{dx}\frac fg=\frac{f'g-fg'}{g^2}$$
Inputting $f=Q$ and $g=x$ gives
$$\frac{d}{dx}\frac Qx=\frac{Q'x-Qx'}{x^2}=\frac{x\left(\frac{dQ}{dx}\right)-Q\require{cancel}\cancel{\frac{dx}{dx}}}{x^2}$$
$$=\frac{x\left(\frac{dQ}{dx}\right)-Q}{x^2}$$
A: According to the product rule:
$$\frac{d(Q/x)}{dx} = \frac{d(Q\cdot 1/x)}{dx} = \frac{dQ}{dx}\cdot1/x + Q\cdot\frac{d(1/x)}{dx} = \frac{\frac{dQ}{dx}}{x} - \frac{Q}{x^2} = \frac{x(\frac{dQ}{dx})-Q(\frac{dx}{dx})}{x^2}$$
A: The quotient rule says:
$$
\frac d {dx} \, \frac{f(x)}{g(x)} = \frac{g(x)f'(x) - f(x)g'(x)}{g(x)^2}
$$
The case stated in the question is that in which $g(x) = x$.
As to how it is proved, recall that
$$
\frac{\Delta \Big(f(x)/g(x) \Big) }{\Delta x} \longrightarrow \frac{d\Big( f(x)/g(x) \Big)}{dx} \text{ as } \Delta x \to 0.
$$
Then do a bit of algebra:
\begin{align}
\frac{\Delta \Big(f(x)/g(x) \Big) }{\Delta x} & = \frac{\Big( f(x+\Delta x)/g(x+\Delta x)\Big) - f(x)/g(x)}{\Delta x} \\[15pt]
& \text{Now multiply the numerator and denominator} \\
& \text{both by } g(x+\Delta x) g(x): \\[12pt]
& = \frac{f(x+\Delta x)g(x) - f(x)g(x+\Delta x)}{\Delta x\, g(x+\Delta x)g(x)} \\[12pt]
& = \frac{\Big(f(x+\Delta x)g(x) -f(x)g(x)\Big) - \Big(f(x)g(x+\Delta x) - f(x)g(x)\Big)}{\Delta x\, g(x+\Delta x)g(x)} \\[12pt]
& = \frac{g(x) \left(\dfrac{f(x+\Delta x) -f(x)}{\Delta x}\right) - f(x) \left(\dfrac{g(x+\Delta x) - g(x)}{\Delta x}\right)}{g(x+\Delta x)g(x)} \\[12pt]
& \longrightarrow \frac{g(x)f'(x) - f'(x)g(x)}{g(x)^2}.
\end{align}
Now for the slightly subtle part: How do we know that $g(x+\Delta x)$ in the denominator approaches $g(x)$?  The answer is that differentiable functions are continuous.
A: From the definition of the derivative,
$$\left(\frac qx\right)'=\lim_{h\to0}\frac{\dfrac{q(x+h)}{x+h}-\dfrac{q(x)}{x}}h=\lim_{h\to0}\frac{x(q(x+h)-q(x))-hq(x)}{hx(x+h)}=\frac{xq'-q}{x^2}.$$
