# Quotient rule

In calculus, the quotient rule is a method of finding the derivative of a function that is the ratio of two differentiable functions. Let $f(x)=g(x)/h(x),$ where both g and h are differentiable and $h(x)\neq 0.$ The quotient rule states that the derivative of f(x) is

$f'(x)={\frac {g'(x)h(x)-g(x)h'(x)}{h(x)^{2}}}.$ ## Examples

1. A basic example:
{\begin{aligned}{\frac {d}{dx}}{\frac {e^{x}}{x^{2}}}&={\frac {\left({\frac {d}{dx}}e^{x}\right)(x^{2})-(e^{x})\left({\frac {d}{dx}}x^{2}\right)}{(x^{2})^{2}}}\\&={\frac {(e^{x})(x^{2})-(e^{x})(2x)}{x^{4}}}\\&={\frac {e^{x}(x-2)}{x^{3}}}.\end{aligned}} 2. The quotient rule can be used to find the derivative of $f(x)=\tan x={\tfrac {\sin x}{\cos x}}$ as follows.
{\begin{aligned}{\frac {d}{dx}}\tan x&={\frac {d}{dx}}{\frac {\sin x}{\cos x}}\\&={\frac {\left({\frac {d}{dx}}\sin x\right)(\cos x)-(\sin x)\left({\frac {d}{dx}}\cos x\right)}{\cos ^{2}x}}\\&={\frac {\cos ^{2}x+\sin ^{2}x}{\cos ^{2}x}}\\&={\frac {1}{\cos ^{2}x}}=\sec ^{2}x.\end{aligned}} ## Proofs

### Proof from derivative definition and limit properties

Let $f(x)={\frac {g(x)}{h(x)}}.$ Applying the definition of the derivative and properties of limits gives the following proof.

{\begin{aligned}f'(x)&=\lim _{k\to 0}{\frac {f(x+k)-f(x)}{k}}\\&=\lim _{k\to 0}{\frac {{\frac {g(x+k)}{h(x+k)}}-{\frac {g(x)}{h(x)}}}{k}}\\&=\lim _{k\to 0}{\frac {g(x+k)h(x)-g(x)h(x+k)}{k\cdot h(x)h(x+k)}}\\&=\lim _{k\to 0}{\frac {g(x+k)h(x)-g(x)h(x+k)}{k}}\cdot \lim _{k\to 0}{\frac {1}{h(x)h(x+k)}}\\&=\left(\lim _{k\to 0}{\frac {g(x+k)h(x)-g(x)h(x)+g(x)h(x)-g(x)h(x+k)}{k}}\right)\cdot {\frac {1}{h(x)^{2}}}\\&=\left(\lim _{k\to 0}{\frac {g(x+k)h(x)-g(x)h(x)}{k}}-\lim _{k\to 0}{\frac {g(x)h(x+k)-g(x)h(x)}{k}}\right)\cdot {\frac {1}{h(x)^{2}}}\\&=\left(h(x)\lim _{k\to 0}{\frac {g(x+k)-g(x)}{k}}-g(x)\lim _{k\to 0}{\frac {h(x+k)-h(x)}{k}}\right)\cdot {\frac {1}{h(x)^{2}}}\\&={\frac {g'(x)h(x)-g(x)h'(x)}{h(x)^{2}}}.\end{aligned}} ### Proof using implicit differentiation

Let $f(x)={\frac {g(x)}{h(x)}},$ so $g(x)=f(x)h(x).$ The product rule then gives $g'(x)=f'(x)h(x)+f(x)h'(x).$ Solving for $f'(x)$ and substituting back for $f(x)$ gives:

{\begin{aligned}f'(x)&={\frac {g'(x)-f(x)h'(x)}{h(x)}}\\&={\frac {g'(x)-{\frac {g(x)}{h(x)}}\cdot h'(x)}{h(x)}}\\&={\frac {g'(x)h(x)-g(x)h'(x)}{h(x)^{2}}}.\end{aligned}} ### Proof using the chain rule

Let $f(x)={\frac {g(x)}{h(x)}}=g(x)h(x)^{-1}.$ Then the product rule gives

$f'(x)=g'(x)h(x)^{-1}+g(x)\cdot {\frac {d}{dx}}(h(x)^{-1}).$ To evaluate the derivative in the second term, apply the power rule along with the chain rule:

$f'(x)=g'(x)h(x)^{-1}+g(x)\cdot (-1)h(x)^{-2}h'(x).$ Finally, rewrite as fractions and combine terms to get

{\begin{aligned}f'(x)&={\frac {g'(x)}{h(x)}}-{\frac {g(x)h'(x)}{h(x)^{2}}}\\&={\frac {g'(x)h(x)-g(x)h'(x)}{h(x)^{2}}}.\end{aligned}} ## Higher order formulas

Implicit differentiation can be used to compute the nth derivative of a quotient (partially in terms of its first n − 1 derivatives). For example, differentiating $fh=g$ twice (resulting in $f''h+2f'h'+fh''=g''$ ) and then solving for $f''$ yields

$f''=\left({\frac {g}{h}}\right)''={\frac {g''-2f'h'-fh''}{h}}.$ 