Skip to content

The derivative of a product and of a composite function

The derivative of a product and of a composite function

The derivative of a product

The derivative of a product of functions is not the product of the derivatives. For example, x⋅x=x2\displaystyle {x\cdot x}={x^2}, whose derivative is 2x\displaystyle 2x, but (x)′⋅(x)′=1\displaystyle {(x)'\cdot(x)'}={1}. The right rule:

[f(x)⋅g(x)]′\displaystyle [f(x)\cdot g(x)]' =\displaystyle = f′(x)⋅g(x)+f(x)⋅g′(x)\displaystyle f'(x)\cdot g(x)+f(x)\cdot g'(x)

The example below differentiates (x2+1)(x3−2x)\displaystyle (x^2+1)(x^3-2x) by the rule:

  • f(x)=x2+1\displaystyle {f(x)}={x^2+1}, f′(x)=2x\displaystyle {f'(x)}={2x}; g(x)=x3−2x\displaystyle {g(x)}={x^3-2x}, g′(x)=3x2−2\displaystyle {g'(x)}={3x^2-2}.
  • The derivative: 2x(x3−2x)+(x2+1)(3x2−2)\displaystyle 2x(x^3-2x)+(x^2+1)(3x^2-2).
  • We expand the brackets and collect like terms: 2x4−4x2+3x4−2x2+3x2−2=5x4−3x2−2\displaystyle {2x^4-4x^2+3x^4-2x^2+3x^2-2}={5x^4-3x^2-2}.

A check: (x2+1)(x3−2x)=x5−x3−2x\displaystyle {(x^2+1)(x^3-2x)}={x^5-x^3-2x}, and its derivative is the same 5x4−3x2−2\displaystyle 5x^4-3x^2-2.

The proof of the product rule

The proof below writes the difference quotient of f⋅g\displaystyle f\cdot g, adds and subtracts f(x)g(x+h)\displaystyle f(x)g(x+h), and shows that as h→0\displaystyle h\to0 it approaches f′(x)g(x)+f(x)g′(x)\displaystyle f'(x)g(x)+f(x)g'(x).

  1. The difference quotient of the product: f(x+h)g(x+h)−f(x)g(x)h\displaystyle \frac{f(x+h)g(x+h)-f(x)g(x)}{h}.
  2. We add and subtract f(x)g(x+h)\displaystyle f(x)g(x+h) in the numerator: f(x+h)g(x+h)−f(x)g(x+h)+f(x)g(x+h)−f(x)g(x)h\displaystyle \frac{f(x+h)g(x+h)-f(x)g(x+h)+f(x)g(x+h)-f(x)g(x)}{h}.
  3. We take out a common factor from each pair: f(x+h)−f(x)h⋅g(x+h)+f(x)⋅g(x+h)−g(x)h\displaystyle \frac{f(x+h)-f(x)}{h}\cdot g(x+h)+f(x)\cdot\frac{g(x+h)-g(x)}{h}.
  4. As h→0\displaystyle h\to0: f(x+h)−f(x)h→f′(x)\displaystyle \frac{f(x+h)-f(x)}{h}\to f'(x), g(x+h)→g(x)\displaystyle g(x+h)\to g(x), and g(x+h)−g(x)h→g′(x)\displaystyle \frac{g(x+h)-g(x)}{h}\to g'(x).
  5. So the difference quotient approaches f′(x)g(x)+f(x)g′(x)\displaystyle f'(x)g(x)+f(x)g'(x), and that is the derivative of the product.
A composite function

In (2x+1)3\displaystyle (2x+1)^3 there are two steps: first u=2x+1\displaystyle {u}={2x+1}, then the result is raised to the power 3. Such a function is a composite function, f(u(x))\displaystyle f(u(x)):

  • u(x)=2x+1\displaystyle {u(x)}={2x+1} – the inner function, the first step.
  • f(u)=u3\displaystyle {f(u)}={u^3} – the outer function, what is done to the result.

More examples: in (x2+1)4\displaystyle (x^2+1)^4 the inner function is x2+1\displaystyle x^2+1 and the outer u4\displaystyle u^4; in ∣x−3∣\displaystyle |x-3| the inner is x−3\displaystyle x-3 and the outer ∣u∣\displaystyle |u|.

The derivative of a composite function

