Euler Hall — free maths guides

Differentiate a product of two functions

A plain-language explanation of the product rule. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus I guides.

Each factor's change contributes a term

(fg)′=f′g+fg′.(fg)' = f'g + fg'.

The derivative of a product is not the product of the derivatives. It has two terms, because either factor can change and each change contributes.

The geometric picture. A rectangle has sidesff andgg. If both grow a little, the area gains a strip of widthf′f' along one edge and a strip of heightg′g' along the other. Those are the two terms. There is also a tiny corner of sizef′g′h2f'g'h^2, which shrinks faster thanhh and disappears in the limit.

The order is free.f′g+fg′f'g + fg' andg′f+gf′g'f + gf' are the same sum; the rule is symmetric in the two factors, which is a check worth making when you write it out.

Why two terms

Write the change in the product over a stephh:

f(x+h)g(x+h)−f(x)g(x).f(x+h)g(x+h) - f(x)g(x).

Add and subtract the cross termf(x+h)g(x)f(x+h)g(x):

=g(x)(f(x+h)−f(x))+f(x+h)(g(x+h)−g(x)).= g(x)\bigl(f(x+h) - f(x)\bigr) + f(x+h)\bigl(g(x+h) - g(x)\bigr).

Divide byhh. The first piece givesg⋅f′g\cdot f' and the second givesf⋅g′f\cdot g', becausef(x+h)→f(x)f(x+h)\to f(x) ash→0h\to0 by continuity.

So the two terms are not a convention: they are the two ways the product can change, separated by that algebraic split. The cross-term device is the same trick the chain rule uses, applied to a product instead of a composition.

Worked example: a product of two polynomials, checked by expansion

Differentiatef(x)=(x2+1)(x3−2)f(x) = (x^2+1)(x^3-2) and check by expanding.

By the product rule. Withu=x2+1u = x^2+1 andv=x3−2v = x^3-2:

f′=2x(x3−2)+(x2+1)⋅3x2.f' = 2x(x^3-2) + (x^2+1)\cdot3x^2.

Expand:2x4−4x+3x4+3x2=5x4+3x2−4x2x^4 - 4x + 3x^4 + 3x^2 = 5x^4 + 3x^2 - 4x.

By expanding first.f=x5−2x2+x3−2f = x^5 - 2x^2 + x^3 - 2, sof′=5x4+3x2−4xf' = 5x^4 + 3x^2 - 4x. Agreement.

At a point.f′(1)=5+3−4=4f'(1) = 5 + 3 - 4 = 4.

The wrong answer for comparison. Multiplying the derivatives gives 2x⋅3x2=6x32x\cdot3x^2 = 6x^3, which atx=1x=1 is 6 — wrong, and wrong in shape as well as value.

When the rule is essential. Forf=xsin⁡xf = x\sin x there is no expansion, so the product rule is the only route:f′=sin⁡x+xcos⁡xf' = \sin x + x\cos x.

By the end you can
  • Apply the product rule to two factors
  • Explain the rule with the rectangle-strips picture
  • Confirm a product-rule result by expanding
  • Recognise that the product of derivatives is not the derivative of the product
Check yourself
  1. 1. Differentiate(x2+2)(x−1)(x^2+2)(x-1).
  2. 2. Differentiatexsin⁡xx\sin x.
  3. 3. Differentiate(2x+1)(3x−4)(2x+1)(3x-4) and confirm by expanding.
Answers
  1. 1.2x(x−1)+(x2+2)=3x2−2x+22x(x-1) + (x^2+2) = 3x^2 - 2x + 2.
  2. 2.sin⁡x+xcos⁡x\sin x + x\cos x.
  3. 3.2(3x−4)+3(2x+1)=12x−52(3x-4) + 3(2x+1) = 12x - 5; expanding gives6x2−5x−46x^2-5x-4 whose derivative is12x−512x-5.
Work out where to start — free, no accountAnswer six real questions — free, no account