# Product Rule and Quotient Rule

## Introduction

Taking the derivatives of simple functions (i.e. polynomials) is easy using the power rule.

For example, if  $f(x)=x^{3}+2x^{2}+5x+3,$ then  $f'(x)=3x^{2}+4x+5.$ But, what about more complicated functions?

For example, what is  $f'(x)$ when  $f(x)=\sin x\cos x?$ Or what about  $g'(x)$ when  $g(x)={\frac {x}{x+1}}?$ Notice  $f(x)$ is a product, and  $g(x)$ is a quotient. So, to answer the question of how to calculate these derivatives, we look to the Product Rule and the Quotient Rule. The Product Rule and the Quotient Rule give us formulas for calculating these derivatives.

Product Rule

Let  $h(x)=f(x)g(x).$ Then,

$h'(x)=f(x)g'(x)+f'(x)g(x).$ Quotient Rule

Let  $h(x)={\frac {f(x)}{g(x)}}.$ Then,

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

Calculate  $f'(x).$ 1)   $f(x)=(x^{2}+x+1)(x^{3}+2x^{2}+4)$ Solution:
Using the Product Rule, we have
$f'(x)=(x^{2}+x+1)(x^{3}+2x^{2}+4)'+(x^{2}+x+1)'(x^{3}+2x^{2}+4).$ Then, using the Power Rule, we have
$f'(x)=(x^{2}+x+1)(3x^{2}+4x)+(2x+1)(x^{3}+2x^{2}+4).$ NOTE: It is not necessary to use the Product Rule to calculate the derivative of this function.
You can distribute the terms and then use the Power Rule.
In this case, we have
${\begin{array}{rcl}\displaystyle {f(x)}&=&\displaystyle {(x^{2}+x+1)(x^{3}+2x^{2}+4)}\\&&\\&=&\displaystyle {x^{2}(x^{3}+2x^{2}+4)+x(x^{3}+2x^{2}+4)+1(x^{3}+2x^{2}+4)}\\&&\\&=&\displaystyle {x^{5}+2x^{4}+4x^{2}+x^{4}+2x^{3}+4x+x^{3}+2x^{2}+4}\\&&\\&=&\displaystyle {x^{5}+3x^{4}+3x^{3}+6x^{2}+4x+4.}\end{array}}$ Now, using the Power Rule, we get
$f'(x)=5x^{4}+12x^{3}+9x^{2}+12x+4.$ In general, calculating derivatives in this way is tedious. It would be better to use the Product Rule.
$f'(x)=(x^{2}+x+1)(3x^{2}+4x)+(2x+1)(x^{3}+2x^{2}+4)$ or equivalently
$f'(x)=x^{5}+3x^{4}+3x^{3}+6x^{2}+4x+4$ 2)   $f(x)={\frac {x^{2}+x^{3}}{x}}$ Solution:

Using the Quotient Rule, we have

