# Calculus: Derivatives II

## Quotient Rule

In the previous section we found the general form of the derivative of the product of two functions. What about the quotient? The general form of the derivative of the quotient of two functions is derived in a similar fashion to that of the product of two functions:

$\dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{\frac{f(x+h)}{g(x+h)} - \frac{f(x)}{g(x)}}{h} \\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{h} \dfrac{f(x+h)g(x)- f(x)g(x+h)}{g(x+h)g(x)} \\$

As we did for the Product Rule, we add and subtract a handy term to the numerator:

$\dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{h} \dfrac{f(x+h)g(x) - f(x)g(x) + f(x)g(x) - f(x)g(x+h)}{g(x+h)g(x)} \\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{g(x+h)g(x)} \dfrac{f(x+h)g(x) - f(x)g(x) + f(x)g(x) - f(x)g(x+h)}{h} \\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{g(x+h)g(x)}\left( \dfrac{f(x+h)g(x) - f(x)g(x)}{h} + \dfrac{f(x)g(x) - f(x)g(x+h)}{h} \right)\\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{g(x+h)g(x)}\left( g(x)\dfrac{f(x+h) - f(x)}{h} + f(x)\dfrac{g(x) - g(x+h)}{h} \right)\\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{g(x+h)g(x)}\left( g(x)\dfrac{f(x+h) - f(x)}{h} - f(x)\dfrac{g(x+h) - g(x)}{h} \right)\\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \lim\limits_{h \rightarrow 0}\dfrac{1}{g(x+h)g(x)}\left(\left(\lim\limits_{h \rightarrow 0}g(x)\dfrac{f(x+h) - f(x)}{h}\right) - \left(\lim\limits_{h \rightarrow 0}f(x)\dfrac{g(x+h) - g(x)}{h} \right)\right)\\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \dfrac{1}{g^2(x)}\left(\left(f'(x)g(x)\right)-\left(f(x)g'(x)\right)\right)\\ \dfrac{d}{dx} \dfrac{f(x)}{g(x)} = \dfrac{f'(x)g(x) - f(x)g'(x)}{g^2(x)}$

A handy and horribly irritating way to remember this formula is with the following rhyme: "Low d high minus high d low, over the square of what's below."

## Problems

