Skip to main content
Mathematics LibreTexts

1.4: Derivatives of Sums, Products and Quotients

  • Page ID
    139432
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Derivatives of Sums, Products and Quotients

    So far the derivatives of only a few simple functions have been calculated. The following rules will make it easier to calculate derivatives of more functions:

    The above rules can be written using the prime notation for derivatives: The proof of the Sum Rule is straightforward. Since \(\dfdx\) and \(\dgdx\) both exist then:

    \[\begin{aligned} \ddx\,(f + g) ~&=~ \dfrac{(f + g)(x + \dx) ~-~ (f + g)(x)}{\dx} ~=~ \dfrac{f(x + \dx) ~+~ g(x + \dx) ~-~ (f(x) ~+~ g(x))}{\dx}\

    \[6pt] &=~ \dfrac{f(x + \dx) ~-~ f(x) ~+~ g(x + \dx) ~-~ g(x)}{\dx} ~=~ \dfrac{f(x + \dx) ~-~ f(x)}{\dx} ~+~ \dfrac{g(x + \dx) ~-~ g(x)}{\dx}\

    \[6pt] &=~ \dfdx ~+~ \dgdx \qquad \checkmark\end{aligned} \nonumber \]

    The proofs of the Difference and Constant Multiple Rules are similar and are left as exercises.

    Note that by the Product Rule, in general the derivative of a product is not the product of the derivatives. That is, \(\frac{d(f \cdot g)}{\dx} \ne \dfdx \cdot \dgdx\). This should be obvious from some earlier examples. For instance, if \(f(x) = x\) and \(g(x) = 1\) then \((f \cdot g)(x) = x \cdot 1 = x\) so that \(\frac{d(f \cdot g)}{\dx} = 1\), but \(\dfdx \cdot \dgdx = 1 \cdot 0 = 0\).

    There is a proof of the Product Rule similar to the proof of the Sum Rule (see Exercise 20), but there is a more geometric way of seeing why the formula holds, described below.

    Construct a rectangle whose perpendicular sides have lengths \(f(x)\) and \(g(x)\) for some \(x\), as in the drawing on the right. Change \(x\) by some infinitesimal amount \(\dx\), which produces infinitesimal changes \(\df\) and \(\dg\) in \(f(x)\) and \(g(x)\), respectively. Assume those changes are positive and extend the original rectangle by those amounts, creating a larger rectangle with perpendicular sides \(f(x + \dx)\) and \(g(x + \dx)\). Then

    \[\begin{aligned} d(f \cdot g) ~&=~ (f \cdot g)(x + \dx) ~-~ (f \cdot g)(x)\\ &=~ f(x + \dx) \cdot g(x + \dx) ~-~ f(x) \cdot g(x) &\\ &=~ \text{(area of outer rectangle)} ~-~ \text{(area of original rectangle)}\\ &=~ \text{sum of the areas of the three shaded inner rectangles}\\ &=~ f(x) \cdot \dg ~+~ g(x) \cdot \df ~+~ \df \cdot \dg\\ &=~ f(x) \cdot \dg ~+~ g(x) \cdot \df ~+~ (f'(x)\;\dx) \cdot (g'(x)\;\dx)\\ &=~ f(x) \cdot \dg ~+~ g(x) \cdot \df ~+~ (f'(x) g'(x)) \cdot (\dx)^2\\ &=~ f(x) \cdot \dg ~+~ g(x) \cdot \df ~+~ (f'(x) g'(x)) \cdot 0\\ d(f \cdot g) ~&=~ f(x) \cdot \dg ~+~ g(x) \cdot \df \quad\text{, so dividing both sides by $\dx$ yields}\

    \[6pt] \frac{d(f \cdot g)}{\dx} ~&=~ f(x) \cdot \dgdx ~+~ g(x) \cdot \dfdx \quad \checkmark\end{aligned} \nonumber \]

    To prove the Quotient Rule, let \(y = \frac{f}{g}\), so \(f = g \cdot y\). If \(y\) were a differentiable function of \(x\), then the Product Rule would give

    \[\begin{gathered} \dfdx ~=~ \frac{d(g \cdot y)}{\dx} ~=~ g \cdot \dydx ~+~ y \cdot \dgdx ~=~ g \cdot \dydx ~+~ \frac{f}{g} \cdot \dgdx \quad\Rightarrow\quad g \cdot \dydx ~=~ \dfdx ~-~ \frac{f}{g} \cdot \dgdx\

    \[4pt] \intertext{and so dividing both sides by $g$ and getting a common denominator gives} \dydx ~=~ \frac{1}{g} \cdot \dfdx ~-~ \frac{f}{g^2} \cdot \dgdx ~=~ \dfrac{g \cdot \dfdx ~-~ f \cdot \dgdx}{g^2} \quad\checkmark\end{gathered} \nonumber \]

    A simple mnemonic device for remembering the Quotient Rule is: write \(\frac{f}{g}\) as \(\frac{\text{HI}}{\text{HO}}\)—so that HI represents the “high” (numerator) part of the quotient and HO represents the “low” (denominator) part—and think of \(d\)HI and \(d\)HO as the derivatives of HI and HO, respectively. Then \(\ddx\left(\frac{f}{g}\right) ~=~ \frac{\text{HO} \cdot d\text{HI} ~-~ \text{HI} \cdot d\text{HO}}{\text{HO}^2}\), pronounced as “ho-dee-hi minus hi-dee-ho over ho-ho.”

    Example \(\PageIndex{1}\): derivtan

    Add text here.

    Solution

    Use the Quotient Rule to show that \(\ddx\,(\tan\,x) = \sec^2 x\).

    Solution: Since \(\tan\,x = \frac{\sin\,x}{\cos\,x}\) then:

    \[\begin{aligned} \ddx\,(\tan\,x) ~&=~ \ddx\,\left(\frac{\sin\,x}{\cos\,x}\right) ~=~ \frac{(\cos\,x) \cdot \ddx\,(\sin\,x) ~-~ (\sin\,x) \cdot \ddx\,(\cos\,x)}{\cos^2 x} ~=~ \frac{(\cos\,x) \cdot (\cos\,x) ~-~ (\sin\,x) \cdot (-\sin\,x)}{\cos^2 x}\

    \[4pt] &=~ \frac{\cos^2 x ~+~ \sin^2 x}{\cos^2 x} ~=~ \frac{1}{\cos^2 x} ~=~ \sec^2 x \end{aligned} \nonumber \]

    Example \(\PageIndex{1}\): derivsec

    Add text here.

    Solution

    Use the Quotient Rule to show that \(\ddx\,(\sec\,x) = \sec\,x \; \tan\,x\).

    Solution: Since \(\sec\,x = \frac{1}{\cos\,x}\) then:

    \[\begin{aligned} \ddx\,(\sec\,x) ~&=~ \ddx\,\left(\frac{1}{\cos\,x}\right) ~=~ \frac{(\cos\,x) \cdot \ddx\,(1) ~-~ 1 \cdot \ddx\,(\cos\,x)}{\cos^2 x} ~=~ \frac{(\cos\,x) \cdot 0 ~-~ 1 \cdot (-\sin\,x)}{\cos^2 x}\

    \[4pt] &=~ \frac{\sin\,x}{\cos^2 x} ~=~ \frac{1}{\cos\,x} \cdot \frac{\sin\,x}{\cos\,x} ~=~ \sec\,x \; \tan\,x \end{aligned} \nonumber \]

    Similar to the above examples, the derivatives of \(\cot\,x\) and \(\csc\,x\) can be found using the Quotient Rule (left as exercises). The derivatives of all six trigonometric functions are:

    Note that the Sum and Difference Rules can be applied to sums and differences, respectively, of not just two functions but any finite (integer) number of functions. For example, for three differentiable functions \(f_1\), \(f_2\), and \(f_3\),

    \[\begin{aligned} \ddx\,(f_1 + f_2 + f_3) ~&=~ \frac{\df_1}{\dx} ~+~ \ddx\,(f_2 + f_3) \quad\text{by the Sum Rule}\

    \[4pt] &=~ \frac{\df_1}{\dx} ~+~ \frac{\df_2}{\dx} ~+~ \frac{\df_3}{\dx} \quad\text{by the Sum Rule again.}\end{aligned} \nonumber \]

    Continuing like this for four functions, then five functions, and so forth, the Sum and Difference Rules combined with the Constant Multiple Rule yield the following formula:

    Note that the above formula includes differences, by using negative constants. The formula also shows that differentiation is a linear operation, which makes \(\ddx\) a linear operator. The idea is that \(\ddx\) “operates” on differentiable functions by taking their derivatives with respect to the variable \(x\). The sum \(c_1 f_1 ~+~ \cdots ~+~ c_n f_n\) is called a linear combination of functions, and the derivative of that linear combination can be taken term by term, with the constant multiples taken outside the derivatives.

    A special case of the above formula is replacing the functions \(f_1\), \(\ldots\), \(f_n\) by nonnegative powers of \(x\), making the sum a polynomial in \(x\). In previous sections the derivatives of a few polynomials—such as \(x\) and \(x^2\)—were calculated. For the derivative of a general polynomial, the following rule is needed: There are several ways to prove this formula; one such way being a proof by induction, which in general means using the following principle:23

    The idea behind mathematical induction is simple: if a statement is true about some initial integer \(k\) (Step 1 above) and if the statement being true for some integer implies it is true for the next integer (Step 2 above), then the statement being true for \(k\) implies it is true for \(k+1\), which in turn implies it is true for \(k+2\), which implies it is true for \(k+3\), and so forth, making it true for all integers \(n \ge k\).

    Typically the initial integer \(k\) will be 0 or 1. To prove the Power Rule for all integers, first use induction to prove the rule for all nonnegative integers \(n \ge 0\), using \(k = 0\) for the initial integer. For the proof by induction, let \(P(n)\) be the statement: \(\ddx\,\left(x^n\right) ~=~ n\,x^{n-1}\).

    1. Show that \(P(0)\) is true.
      That means showing that the Power Rule holds for \(n = 0\), i.e. \(\ddx\,\left(x^0\right) ~=~ 0\,x^{0-1} = 0\). But \(x^0 = 1\) is a constant, so its derivative is 0. \(\checkmark\)
    2. Assuming \(P(n)\) is true for some \(n \ge 0\), show that \(P(n+1)\) is true.
      Assuming that \(\ddx\,\left(x^n\right) ~=~ n\,x^{n-1}\), show that \(\ddx\,\left(x^{n+1}\right) ~=~ (n + 1)\,x^{(n+1)-1} ~=~ (n + 1)\,x^n\). It was shown in Section 1.2 that \(\ddx\,(x) = 1\), so:

      \[\begin{aligned} \ddx\,\left(x^{n+1}\right) ~&=~ \ddx\,\left( x \cdot x^n \right)\

      \[4pt] &=~ x \cdot \ddx\,\left(x^n\right) ~+~ x^n \cdot \ddx\,\left(x\right) \quad\text{(by the Product Rule)}\

      \[4pt] &=~ x \cdot n\,x^{n-1} ~+~ x^n \cdot 1 \quad\text{(by the assumption that $P(n)$ is true)}\

      \[4pt] &=~ n\,x^n ~+~ x^n ~=~ (n + 1)\,x^n \quad\checkmark \end{aligned} \nonumber \]

    Thus, by induction, the Power Rule is true for all nonnegative integers \(n \ge 0\).

    To show that the Power Rule is true for all negative integers \(n < 0\), write \(n = -m\), where \(m\) is positive (namely, \(m = \abs{n}\)). Then:

    \[\begin{aligned} \ddx\,\left(x^n\right) ~&=~ \ddx\,\left(x^{-m}\right) ~=~ \ddx\,\left(\frac{1}{x^m}\right) ~=~ \frac{x^m \cdot \ddx\,(1) ~-~ 1 \cdot \ddx\,\left(x^m\right)}{\left(x^m\right)^2} \quad\text{(by the Quotient Rule)}\

    \[4pt] &=~ \frac{x^m \cdot 0 ~-~ 1 \cdot m\,x^{m-1}}{x^{2m}} \quad\text{(by the Power Rule for positive integers)}\

    \[4pt] &=~ -m\,x^{m-1-2m} ~-~ m\,x^{-m-1} ~=~ n\,x^{n-1} \quad\checkmark\end{aligned} \nonumber \]

    Thus, the Power Rule is true for all integers, which completes the proof.

    Example \(\PageIndex{1}\): polyderiv

    Add text here.

    Solution

    Find the derivative of \(f(x) = x^4 ~-~ 4x^3 ~+~ 6x^2 ~-~ 4x ~+~ 1\).

    Solution: Differentiate the polynomial term by term and use the Power Rule:

    \[\begin{aligned} \dfdx ~&=~ \ddx\,\left(x^4 ~-~ 4x^3 ~+~ 6x^2 ~-~ 4x ~+~ 1\right)\

    \[4pt] &=~ \ddx\,\left(x^4\right) ~-~ 4 \cdot \ddx\,\left(x^3\right) ~+~ 6 \cdot \ddx\,\left(x^2\right) ~-~ 4 \cdot \ddx\,\left(x\right) ~+~ \ddx\,\left(1\right)\

    \[4pt] &=~ 4x^{4-1} ~-~ 4 \cdot 3x^{3-1} ~+~ 6 \cdot 2x^{2-1} ~-~ 4 \cdot 1 ~+~ 0\

    \[4pt] &=~ 4x^3 ~-~ 12x^2 ~+~ 12x ~-~ 4 \end{aligned} \nonumber \]

    In general, the derivative of a polynomial of degree \(n \ge 0\) is given by: A way to remember the Power Rule is: bring the exponent down in front of the variable then reduce the variable’s original exponent by 1. This works even for negative exponents.

    Example \(\PageIndex{1}\): polyderiv2

    Add text here.

    Solution

    Find the derivative of \(f(t) = 3t^{100} ~-~ \frac{2}{t^{100}}\).

    Solution: Differentiate term by term:

    \[\dfdt ~=~ \ddt\,\left(3t^{100} ~-~ \frac{2}{t^{100}}\right) ~=~ \ddt\,\left( 3t^{100} ~-~ 2t^{-100}\right) ~=~ 3 \cdot 100t^{99} ~-~ 2 \cdot \left(-100t^{-101}\right) ~=~ 300t^{99} ~+~ \frac{200}{t^{101}} \nonumber \]

    [sec1dot4]

    For Exercises 1-14, use the rules from this section to find the derivative of the given function.

    2

    \(f(x) ~=~ x^2 ~-~ x ~-~ 1\)

    \(f(x) ~=~ x^8 ~+~ 2x^4 ~+~ 1\)

    2

    \(f(x) ~=~ \dfrac{2x^6}{3} ~-~ \dfrac{3}{2x^6}\)

    \(f(x) ~=~ \dfrac{\sin\,x ~+~ \cos\,x}{4}\vphantom{\dfrac{2x^6}{3}}\)

    2

    \(f(x) ~=~ x\;\sin\,x\)

    \(f(x) ~=~ x^2\;\tan\,x\)

    2

    \(f(x) ~=~ \dfrac{\sin\,x}{x}\)

    \(f(x) ~=~ \dfrac{\sin\,x}{x^2}\)

    2

    \(f(t) ~=~ \dfrac{2t}{1 + t^2}\vphantom{\dfrac{1 - t^2}{1 + t^2}}\)

    \(g(t) ~=~ \dfrac{1 - t^2}{1 + t^2}\)

    2

    \(f(x) ~=~ \dfrac{ax + b}{cx + d}\) (\(a\), \(b\), \(c\), \(d\) are constants)

    \(F(r) ~=~ -\dfrac{G m_1 m_2}{r^2}\) (\(G\), \(m_1\), \(m_2\) are constants)

    2

    \(A(r) ~=~ \pi\,r^2\vphantom{\dfrac{4}{3}}\)

    \(V(r) ~=~ \dfrac{4}{3}\,\pi r^3\)

    2

    Show that \(\ddx \,(\cot\,x) ~=~ -\csc^2 x\).

    Show that \(\ddx \,(\csc\,x) ~=~ -\csc\,x \; \cot\,x\).

    [[1.]]

    2

    Prove the Difference Rule.

    Prove the Constant Multiple Rule.

    Use the Product Rule to show that for three differentiable functions \(f\), \(g\), and \(h\), the derivative of their product is \((fgh)' = f'gh + fg'h + fgh'\). [[1.]]

    Provide an alternative proof of the Product Rule for two differentiable functions \(f\) and \(g\) of \(x\):

    1. Show that \((\df)(\dg) = 0\).
    2. By definition, the derivative of the product \(f \cdot g\) is

      \[\ddx\,(f \cdot g) ~=~ \frac{f(x+\dx) \cdot g(x+\dx) ~-~ f(x) \cdot g(x)}{\dx} ~. \nonumber \]

      Use that formula along with part (a) to show that \(\ddx\,(f \cdot g) ~=~ f \cdot \dgdx ~+~ g \cdot \dfdx\).
      (Hint: Recall that \(\df ~=~ f(x+\dx) ~-~ f(x)\).)


    This page titled 1.4: Derivatives of Sums, Products and Quotients is shared under a GNU General Public License 3.0 license and was authored, remixed, and/or curated by Michael Corral.

    • Was this article helpful?