3.2 The Product and the Quotient Rule

The Product Rule

In this section, we deal with finding the derivative of a product of functions.

Theorem (Product Rule): Let \(f\) and \(g\) be differentiable function. Then \[\dfrac{d}{dx}(f(x)g(x)) = g(x)\dfrac{d}{dx}f(x) + f(x) \dfrac{d}{dx} g(x).\]

Essentially, if you are taking the derivative of a product of two functions, you differentiate the first function, multiply that by the second function, take the derivative of the second function, multiply that by the first function then add the two products together. In other words, \[(uv)^{\prime} = u^{\prime}v+ v^{\prime}u.\]

Example: Differentiate \(y = x^2e^x\).

Solution: Let \(u = x^2\) and \(v = e^x\). Then, \(u^{\prime} = 2x\) and \(v^{\prime} = e^x\). By the product rule, \[\begin{align*} \dfrac{d}{dx} x^2e^x &= \dfrac{d}{dx} uv\\ &= u^{\prime} v + v^{\prime} u\\ &= 2x(e^x) + e^x(x^2). \end{align*}\] Therefore, \(y^{\prime} = 2x(e^x) + e^x(x^2)\).

Example: Find the derivative of \(f(x) = (x^4 + 5x^3 + 4x^3 + 2x + 1)2^x\).

Solution: Let \(u = x^4 + 5x^3 + 4x^3 + 2x + 1\) and \(v = 2^x\). Then, \(u^{\prime} = 4x^3 + 15x^2 + 12x^2 + 2\) and \(v^{\prime} = 2^x\ln 2\). By the product rule, \[\begin{align*} \dfrac{d}{dx} (x^4 + 5x^3 + &4x^3 + 2x + 1)2^x\\ &= \dfrac{d}{dx} uv\\ &= u^{\prime} v + v^{\prime} u\\ &= 4x^3 + 15x^2 + 12x^2 + 2(2^x) + 2^x\ln 2(x^4 + 5x^3 + 4x^3 + 2x + 1). \end{align*}\] So, \(f^{\prime}(x) = 4x^3 + 15x^2 + 12x^2 + 2(2^x) + 2^x\ln 2(x^4 + 5x^3 + 4x^3 + 2x + 1)\).

Example: Find \(f^{\prime}(x)\) given \(f(x) = 2^xe^{x-1}\).

Solution: First, note that \(e^{x-1} = e^x/e = \frac{1}{e}e^x\). So, \(f(x) = \frac{1}{e} 2^xe^x\). Now, let \(u = 2^x\) and \(v = e^x\). Then, \(u^{\prime} = 2^x\ln 2\) and \(v^{\prime} = e^x\). By the product rule, \[\begin{align*} \dfrac{d}{dx} \dfrac{1}{e}2^xe^x &= \dfrac{1}{e} \dfrac{d}{dx} uv\\ &= \dfrac{1}{e} \left(u^{\prime} v + v^{\prime} u \right)\\ &= \dfrac{1}{e}\left(2^x\ln 2 e^x + 2^xe^x \right). \end{align*}\] Therefore, \(f^{\prime}(x) = \dfrac{1}{e}\left(2^x\ln 2 e^x + 2^xe^x \right)\).