1. Differentiate with respect to $x$: $y= \dfrac{x^2}{x+1}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{x^2}{x+1} \\ \dfrac{dy}{dx} = \dfrac{(x+1)\left(\frac{d}{dx}x^2\right) - x^2\left(\frac{d}{dx}(x+1)\right)}{(x+1)^2}\\ \dfrac{dy}{dx} = \dfrac{(x+1)\left(\frac{d}{dx}x^2\right) - x^2\left(\frac{d}{dx}x+\frac{d}{dx}1\right)}{(x+1)^2}\\ \dfrac{dy}{dx} = \dfrac{(x+1)(2x) - x^2(1+0)}{(x+1)^2}\\ \dfrac{dy}{dx} = \dfrac{2x^2+2x - x^2}{(x+1)^2}\\ \dfrac{dy}{dx} = \dfrac{x^2+2x}{(x+1)^2}\\$
2. Differentiate with respect to $x$: $y= \dfrac{x-1}{x+2}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{x-1}{x+2} \\ \dfrac{dy}{dx} = \dfrac{(x+2)\left(\frac{d}{dx}(x-1)\right) - (x-1)\left(\frac{d}{dx}(x+2)\right)}{(x+2)^2}\\ \dfrac{dy}{dx} = \dfrac{(x+2)(1) - (x-1)(1)}{(x+2)^2} \\ \dfrac{dy}{dx} = \dfrac{x+2-x+1}{(x+2)^2} \\ \dfrac{dy}{dx} = \dfrac{3}{(x+2)^2} \\$
3. Differentiate with respect to $x$: $y= \dfrac{2x^3 +4x-2}{x^2+x}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{2x^3 +4x-2}{x^2+x} \\ \dfrac{dy}{dx} = \dfrac{(x^2+x)\left(\frac{d}{dx}\left(2x^3 +4x-2\right)\right) - \left(2x^3 +4x-2\right)\left(\frac{d}{dx}\left(x^2+x\right)\right)}{(x^2+x)^2}\\ \dfrac{dy}{dx} = \dfrac{(x^2+x)\left(6x^2 +4\right) - \left(2x^3 +4x-2\right)\left(2x+1\right)}{(x^2+x)^2}\\ \dfrac{dy}{dx} = \dfrac{6x^4 + 4x^2 + 6x^3 + 4x -4x^4 - 2x^3 - 8x^2 - 4x + 4x + 2}{x^4+2x^3+x^2}\\ \dfrac{dy}{dx} = \dfrac{2x^4 + 4x^3 - 4x^2 + 4x + 2}{x^4+2x^3+x^2}\\$
4. Differentiate with respect to $x$: $y= \dfrac{\ln(x)}{x}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{\ln(x)}{x} \\ \dfrac{dy}{dx} = \dfrac{\left(\frac{d}{dx}\ln(x)\right)x-\ln(x)\left(\frac{d}{dx}x\right)}{x^2} \\ \dfrac{dy}{dx} = \dfrac{\left(\frac{1}{x}\right)x-\ln(x)(1)}{x^2} \\ \dfrac{dy}{dx} = \dfrac{1-\ln(x)}{x^2} \\$
5. Differentiate with respect to $x$: $y= \dfrac{\sin(x)+1}{\cos(x)-1}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{\sin(x)+1}{\cos(x)-1}\\ \dfrac{dy}{dx} = \dfrac{\left(\frac{d}{dx}\left(\sin(x)+1\right)\right)\left(\cos(x)-1\right)-\left(\sin(x)+1\right)\left(\frac{d}{dx}\left(\cos(x)-1\right)\right)}{\left(\cos(x)-1\right)^2} \\ \dfrac{dy}{dx} = \dfrac{\left(\frac{d}{dx}\sin(x)+\frac{d}{dx}1\right)\left(\cos(x)-1\right)-\left(\sin(x)+1\right)\left(\frac{d}{dx}\cos(x)-\frac{d}{dx}1\right)}{\left(\cos(x)-1\right)^2} \\ \dfrac{dy}{dx} = \dfrac{\left(\cos(x)+0\right)\left(\cos(x)-1\right)-\left(\sin(x)+1\right)\left(-\sin(x)-0\right)}{\left(\cos(x)-1\right)^2} \\ \dfrac{dy}{dx} = \dfrac{\cos^2(x)-\cos(x) + \sin^2(x) + \sin(x)}{\left(\cos(x)-1\right)^2} \\ \dfrac{dy}{dx} = \dfrac{1 - \cos(x) + \sin(x)}{\left(\cos(x)-1\right)^2} \\$
6. Differentiate with respect to $x$: $y= \dfrac{1}{\ln(x)+2}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{1}{\ln(x)+2}\\ \dfrac{dy}{dx} = \dfrac{\left(\ln(x)+2\right)\left(\dfrac{d}{dx}1\right) - 1\cdot\dfrac{d}{dx}\left(\ln(x)+2\right)}{\left(\ln(x)+2\right)^2}\\ \dfrac{dy}{dx} = \dfrac{\left(\ln(x)+2\right)\left(0\right) - 1\cdot\left(\frac{1}{x}+0\right)}{\left(\ln(x)+2\right)^2}\\ \dfrac{dy}{dx} = \dfrac{-\frac{1}{x}}{\ln^2(x)+4\ln(x) + 4}\\ \dfrac{dy}{dx} = \dfrac{-1}{x\left(\ln^2(x)+4\ln(x) + 4\right)}\\$
7. Differentiate with respect to $x$ using the Quotient Rule: $y= e^{x}\sec(x)$