If u\displaystyle u changes 2 times as fast as x\displaystyle x, and f\displaystyle f changes 3 times as fast as u\displaystyle u, then f\displaystyle f changes 3⋅2=6\displaystyle {3\cdot2}={6} times as fast as x\displaystyle x. The rates of change multiply:

[f(u(x))]′\displaystyle [f(u(x))]' =\displaystyle = f′(u)⋅u′(x)\displaystyle f'(u)\cdot u'(x)
  • f′(u)\displaystyle f'(u) – the outer derivative: differentiate the outer function, leaving the inner one inside it as it is.
  • u′(x)\displaystyle u'(x) – the inner derivative.

The example below differentiates (x2+1)3\displaystyle (x^2+1)^3:

  • The outer function is u3\displaystyle u^3, and its derivative is 3u2=3(x2+1)2\displaystyle {3u^2}={3(x^2+1)^2}.
  • The inner function is x2+1\displaystyle x^2+1, and its derivative is 2x\displaystyle 2x.
  • [(x2+1)3]′=3(x2+1)2⋅2x=6x(x2+1)2\displaystyle {[(x^2+1)^3]'}={3(x^2+1)^2\cdot2x}={6x(x^2+1)^2}.
A linear inner function

When the inner function is linear, u=ax+b\displaystyle {u}={ax+b}, the inner derivative is the number a\displaystyle a:

[(ax+b)n]′\displaystyle [(ax+b)^n]' =\displaystyle = n⋅a(ax+b)n−1\displaystyle n\cdot a(ax+b)^{n-1}

For example, [(2x−1)4]′=4⋅2(2x−1)3=8(2x−1)3\displaystyle {[(2x-1)^4]'}={4\cdot2(2x-1)^3}={8(2x-1)^3}.

For the same reason, if g(x)=f(ax)\displaystyle {g(x)}={f(ax)} then g′(x)=a⋅f′(ax)\displaystyle {g'(x)}={a\cdot f'(ax)}. The graph of g\displaystyle g is the graph of f\displaystyle f squeezed horizontally by a\displaystyle a, so all its slopes are a\displaystyle a times as large.

Exercise 1

Differentiate by the product rule.
Write the answer without brackets.

a

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

    b

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

      Exercise 2

      Differentiate by the rule for a composite function.

      a

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        b

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

          c

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

            Exercise 3

            The function is f(x)=x(x−2)3\displaystyle {f(x)}={x(x-2)^3}.

            a

            Find f′(x)\displaystyle f'(x), and factor it.

            f(x)=x(x−2)3\displaystyle f(x)=x(x-2)^{3}

              / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

              / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

              b

              Solve the equation f′(x)=0\displaystyle {f'(x)}={0}.

                c

                Solve the inequality f′(x)>0\displaystyle f'(x)>0: where does f\displaystyle f rise?

                  d

                  Work out the value of f\displaystyle f at the extremum point.

                  f(x)=x(x−2)3\displaystyle f(x)=x(x-2)^{3}

                    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                    e

                    Mark the extremum point on the graph.
                    What does the graph have at x=2\displaystyle {x}={2}?

                    f(x)=x(x−2)3\displaystyle f(x)=x(x-2)^{3}

                    Exercise 4

                    The function is f(x)=(2x−3)4\displaystyle {f(x)}={(2x-3)^4}.

                    a

                    Work out the slope of the tangent to the graph at the point where x=2\displaystyle {x}={2}.

                    f(x)=(2x−3)4\displaystyle f(x)=(2x-3)^{4}

                      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                      b

                      Write the equation of the tangent at this point on the board.

                      f(x)=(2x−3)4\displaystyle f(x)=(2x-3)^{4}

                      Exercise 5

                      The functions are f(x)=x2−4x\displaystyle {f(x)}={x^2-4x} and g(x)=f(3x)\displaystyle {g(x)}={f(3x)}.

                      a

                      Find g′(x)\displaystyle g'(x).

                      f(x)=x2−4x,g(x)=f(3x)\displaystyle f(x)=x^{2}-4x,\qquad g(x)=f(3x)

                        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                        b

                        Solve the equation g′(x)=0\displaystyle {g'(x)}={0}.

                          c

                          f\displaystyle f has a minimum at x=2\displaystyle {x}={2}.
                          Explain by the horizontal squeeze why g\displaystyle g has a minimum at x=23\displaystyle {x}={\frac{2}{3}}.