Practice Problems

  1. Differentiate.
  • \(y = x^3e^x\)
  • \(y = x 2^x\)
  • \(y = (x^2 + x + 1)e^x\)
  • \(y = 2^x(e^x + e^x)\)
  • \(y = \ln(5)(x^2 + 1)3^x\)
  • \(y = 2^x \left(\dfrac{x^2 + 3x+2}{x+1}\right)\)
  • \(y = e^x\sqrt{x}\)
  • \(y = \ln(2)e^{x+2} 4^{2x}\)
  • \(y = (x^2 + 3x + 1)\sqrt{x}\)
  • \(y = x^{-2}(4+5x^{-3}\)
  1. If \(f(2) = -8\), \(f^{\prime}(2) = 5\), \(g(2) = 15\) and \(g^{\prime}(2) = -3\), find \((fg)^{\prime}(2)\).

  2. If \(f(x) = x^3g(x)\), \(g(7) = 2\) and \(g^{\prime}(7) = -9\), find \(f^{\prime}(7)\).

  3. Find the equation of the tangent line to each of the following functions at the indicated point.

  • \(y = 2xe^x + 3\) at \(a = 0\)
  • \(y = x^22^x\) at \(a = 1\)
  • \(y = \sqrt{x}e^x\) at \(a = 1\)
  • \(y = (1 + 5\sqrt{x})(4-2x)\) at \(a = 9\).

Proof of the Product Rule

Theorem (Product Rule): Let \(f\) and \(g\) be differentiable function. Then \[\dfrac{d}{dx}(f(x)g(x)) = g(x)\dfrac{d}{dx}f(x) + f(x) \dfrac{d}{dx} g(x).\]

Proof: Let \(f\) and \(g\) be differentiable functions. We need to show that \[\dfrac{d}{dx}(f(x)g(x)) = \lim_{h \rightarrow 0} \dfrac{f(x + h)g(x+h) - f(x)g(x)}{h} = g(x)\dfrac{d}{dx}f(x) + f(x) \dfrac{d}{dx} g(x).\] Since \(f\) and \(g\) are differentiable, we know that \[\dfrac{d}{dx} f(x) = \lim_{h \rightarrow 0} \dfrac{f(x+h) - f(x)}{h} \;\;\; \text{ and } \;\;\; \dfrac{d}{dx} g(x) = \lim_{h \rightarrow 0} \dfrac{g(x+h) - g(x)}{h}\] both exist. Observe that, \[\begin{align*} \dfrac{d}{dx}(f(x)g(x)) &= \lim_{h \rightarrow 0} \dfrac{f(x + h)g(x+h) - f(x)g(x)}{h}\\ &= \mathop {\lim }\limits_{h \to 0} \frac{{f\left( {x + h} \right)g\left( {x + h} \right) - g\left( {x + h} \right)f\left( x \right) + g\left( {x + h} \right)f\left( x \right) - f\left( x \right)g\left( x \right)}}{h}\\ &= \mathop {\lim }\limits_{h \to 0} \frac{{g\left( {x + h} \right)\left( {f\left( {x + h} \right) - f\left( x \right)} \right)}}{h} + \mathop {\lim }\limits_{h \to 0} \frac{{f\left( x \right)\left( {g\left( {x + h} \right) - g\left( x \right)} \right)}}{h}\\ & = \mathop {\lim }\limits_{h \to 0} g\left( {x + h} \right)\frac{{f\left( {x + h} \right) - f\left( x \right)}}{h} + \mathop {\lim }\limits_{h \to 0} f\left( x \right)\frac{{g\left( {x + h} \right) - g\left( x \right)}}{h}\\ & = \mathop {\lim }\limits_{h \to 0} g\left( {x + h} \right) \lim_{h \rightarrow 0}\frac{{f\left( {x + h} \right) - f\left( x \right)}}{h} + \mathop {\lim }\limits_{h \to 0} f\left( x \right) \lim_{h \rightarrow 0} \frac{{g\left( {x + h} \right) - g\left( x \right)}}{h}\\ &= g(x) \dfrac{d}{dx}f(x) + f(x) \dfrac{d}{dx} g(x). \end{align*}\]

Practice Problems

  1. If \(f\), \(g\) and \(h\) are all differentiable functions, prove that \[\dfrac{d}{dx} f(x)g(x)h(x) = g(x)h(x) \dfrac{d}{dx}f(x) + f(x)h(x) \dfrac{d}{dx}g(x) + f(x)g(x) \dfrac{d}{dx}h(x).\]

  2. Calculate \(f^{(n)}(x)\) for \(f(x) = x^ne^x\) at \(x = 0\).

The Quotient Rule

The quotient rule is a rule that helps find the derivative of the quotient of two functions.

Theorem (Quotient Rule): Let \(f\) and \(g\) be differentiable function. Then \[\dfrac{d}{dx}\left(\dfrac{f(x)}{g(x)}\right) = \dfrac{g(x)\dfrac{d}{dx}f(x) - f(x) \dfrac{d}{dx} g(x)}{g(x)^2}.\]

If you want to find the derivative of the quotient of two functions, take the function in the denominator square it and put it in the denominator. Take the denominator of the original and put a copy of it in the numerator. Multiply that by the derivative of the numerator and subtract the product of the derivative of the denominator and the original numerator. Essentially, \[\left( \dfrac{u}{v} \right)^{\prime} = \dfrac{u^{\prime}v - v^{\prime}u}{v^2}.\]

Example: Let \(y = \dfrac{x^3}{e^x}\). Find \(y^{\prime}\).

Solution: Let \(u = x^3\) and \(v = e^x\). Then, we know that \(u^{\prime} = 3x^2\) and \(v^{\prime} = e^x\). By the quotient rule, \[\begin{align*} y^{\prime} &= \dfrac{d}{dx} \dfrac{x^3}{e^x}\\ &= \dfrac{d}{dx} \dfrac{u}{v}\\ &= \dfrac{u^{\prime}v - v^{\prime}u}{v^2}\\ &= \dfrac{3x^2e^x - e^xx^3}{(e^x)^2}\\ &= \dfrac{e^x(3x^2- x^3)}{(e^x)^2}\\ &= \dfrac{3x^2- x^3}{e^x}. \end{align*}\] Therefore, by the quotient rule, we see that \(y^{\prime} = \dfrac{3x^2-x^3}{e^x}\).

Example: Let \(y = \dfrac{1}{x + 5}\). Find \(\dfrac{dy}{dx}\).

Solution: Let \(u = 1\) and \(v = x+5\). Then, we know that \(u^{\prime} = 0\) and \(v^{\prime} = 1\). By the quotient rule, \[\begin{align*} \dfrac{dy}{dx} &= \dfrac{d}{dx} \dfrac{1}{x+5}\\ &= \dfrac{d}{dx} \dfrac{u}{v}\\ &= \dfrac{u^{\prime}v - v^{\prime}u}{v^2}\\ &= \dfrac{0(x+5) - 1(1)}{(x+5)^2}\\ &= \dfrac{1}{(x+5)^2}. \end{align*}\] Therefore, by the quotient rule, we see that \(\dfrac{dy}{dx} = \dfrac{1}{(x+5)^2}\).

Example: Differentiate \(\dfrac{x^2}{x^3 + x + 1}\).

Set \(y = \dfrac{x^2}{x^3 + x + 1}\). Let \(u = x^2\) and \(v = x^3 + x + 1\). Then, we know that \(u^{\prime} = 2x\) and \(v^{\prime} = 3x^2 + 1\). By the quotient rule, \[\begin{align*} y^{\prime} &= \dfrac{d}{dx} \dfrac{x^2}{x^3 + x + 1}\\ &= \dfrac{d}{dx} \dfrac{u}{v}\\ &= \dfrac{u^{\prime}v - v^{\prime}u}{v^2}\\ &= \dfrac{2x(x^3 + x + 1) - (3x^2 + 1)(x^2)}{(x^3 + x + 1)^2}\\ &= \dfrac{2x^4 + 2x^2 + 2x - 3x^4-x^2}{(x^3 + x + 1)^2}\\ &= \dfrac{-x^4 + x^2 + 2x}{(x^3 + x + 1)^2}. \end{align*}\] Therefore, by the quotient rule, we see that \(y^{\prime} = \dfrac{-x^4 + x^2 + 2x}{(x^3 + x + 1)^2}\). :::

Example: Let \(f(x) = \dfrac{2^x}{\sqrt{x}e^x}\). Find \(f^{\prime}(x)\).

Solution: Let \(u = 2^x\) and \(v = \sqrt{x}e^x\). Then, we know that \(u^{\prime} = 2^x\ln(2)\) and we note that since \(v\) is a product of two functions, we need to use the product rule to find the derivative of \(v\). If we let \(m = \sqrt{x}\) and \(n = e^x\), then \(v = mn\) and \(v^{\prime} = m^{\prime}n + n^{\prime}m\), where \(m^{\prime} = (1/2)x^{-1/2}\) and \(n^{\prime} = e^x\). So, \(v^{\prime} = (1/2)x^{-1/2}e^x + e^x\sqrt{x}\). By the quotient rule, \[\begin{align*} f^{\prime}(x) &= \dfrac{d}{dx} \dfrac{2^x}{\sqrt{x}e^x}\\ &= \dfrac{d}{dx} \dfrac{u}{v}\\ &= \dfrac{u^{\prime}v - v^{\prime}u}{v^2}\\ &= \dfrac{2^x\ln(x)(\sqrt{x}e^x) - ((1/2)x^{-1/2}e^x + e^x\sqrt{x})2^x}{(\sqrt{x}e^x)^2}\\ &= \dfrac{e^x(2^x\ln(x)\sqrt{x} - (1/2)x^{-1/2}2^x - \sqrt{x}2^x)}{x(e^x)^2}\\ &= \dfrac{2^x\ln(x)\sqrt{x} - (1/2)x^{-1/2}2^x - \sqrt{x}2^x}{xe^x}. \end{align*}\] Therefore, by the quotient rule, \(f^{\prime}(x) = \dfrac{2^x\ln(x)\sqrt{x} - (1/2)x^{-1/2}2^x - \sqrt{x}2^x}{xe^x}\).

Practice Problems

  1. Differentiate.
  • \(y = \dfrac{x^4}{3e^x}\)
  • \(y = \dfrac{x}{2^x}\)
  • \(y = \dfrac{e^x}{x^2 + x + 1}\)
  • \(y = \dfrac{3^x}{e^x + 2^x}\)
  • \(y = \dfrac{\ln(5)4^x}{x^2 + 1}\)
  • \(y = \dfrac{\sqrt{x}}{2^x}\)
  • \(y = \dfrac{e^x}{\sqrt{x}}\)
  • \(y = \dfrac{\ln(2)e^{x+2}}{ 4^{2x}}\)
  • \(y = \dfrac{x^2 + 3x + 1}{\sqrt{x}}\)
  • \(y = \dfrac{x^{-2}}{4+5x^{-3}}\)
  1. Find the derivative.
  • \(y = 2^x\dfrac{x^2}{5e^x}\)
  • \(y = \dfrac{x2^x}{x^3+1}\)
  • \(y = \dfrac{xe^x}{x + 1}\)
  • \(y = \dfrac{3^x}{x^2e^x}\)
  1. Find the equation of the tangent line to each of the following functions at the indicated point.
  • \(y = \dfrac{2x+1}{e^x}\) at \(a = 0\)
  • \(y = \dfrac{x^2}{\sqrt{x} + 1}\) at \(a = 1\)
  • \(y = \dfrac{3\sqrt{x}}{e^x}\) at \(a = 1\)
  • \(y = \dfrac{(1 + 5\sqrt{x})e^x}{4-2x}\) at \(a = 0\).

Proof of the Quotient Rule

Theorem (Quotient Rule): Let \(f\) and \(g\) be differentiable function. Then \[\dfrac{d}{dx}(\dfrac{f(x)}{g(x)}) = \dfrac{g(x)\dfrac{d}{dx}f(x) - f(x) \dfrac{d}{dx} g(x)}{g(x)^2}.\]

Proof: Let \(f\) and \(g\) be differentiable functions. We need to show that \[\dfrac{d}{dx}(\dfrac{f(x)}{g(x)}) = \lim_{h \rightarrow 0} \dfrac{\frac{f(x + h)}{g(x+h)} - \frac{f(x)}{g(x)}}{h} = \dfrac{g(x)\dfrac{d}{dx}f(x) - f(x) \dfrac{d}{dx} g(x)}{g(x)^2}.\] Since \(f\) and \(g\) are differentiable, we know that \[\dfrac{d}{dx} f(x) = \lim_{h \rightarrow 0} \dfrac{f(x+h) - f(x)}{h} \;\;\; \text{ and } \;\;\; \dfrac{d}{dx} g(x) = \lim_{h \rightarrow 0} \dfrac{g(x+h) - g(x)}{h}\] both exist. Observe that, \[\begin{align*}\dfrac{d}{dx}\left(\dfrac{f(x)}{g(x)}\right) &= \mathop {\lim }\limits_{h \to 0} \frac{{\frac{{f\left( {x + h} \right)}}{{g\left( {x + h} \right)}} - \frac{{f\left( x \right)}}{{g\left( x \right)}}}}{h}\\ &= \mathop {\lim }\limits_{h \to 0} \frac{1}{h}\,\,\frac{{f\left( {x + h} \right)g\left( x \right) - f\left( x \right)g\left( {x + h} \right)}}{{g\left( {x + h} \right)g\left( x \right)}}\\ &= \mathop {\lim }\limits_{h \to 0} \frac{1}{h}\,\,\frac{{f\left( {x + h} \right)g\left( x \right) - f\left( x \right)g\left( x \right) + f\left( x \right)g\left( x \right) - f\left( x \right)g\left( {x + h} \right)}}{{g\left( {x + h} \right)g\left( x \right)}}\\ &= \mathop {\lim }\limits_{h \to 0} \frac{1}{{g\left( {x + h} \right)g\left( x \right)}}\,\,\frac{{f\left( {x + h} \right)g\left( x \right) - f\left( x \right)g\left( x \right) + f\left( x \right)g\left( x \right) - f\left( x \right)g\left( {x + h} \right)}}{h}\\ &= \mathop {\lim }\limits_{h \to 0} \frac{1}{{g\left( {x + h} \right)g\left( x \right)}}\,\,\left( {\frac{{f\left( {x + h} \right)g\left( x \right) - f\left( x \right)g\left( x \right)}}{h} + \frac{{f\left( x \right)g\left( x \right) - f\left( x \right)g\left( {x + h} \right)}}{h}} \right)\\ &= \mathop {\lim }\limits_{h \to 0} \frac{1}{{g\left( {x + h} \right)g\left( x \right)}}\,\,\left( {g\left( x \right)\frac{{f\left( {x + h} \right) - f\left( x \right)}}{h} - f\left( x \right)\frac{{g\left( {x + h} \right) - g\left( x \right)}}{h}} \right)\\ & = \frac{1}{{\mathop {\lim }\limits_{h \to 0} g\left( {x + h} \right)\mathop {\lim }\limits_{h \to 0} g\left( x \right)}}\,\left( {\left( {\mathop {\lim }\limits_{h \to 0} g\left( x \right)} \right)\left( {\mathop {\lim }\limits_{h \to 0} \frac{{f\left( {x + h} \right) - f\left( x \right)}}{h}} \right) - } \right.\\ & \hspace{2.25in}\left. {\left( {\mathop {\lim }\limits_{h \to 0} f\left( x \right)} \right)\left( {\mathop {\lim }\limits_{h \to 0} \frac{{g\left( {x + h} \right) - g\left( x \right)}}{h}} \right)} \right)\\ & = \frac{1}{{g\left( x \right)g\left( x \right)}}\,\,\left( {g\left( x \right)f'\left( x \right) - f\left( x \right)g'\left( x \right)} \right)\\ & = \dfrac{g(x)\dfrac{d}{dx}f(x) - f(x) \dfrac{d}{dx} g(x)}{g(x)^2}. \end{align*}\]

Practice Problems

  1. If \(g\) is differentiable, find \(f^{\prime}(x)\) given \[f(x) = \dfrac{g(x)}{x^3}.\]

  2. If \(g\) is differentiable, find \(f^{\prime}(x)\) given \[f(x) = \dfrac{1 + x^2g(x)}{x}.\]

  3. If \(g\) is differentiable, find \(f^{\prime}(x)\) given \[f(x) = \dfrac{2 + xg(x)}{\sqrt{x}}.\]

  4. Calculate \(f^{(n)}(x)\) for \(f(x) = \dfrac{x^n}{e^x}\) at \(x = 0\).

  5. If \(f\) and \(g\) are differentiable, find \(\left(\dfrac{f}{g}\right)^{\prime}(4)\) given \(f(4) = 5\), \(f^{\prime}(4) = -3\), \(g(4) = 6\) and \(g^{\prime}(4) = 5\).

  6. If \(f\), \(g\) and \(h\) are differentiable, find \(\dfrac{d}{dx} \dfrac{f(x)/g(x)}{h(x)}\) assuming \(h(x), g(x) \not = 0\).

  7. Define \(\sinh(x) = \dfrac{e^x - e^{-x}}{2}\) as the hyperbolic sine function. Find the derivative of \(\sinh(x)\).

  8. Define \(\cosh(x) = \dfrac{e^x + e^{-x}}{2}\) as the hyperbolic cosine function. Find the derivative of \(\cosh(x)\).