$\dfrac{d}{dx}y = \dfrac{d}{dx}e^{x}\sec(x)\\ \dfrac{dy}{dx} = \dfrac{e^x}{\cos(x)} \\ \dfrac{dy}{dx} = \dfrac{\cos(x)\left(\frac{d}{dx}e^x\right) - \left(\frac{d}{dx}\cos(x)\right)e^x}{\cos^2(x)} \\ \dfrac{dy}{dx} = \dfrac{\cos(x)\left(e^x\right) - \left(-\sin(x)\right)e^x}{\cos^2(x)} \\ \dfrac{dy}{dx} = \dfrac{\cos(x)e^x + \sin(x)e^x}{\cos^2(x)} \\$
8. Derive the derivative of the tangent function using the Quotient Rule.

$\tan(x) = \dfrac{\sin(x)}{\cos(x)} \\ \dfrac{d}{dx} \tan(x) = \dfrac{d}{dx}\dfrac{\sin(x)}{\cos(x)} \\ \dfrac{d}{dx} \tan(x) = \dfrac{\cos(x)\left(\frac{d}{dx}\sin(x)\right) - \left(\frac{d}{dx}\cos(x)\right)\sin(x)}{\cos^2(x)} \\ \dfrac{d}{dx} \tan(x) = \dfrac{\cos(x)(\cos(x)) - (-\sin(x))\sin(x)}{\cos^2(x)} \\ \dfrac{d}{dx} \tan(x) = \dfrac{\cos^2(x) + \sin^2(x)}{\cos^2(x)} \\ \dfrac{d}{dx} \tan(x) = \dfrac{1}{\cos^2(x)} \\ \dfrac{d}{dx} \tan(x) = \sec^2(x) \\$
9. Differentiate with respect to $x$: $y= \dfrac{\ln(x) + \sin(x)}{e^x}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{\ln(x) + \sin(x)}{e^x} \\ \dfrac{dy}{dx} = \dfrac{ e^x\left(\frac{d}{dx}\left(\ln(x)+\sin(x)\right)\right) - \left(\ln(x) + \sin(x)\right)\left(\frac{d}{dx}e^x\right)}{\left(e^x\right)^2} \\ \dfrac{dy}{dx} = \dfrac{e^x\left(\frac{d}{dx}\ln(x)+\frac{d}{dx}\sin(x)\right) - \left(\ln(x) + \sin(x)\right)\left(\frac{d}{dx}e^x\right)}{e^{2x}} \\ \dfrac{dy}{dx} = \dfrac{e^x\left(\frac{1}{x}+\cos(x)\right) - \left(\ln(x) + \sin(x)\right)\left(e^x\right)}{e^{2x}} \\ \dfrac{dy}{dx} = \dfrac{e^x\left(\frac{1}{x} + \cos(x) -\ln(x) - \sin(x)\right)}{e^{2x}} \\ \dfrac{dy}{dx} = \dfrac{\frac{1}{x} + \cos(x) -\ln(x) - \sin(x)}{e^{x}} \\$
10. Differentiate with respect to $x$: $y= \dfrac{e^x-1}{e^x+1}$

$\dfrac{d}{dx}y = \dfrac{d}{dx}\dfrac{e^x-1}{e^x+1} \\ \dfrac{dy}{dx} = \dfrac{\left(e^x+1\right)\left(\frac{d}{dx}\left(e^x-1\right)\right) - \left(e^x-1\right)\left(\frac{d}{dx}\left(e^x+1\right)\right)}{\left(e^x+1\right)^2} \\ \dfrac{dy}{dx} = \dfrac{\left(e^x+1\right)\left(e^x\right) - \left(e^x-1\right)\left(e^x\right)}{e^{2x}+2e^x + 1} \\ \dfrac{dy}{dx} = \dfrac{e^{2x}+e^x - e^{2x}+e^x}{e^{2x}+2e^x + 1} \\ \dfrac{dy}{dx} = \dfrac{2e^x}{e^{2x}+2e^x + 1} \\$