$f'(x)={\frac {x(x^{2}+x^{3})'-(x^{2}+x^{3})(x)'}{x^{2}}}.$ Then, using the Power Rule, we have
$f'(x)={\frac {x(2x+3x^{2})-(x^{2}+x^{3})(1)}{x^{2}}}.$ NOTE: It is not necessary to use the Quotient Rule to calculate the derivative of this function.
You can divide and then use the Power Rule.
In this case, we have
${\begin{array}{rcl}\displaystyle {f(x)}&=&\displaystyle {\frac {x^{2}+x^{3}}{x}}\\&&\\&=&\displaystyle {{\frac {x^{2}}{x}}+{\frac {x^{3}}{x}}}\\&&\\&=&\displaystyle {x+x^{2}.}\\\end{array}}$ Now, using the Power Rule, we get
$f'(x)=1+2x.$ $f'(x)={\frac {x(2x+3x^{2})-(x^{2}+x^{3})}{x^{2}}}$ or equivalently
$f'(x)=1+2x$ 3)   $f(x)={\frac {\sin x}{\cos x}}$ Solution:
Using the Quotient Rule, we get
${\begin{array}{rcl}\displaystyle {f'(x)}&=&\displaystyle {\frac {\cos x(\sin x)'-\sin x(\cos x)'}{(\cos x)^{2}}}\\&&\\&=&\displaystyle {\frac {\cos x(\cos x)-\sin x(-\sin x)}{(\cos x)^{2}}}\\&&\\&=&\displaystyle {\frac {\cos ^{2}x+\sin ^{2}x}{\cos ^{2}x}}\\&&\\&=&\displaystyle {\frac {1}{\cos ^{2}x}}\\&&\\&=&\displaystyle {\sec ^{2}x}\end{array}}$ since  $\sin ^{2}x+\cos ^{2}x=1$ and  $\sec x={\frac {1}{\cos x}}.$ Since  ${\frac {\sin x}{\cos x}}=\tan x,$ we have
${\frac {d}{dx}}{\tan x}=\sec ^{2}x.$ $f'(x)=\sec ^{2}x$ ## Exercise 1

Calculate the derivative of  $f(x)={\frac {1}{x^{2}}}(\csc x-4).$ First, we need to know the derivative of  $\csc x.$ Recall

$\csc x={\frac {1}{\sin x}}.$ Now, using the Quotient Rule, we have

${\begin{array}{rcl}\displaystyle {{\frac {d}{dx}}(\csc x)}&=&\displaystyle {{\frac {d}{dx}}{\bigg (}{\frac {1}{\sin x}}{\bigg )}}\\&&\\&=&\displaystyle {\frac {\sin x(1)'-1(\sin x)'}{\sin ^{2}x}}\\&&\\&=&\displaystyle {\frac {\sin x(0)-\cos x}{\sin ^{2}x}}\\&&\\&=&\displaystyle {\frac {-\cos x}{\sin ^{2}x}}\\&&\\&=&\displaystyle {-\csc x\cot x.}\end{array}}$ Using the Product Rule and Power Rule, we have

${\begin{array}{rcl}\displaystyle {f'(x)}&=&\displaystyle {{\frac {1}{x^{2}}}(\csc x-4)'+{\bigg (}{\frac {1}{x^{2}}}{\bigg )}'(\csc x-4)}\\&&\\&=&\displaystyle {{\frac {1}{x^{2}}}(-\csc x\cot x+0)+(-2x^{-3})(\csc x-4)}\\&&\\&=&\displaystyle {{\frac {-\csc x\cot x}{x^{2}}}+{\frac {-2(\csc x-4)}{x^{3}}}.}\end{array}}$ So, we have

$f'(x)={\frac {-\csc x\cot x}{x^{2}}}+{\frac {-2(\csc x-4)}{x^{3}}}.$ ## Exercise 2

Calculate the derivative of  $g(x)=2x\sin x\sec x.$ Notice that the function  $g(x)$ is the product of three functions.

We start by grouping two of the functions together. So, we have  $g(x)=(2x\sin x)\sec x.$ Using the Product Rule, we get

${\begin{array}{rcl}\displaystyle {g'(x)}&=&\displaystyle {(2x\sin x)(\sec x)'+(2x\sin x)'\sec x}\\&&\\&=&\displaystyle {(2x\sin x)(\tan ^{2}x)+(2x\sin x)'\sec x.}\end{array}}$ Now, we need to use the Product Rule again. So,

${\begin{array}{rcl}\displaystyle {g'(x)}&=&\displaystyle {2x\sin x\tan ^{2}x+(2x(\sin x)'+(2x)'\sin x)\sec x}\\&&\\&=&\displaystyle {2x\sin x\tan ^{2}x+(2x\cos x+2\sin x)\sec x.}\end{array}}$ So, we have

$g'(x)=2x\sin x\tan ^{2}x+(2x\cos x+2\sin x)\sec x.$ But, there is another way to do this problem. Notice

${\begin{array}{rcl}\displaystyle {g(x)}&=&\displaystyle {2x\sin x\sec x}\\&&\\&=&\displaystyle {2x\sin x{\frac {1}{\cos x}}}\\&&\\&=&\displaystyle {2x\tan x.}\end{array}}$ Now, you would only need to use the Product Rule once instead of twice.

## Exercise 3

Calculate the derivative of  $h(x)={\frac {x^{2}\sin x+1}{x^{2}\cos x+3}}.$ Using the Quotient Rule, we have

$h'(x)={\frac {(x^{2}\cos x+3)(x^{2}\sin x+1)'-(x^{2}\sin x+1)(x^{2}\cos x+3)'}{(x^{2}\cos x+3)^{2}}}.$ Now, we need to use the Product Rule. So, we have

${\begin{array}{rcl}\displaystyle {h'(x)}&=&\displaystyle {\frac {(x^{2}\cos x+3)(x^{2}(\sin x)'+(x^{2})'\sin x)-(x^{2}\sin x+1)(x^{2}(\cos x)'+(x^{2})'\cos x)}{(x^{2}\cos x+3)^{2}}}\\&&\\&=&\displaystyle {{\frac {(x^{2}\cos x+3)(x^{2}\cos x+2x\sin x)-(x^{2}\sin x+1)(-x^{2}\sin x+2x\cos x)}{(x^{2}\cos x+3)^{2}}}.}\end{array}}$ So, we get

$h'(x)={\frac {(x^{2}\cos x+3)(x^{2}\cos x+2x\sin x)-(x^{2}\sin x+1)(-x^{2}\sin x+2x\cos x)}{(x^{2}\cos x+3)^{2}}}.$ ## Exercise 4

Calculate the derivative of  $f(x)={\frac {e^{x}}{x^{2}\sin x}}.$ First, using the Quotient Rule, we have

${\begin{array}{rcl}\displaystyle {f'(x)}&=&\displaystyle {\frac {x^{2}\sin x(e^{x})'-e^{x}(x^{2}\sin x)'}{(x^{2}\sin x)^{2}}}\\&&\\&=&\displaystyle {{\frac {x^{2}\sin xe^{x}-e^{x}(x^{2}\sin x)'}{x^{4}\sin ^{2}x}}.}\end{array}}$ Now, we need to use the Product Rule. So, we have

${\begin{array}{rcl}\displaystyle {f'(x)}&=&\displaystyle {\frac {x^{2}\sin xe^{x}-e^{x}(x^{2}(\sin x)'+(x^{2})'\sin x)}{x^{4}\sin ^{2}x}}\\&&\\&=&\displaystyle {{\frac {x^{2}\sin xe^{x}-e^{x}(x^{2}\cos x+2x\sin x)}{x^{4}\sin ^{2}x}}.}\end{array}}$ So, we have

$f'(x)={\frac {x^{2}\sin xe^{x}-e^{x}(x^{2}\cos x+2x\sin x)}{x^{4}\sin ^{2}x}}.$ 