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 is not the product of the derivatives. It is a sum of two terms: in each, one factor is differentiated and the other stays as it is.

(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)
  • f′(x)⋅g(x)\displaystyle f'(x)\cdot g(x) – the first factor differentiated, the second kept.
  • f(x)⋅g′(x)\displaystyle f(x)\cdot g'(x) – the first kept, the second differentiated.
A check by expanding

The example below differentiates (x2+1)(x−3)\displaystyle (x^2+1)(x-3) in two ways and shows that both give the same derivative.

By expanding the brackets:

(x2+1)(x−3)=x3−3x2+x−3(x^2+1)(x-3)=x^3-3x^2+x-3(x3−3x2+x−3)′=3x2−6x+1(x^3-3x^2+x-3)'=3x^2-6x+1

By the product rule, with f(x)=x2+1\displaystyle {f(x)}={x^2+1} and g(x)=x−3\displaystyle {g(x)}={x-3}:

2x⋅(x−3)+(x2+1)⋅1=2x2−6x+x2+1=3x2−6x+12x\cdot(x-3)+(x^2+1)\cdot1=2x^2-6x+x^2+1=3x^2-6x+1
  • Both ways give 3x2−6x+1\displaystyle 3x^2-6x+1.
  • The product of the derivatives, 2x⋅1=2x\displaystyle {2x\cdot1}={2x}, is a different answer – so it is wrong.
A composite function

The function (2x−1)3\displaystyle (2x-1)^3 works in two steps: first 2x−1\displaystyle 2x-1 is worked out, then the result is raised to the power 3. Such a function is called a composite function.

  • The inner function – what is worked out first: 2x−1\displaystyle 2x-1.
  • The outer function – what is done to the result: the power u3\displaystyle u^3.
  • More examples: in (x2+1)4\displaystyle (x^2+1)^4 the inner function is x2+1\displaystyle x^2+1 and the outer one u4\displaystyle u^4; in 8(2x−1)3\displaystyle 8(2x-1)^3 the outer one is 8u3\displaystyle 8u^3.
The derivative of a composite function

Differentiate the outer function, keeping the inner one inside it as it is, and multiply the result by the derivative of the inner function.

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

Why a product: the inner function changes at the rate g′\displaystyle g' with respect to x\displaystyle x, and the outer one at the rate f′\displaystyle f' with respect to the inner one. A small change in x\displaystyle x passes through both rates, so they multiply.

The example below differentiates (2x−1)3\displaystyle (2x-1)^3:

((2x−1)3)′=3(2x−1)2⋅2=6(2x−1)2\left((2x-1)^3\right)'=3(2x-1)^2\cdot2=6(2x-1)^2
  • 3(2x−1)2\displaystyle 3(2x-1)^2 – the derivative of the outer u3\displaystyle u^3, with the inner function inside it as it is.
  • ⋅2\displaystyle \cdot2 – the derivative of the inner 2x−1\displaystyle 2x-1.
A solved example

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

((x2+1)4)′=4(x2+1)3⋅2x=8x(x2+1)3\left((x^2+1)^4\right)'=4(x^2+1)^3\cdot2x=8x(x^2+1)^3
  • The derivative of the outer function: 4(x2+1)3\displaystyle 4(x^2+1)^3.
  • The derivative of the inner function: 2x\displaystyle 2x.
  • The brackets stay closed: in factored form it is easy to see where the derivative is 0.
Exercise 1

Differentiate by the product rule, and write the derivative 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

      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 2

        Differentiate the composite functions.

        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)=(x2−4)2\displaystyle {f(x)}={(x^2-4)^2}.

              a

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

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

                / – 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

                Work out f′(1)\displaystyle f'(1).

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

                  / – 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

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

                    Exercise 4

                    The function is f(x)=8(2x−1)3\displaystyle {f(x)}={8(2x-1)^3}, defined for every x\displaystyle x.

                    a

                    Mark the points where the graph of the function meets the axes.

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

                    b

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

                    f(x)=8(2x−1)3\displaystyle f(x)=8(2x-1)^{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

                      c

                      Work out f′(12)\displaystyle f'\left(\frac{1}{2}\right).

                      f(x)=8(2x−1)3\displaystyle f(x)=8(2x-1)^{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

                        d

                        What is the slope of the tangent to the graph at the point where it meets the x\displaystyle x-axis?
                        Describe that tangent.

                          / – 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 5

                          The function x(x−1)3\displaystyle x(x-1)^3 is a product, and one of its factors is a composite function.
                          Differentiate it, and write the derivative as a product of factors.

                            / – 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