Product Rule

A2 · P3 · 12 min

The product rule differentiates one function of xx multiplied by another, such as x2ln⁡xx^2\ln x, xe1−x2xe^{1-x^2} or e2xcos⁡xe^{2x}\cos x. The derivative of a product is not the product of the derivatives, and the correct rule is one of the most used results in P3: it appears in stationary-point questions, tangents, implicit differentiation (every term like xyxy is a product) and, run backwards, it becomes integration by parts.

Where the rule comes from

Picture the product y=uvy = uv as the area of a rectangle with width uu and height vv, both depending on xx. Increase xx by a small amount δx\delta x. The width grows by δu\delta u and the height by δv\delta v.

The new area is (u+δu)(v+δv)=uv+u δv+v δu+δu δv(u + \delta u)(v + \delta v) = uv + u\,\delta v + v\,\delta u + \delta u\,\delta v, so the area has increased by

δy=u δv+v δu+δu δv\delta y = u\,\delta v + v\,\delta u + \delta u\,\delta v

That is a strip along the top (u δvu\,\delta v), a strip down the side (v δuv\,\delta u), and a tiny corner (δu δv\delta u\,\delta v). Divide by δx\delta x:

δyδx=uδvδx+vδuδx+δu δvδx\frac{\delta y}{\delta x} = u\frac{\delta v}{\delta x} + v\frac{\delta u}{\delta x} + \delta u\,\frac{\delta v}{\delta x}

As δx→0\delta x \to 0, the corner term vanishes (it is a small quantity times a finite rate), and the fractions become derivatives. The two strips are the whole story: change one factor while the other is held fixed, then add.

Product rule

If y=uvy = uv, where uu and vv are functions of xx, then

dydx=udvdx+vdudx\frac{dy}{dx} = u\frac{dv}{dx} + v\frac{du}{dx}

In function notation: ddx[f(x)g(x)]=f(x)g′(x)+g(x)f′(x)\dfrac{d}{dx}\big[f(x)g(x)\big] = f(x)g'(x) + g(x)f'(x).

Order does not matter, because addition is commutative. Many students remember it as "first times derivative of second, plus second times derivative of first".

A quick check that the rule is not "multiply the derivatives": y=x⋅x=x2y = x \cdot x = x^2 has derivative 2x2x. The product rule gives x⋅1+x⋅1=2xx \cdot 1 + x \cdot 1 = 2x. Multiplying the derivatives would give 1⋅1=11 \cdot 1 = 1, which is wrong.

Setting out

Using the product rule
  1. Identify the two factors and write them down: u=…u = \ldots, v=…v = \ldots.
  2. Differentiate each separately, using the chain rule where needed: dudx=…\dfrac{du}{dx} = \ldots, dvdx=…\dfrac{dv}{dx} = \ldots.
  3. Assemble udvdx+vdudxu\dfrac{dv}{dx} + v\dfrac{du}{dx}.
  4. Factorise the result by taking out every common factor. This is nearly always needed for what comes next.

Writing the four pieces down before assembling looks slow but is the single best protection against errors, and examiners award a method mark for a correct structure even if one piece is wrong.

Why factorising matters

The question rarely stops at the derivative. It asks for stationary points, or for the derivative "in the form ...", or for the sign of the gradient. All of these are easy from a factorised form and painful from an expanded one.

ddx(x3e2x)=3x2e2x+2x3e2x=x2e2x(3+2x)\frac{d}{dx}\left(x^3e^{2x}\right) = 3x^2e^{2x} + 2x^3e^{2x} = x^2e^{2x}(3 + 2x)

Now dydx=0\dfrac{dy}{dx} = 0 can be read off: x=0x = 0 or x=−32x = -\tfrac{3}{2}, because e2xe^{2x} is never zero.

Common factors to look for:

  • a power of xx, e.g. x2x^2 from 3x23x^2 and 2x32x^3;
  • an exponential, e.g. e−xe^{-x}, e2xe^{2x}, which can never be zero;
  • the lowest power of a repeated bracket, e.g. (2x+1)2(2x + 1)^2 from (2x+1)3(2x+1)^3 and (2x+1)2(2x+1)^2;
  • a trigonometric function common to both terms.

Products of brackets raised to powers

Products such as (2x+1)3(x−2)4(2x + 1)^3(x - 2)^4 come up often and reward careful factorising. Each factor needs the chain rule inside the product rule.

Let u=(2x+1)3u = (2x+1)^3 and v=(x−2)4v = (x - 2)^4. Then dudx=6(2x+1)2\dfrac{du}{dx} = 6(2x + 1)^2 and dvdx=4(x−2)3\dfrac{dv}{dx} = 4(x - 2)^3.

dydx=(2x+1)3⋅4(x−2)3+(x−2)4⋅6(2x+1)2\frac{dy}{dx} = (2x+1)^3 \cdot 4(x-2)^3 + (x - 2)^4 \cdot 6(2x+1)^2

Take out (2x+1)2(x−2)3(2x + 1)^2(x - 2)^3, the lowest power of each bracket:

dydx=(2x+1)2(x−2)3[4(2x+1)+6(x−2)]=(2x+1)2(x−2)3(14x−8)=2(2x+1)2(x−2)3(7x−4)\frac{dy}{dx} = (2x+1)^2(x-2)^3\big[4(2x + 1) + 6(x - 2)\big] = (2x+1)^2(x-2)^3(14x - 8) = 2(2x+1)^2(x-2)^3(7x - 4)

The stationary points are at x=−12x = -\tfrac{1}{2}, x=2x = 2 and x=47x = \tfrac{4}{7}, read straight off the factors.

More than two factors

For three factors, ddx(uvw)=u′vw+uv′w+uvw′\dfrac{d}{dx}(uvw) = u'vw + uv'w + uvw': differentiate one factor at a time, keep the other two, and add. In practice you can also group two factors as one and apply the two-factor rule twice. P3 questions seldom need this, but it follows directly from the rectangle argument applied to a box.

Recognising a product in disguise

  • x2x+3=x(2x+3)1/2x\sqrt{2x + 3} = x(2x + 3)^{1/2}: a product.
  • x2ex=x2e−x\dfrac{x^2}{e^x} = x^2e^{-x}: a quotient that is easier as a product.
  • xyxy when yy depends on xx, which is the core of implicit differentiation: ddx(xy)=xdydx+y\dfrac{d}{dx}(xy) = x\dfrac{dy}{dx} + y.
  • 2sin⁡xcos⁡x2\sin x\cos x: a product, but simpler to rewrite as sin⁡2x\sin 2x and use the chain rule.
  • 3x23x^2: a constant times a function, not a product needing the rule. Constants simply stay in front.

Worked examples

A power times a logarithm

Differentiate x2ln⁡xx^2\ln x, giving your answer in factorised form.

Solution

u=x2u = x^2, dudx=2x\dfrac{du}{dx} = 2x;  v=ln⁡x\ v = \ln x, dvdx=1x\dfrac{dv}{dx} = \dfrac{1}{x}.

dydx=x2⋅1x+ln⁡x⋅2x=x+2xln⁡x=x(1+2ln⁡x)\frac{dy}{dx} = x^2 \cdot \frac{1}{x} + \ln x \cdot 2x = x + 2x\ln x = x(1 + 2\ln x)
Product with a chain rule inside

Differentiate xe1−x2xe^{1 - x^2} and find the exact xx-coordinates of its stationary points.

Solution

u=xu = x, dudx=1\dfrac{du}{dx} = 1;  v=e1−x2\ v = e^{1-x^2}, dvdx=−2xe1−x2\dfrac{dv}{dx} = -2xe^{1-x^2}.

dydx=x⋅(−2xe1−x2)+e1−x2⋅1=e1−x2(1−2x2)\frac{dy}{dx} = x\cdot\left(-2xe^{1-x^2}\right) + e^{1-x^2}\cdot 1 = e^{1-x^2}(1 - 2x^2)

Since e1−x2>0e^{1 - x^2} > 0, stationary points need 1−2x2=01 - 2x^2 = 0: x=±12x = \pm\dfrac{1}{\sqrt{2}}.

Stationary point and its nature

Find the exact coordinates of the stationary point of y=x2ln⁡xy = x^2\ln x, for x>0x > 0, and determine its nature.

Solution

From the first example, dydx=x(1+2ln⁡x)\dfrac{dy}{dx} = x(1 + 2\ln x). Since x>0x > 0, we need 1+2ln⁡x=01 + 2\ln x = 0, so ln⁡x=−12\ln x = -\tfrac{1}{2} and x=e−1/2x = e^{-1/2}.

y=(e−1/2)2ln⁡e−1/2=e−1⋅(−12)=−12ey = \left(e^{-1/2}\right)^2 \ln e^{-1/2} = e^{-1} \cdot \left(-\tfrac{1}{2}\right) = -\dfrac{1}{2e}.

Second derivative: differentiate x+2xln⁡xx + 2x\ln x term by term, using the product rule on 2xln⁡x2x\ln x:

d2ydx2=1+(2ln⁡x+2x⋅1x)=3+2ln⁡x\frac{d^2y}{dx^2} = 1 + \left(2\ln x + 2x\cdot\frac{1}{x}\right) = 3 + 2\ln x

At x=e−1/2x = e^{-1/2}: 3+2(−12)=2>03 + 2\left(-\tfrac{1}{2}\right) = 2 > 0, so the point (e−1/2, −12e)\left(e^{-1/2},\ -\dfrac{1}{2e}\right) is a minimum.

Exponential times cosine

Find the xx-coordinate of the stationary point of y=e2xcos⁡xy = e^{2x}\cos x for 0≤x≤π0 \le x \le \pi, giving your answer correct to 3 decimal places, and determine whether it is a maximum or minimum.

Solution

u=e2xu = e^{2x}, dudx=2e2x\dfrac{du}{dx} = 2e^{2x};  v=cos⁡x\ v = \cos x, dvdx=−sin⁡x\dfrac{dv}{dx} = -\sin x.

dydx=−e2xsin⁡x+2e2xcos⁡x=e2x(2cos⁡x−sin⁡x)\frac{dy}{dx} = -e^{2x}\sin x + 2e^{2x}\cos x = e^{2x}(2\cos x - \sin x)

e2x>0e^{2x} > 0, so 2cos⁡x=sin⁡x2\cos x = \sin x, i.e. tan⁡x=2\tan x = 2. In 0≤x≤π0 \le x \le \pi the only solution is x=tan⁡−12=1.107x = \tan^{-1} 2 = 1.107 (3 d.p.), since tan⁡x\tan x is negative in the second quadrant.

Sign check: at x=0x = 0, 2cos⁡0−sin⁡0=2>02\cos 0 - \sin 0 = 2 > 0; at x=π2x = \tfrac{\pi}{2}, 0−1<00 - 1 < 0. The gradient changes from positive to negative, so it is a maximum (where y≈4.09y \approx 4.09).

Repeated brackets

Given y=(3x−1)2(x+1)3y = (3x - 1)^2(x + 1)^3, show that dydx=3(3x−1)(x+1)2(5x+1)\dfrac{dy}{dx} = 3(3x - 1)(x + 1)^2(5x + 1), and hence find the xx-coordinates of the stationary points.

Solution

u=(3x−1)2u = (3x - 1)^2, dudx=6(3x−1)\dfrac{du}{dx} = 6(3x - 1);  v=(x+1)3\ v = (x + 1)^3, dvdx=3(x+1)2\dfrac{dv}{dx} = 3(x+1)^2.

dydx=(3x−1)2⋅3(x+1)2+(x+1)3⋅6(3x−1)\frac{dy}{dx} = (3x - 1)^2\cdot 3(x + 1)^2 + (x+1)^3\cdot 6(3x - 1)

Take out 3(3x−1)(x+1)23(3x - 1)(x + 1)^2:

dydx=3(3x−1)(x+1)2[(3x−1)+2(x+1)]=3(3x−1)(x+1)2(5x+1)\frac{dy}{dx} = 3(3x - 1)(x+1)^2\big[(3x - 1) + 2(x + 1)\big] = 3(3x-1)(x+1)^2(5x + 1)

Stationary points at x=13x = \tfrac{1}{3}, x=−1x = -1 and x=−15x = -\tfrac{1}{5}.

Exam-hard: tangent where the curve meets an axis

The curve y=(x−1)e2xy = (x - 1)e^{2x} crosses the xx-axis at AA and has a stationary point at BB.

(a) Find the equation of the tangent at AA.

(b) Find the exact coordinates of BB.

(c) The tangent at AA meets the yy-axis at CC. Find the exact length ACAC.

Solution

(a) y=0⇒x=1y = 0 \Rightarrow x = 1 (since e2x≠0e^{2x} \ne 0), so A=(1,0)A = (1, 0).

dydx=(x−1)⋅2e2x+e2x⋅1=e2x(2x−1)\frac{dy}{dx} = (x - 1)\cdot 2e^{2x} + e^{2x}\cdot 1 = e^{2x}(2x - 1)

At x=1x = 1 the gradient is e2e^2. Tangent: y=e2(x−1)y = e^2(x - 1).

(b) dydx=0⇒x=12\dfrac{dy}{dx} = 0 \Rightarrow x = \tfrac{1}{2}, and y=(−12)e1=−e2y = \left(-\tfrac{1}{2}\right)e^{1} = -\dfrac{e}{2}. So B=(12,−e2)B = \left(\tfrac{1}{2}, -\tfrac{e}{2}\right).

(c) At x=0x = 0 the tangent gives y=−e2y = -e^2, so C=(0,−e2)C = (0, -e^2).

AC=12+(e2)2=1+e4AC = \sqrt{1^2 + \left(e^2\right)^2} = \sqrt{1 + e^4}
y = (x - 1) e^(2x) y = e^2 (x - 1)

The curve y=(x−1)e2xy = (x - 1)e^{2x} with its tangent at A(1,0)A(1, 0). The minimum at BB is just below the axis at x=12x = \tfrac{1}{2}.

Common mistakes
  • Multiplying the derivatives. ddx(x2ln⁡x)≠2x⋅1x\dfrac{d}{dx}(x^2\ln x) \ne 2x \cdot \dfrac{1}{x}.
  • Dropping the chain rule inside. In xe1−x2xe^{1-x^2} the derivative of e1−x2e^{1-x^2} is −2xe1−x2-2xe^{1-x^2}, not e1−x2e^{1-x^2}.
  • Using the product rule on a constant multiple. ddx(5sin⁡x)=5cos⁡x\dfrac{d}{dx}(5\sin x) = 5\cos x. No product rule needed; it is not wrong, but it wastes time and invites errors.
  • Factorising badly. Taking out (2x+1)3(2x+1)^3 when one term only has (2x+1)2(2x+1)^2. Take out the lowest power.
  • Dividing by a factor that could be zero. From x2e2x(3+2x)=0x^2e^{2x}(3 + 2x) = 0, the solutions are x=0x = 0 and x=−32x = -\tfrac{3}{2}. Dividing by x2x^2 loses x=0x = 0.
Exam tip
  • Write uu, vv, u′u', v′v' explicitly. A correct structure uv′+vu′u v' + v u' with one slip earns method marks; an unstructured line of algebra with one slip often earns nothing.
  • "Show that dydx=…\dfrac{dy}{dx} = \ldots": factorise until your expression matches the printed form exactly, including the order of factors if that helps the examiner see it.
  • When a question asks for the stationary points of a product, always justify discarding the exponential factor: "since e2x>0e^{2x} > 0".
  • Determining nature: if the second derivative is messy, a sign check of dydx\dfrac{dy}{dx} either side of the stationary point is fully acceptable. State the values you used.
Summary
  • ddx(uv)=udvdx+vdudx\dfrac{d}{dx}(uv) = u\dfrac{dv}{dx} + v\dfrac{du}{dx}: change one factor at a time and add.
  • Write down uu, vv, u′u', v′v' first; use the chain rule inside each.
  • Factorise the answer: powers of xx, exponentials, lowest powers of repeated brackets.
  • Exponential factors are never zero; other factors may be.
  • Rewrite quotients like x2ex\dfrac{x^2}{e^x} as products x2e−xx^2e^{-x}.
  • ddx(xy)=xdydx+y\dfrac{d}{dx}(xy) = x\dfrac{dy}{dx} + y is the product rule used in implicit differentiation.

Practice

Question
  1. Differentiate x3e2xx^3e^{2x}, giving your answer in factorised form.
  2. Differentiate (x+2)ln⁡(x+2)(x + 2)\ln(x + 2).
  3. Show that the derivative of x2x+3x\sqrt{2x + 3} is 3(x+1)2x+3\dfrac{3(x + 1)}{\sqrt{2x + 3}}.
  4. Differentiate x2sin⁡2xx^2\sin 2x.
  5. Find the exact coordinates of the stationary point of y=xe−3xy = xe^{-3x} and show that it is a maximum.
  6. Find the equation of the tangent to y=exln⁡xy = e^x\ln x at the point where x=1x = 1.
  7. The curve y=(2x2−3x)exy = (2x^2 - 3x)e^x has two stationary points. Find their exact coordinates and determine their nature.
  8. The normal to the curve y=xln⁡xy = x\ln x at the point where x=ex = e meets the xx-axis at AA. Find the exact xx-coordinate of AA.
  9. Given y=x2(1−x)5y = x^2(1 - x)^5, find dydx\dfrac{dy}{dx} in fully factorised form. Find the coordinates of the stationary points and show that the curve has a maximum at the stationary point with 0<x<10 < x < 1.
Answers
  1. 3x2e2x+2x3e2x=x2e2x(2x+3)3x^2e^{2x} + 2x^3e^{2x} = x^2e^{2x}(2x + 3).

  2. u=x+2u = x + 2, v=ln⁡(x+2)v = \ln(x+2): (x+2)⋅1x+2+ln⁡(x+2)=1+ln⁡(x+2)(x+2)\cdot\dfrac{1}{x+2} + \ln(x + 2) = 1 + \ln(x + 2).

  3. u=xu = x, v=(2x+3)1/2v = (2x + 3)^{1/2}, v′=(2x+3)−1/2v' = (2x + 3)^{-1/2}. Derivative: x2x+3+2x+3=x+(2x+3)2x+3=3x+32x+3=3(x+1)2x+3\dfrac{x}{\sqrt{2x+3}} + \sqrt{2x + 3} = \dfrac{x + (2x + 3)}{\sqrt{2x + 3}} = \dfrac{3x + 3}{\sqrt{2x+3}} = \dfrac{3(x+1)}{\sqrt{2x+3}}.

  4. 2xsin⁡2x+2x2cos⁡2x=2x(sin⁡2x+xcos⁡2x)2x\sin 2x + 2x^2\cos 2x = 2x(\sin 2x + x\cos 2x).

  5. dydx=e−3x−3xe−3x=e−3x(1−3x)=0⇒x=13\dfrac{dy}{dx} = e^{-3x} - 3xe^{-3x} = e^{-3x}(1 - 3x) = 0 \Rightarrow x = \tfrac{1}{3}, y=13e−1y = \tfrac{1}{3}e^{-1}. d2ydx2=−3e−3x(1−3x)−3e−3x=e−3x(9x−6)\dfrac{d^2y}{dx^2} = -3e^{-3x}(1 - 3x) - 3e^{-3x} = e^{-3x}(9x - 6), at x=13x = \tfrac{1}{3}: −3e−1<0-3e^{-1} < 0, a maximum at (13,13e)\left(\tfrac{1}{3}, \tfrac{1}{3e}\right).

  6. At x=1x = 1: y=eln⁡1=0y = e\ln 1 = 0. dydx=exln⁡x+exx\dfrac{dy}{dx} = e^x\ln x + \dfrac{e^x}{x}, at x=1x = 1: 0+e=e0 + e = e. Tangent: y=e(x−1)y = e(x - 1).

  7. dydx=(4x−3)ex+(2x2−3x)ex=ex(2x2+x−3)=ex(2x+3)(x−1)\dfrac{dy}{dx} = (4x - 3)e^x + (2x^2 - 3x)e^x = e^x(2x^2 + x - 3) = e^x(2x + 3)(x - 1). Stationary at x=1x = 1: y=−ey = -e; at x=−32x = -\tfrac{3}{2}: y=(92+92)e−3/2=9e−3/2y = \left(\tfrac{9}{2} + \tfrac{9}{2}\right)e^{-3/2} = 9e^{-3/2}. d2ydx2=ex(2x2+5x−2)\dfrac{d^2y}{dx^2} = e^x(2x^2 + 5x - 2): at x=1x = 1, 5e>05e > 0, minimum at (1,−e)(1, -e); at x=−32x = -\tfrac{3}{2}, e−3/2(92−152−2)=−5e−3/2<0e^{-3/2}\left(\tfrac{9}{2} - \tfrac{15}{2} - 2\right) = -5e^{-3/2} < 0, maximum at (−32,9e−3/2)\left(-\tfrac{3}{2}, 9e^{-3/2}\right).

  8. At x=ex = e: y=ey = e. dydx=ln⁡x+1=2\dfrac{dy}{dx} = \ln x + 1 = 2, so the normal gradient is −12-\tfrac{1}{2}. Normal: y−e=−12(x−e)y - e = -\tfrac{1}{2}(x - e). At y=0y = 0: x−e=2ex - e = 2e, so x=3ex = 3e.

  9. dydx=2x(1−x)5−5x2(1−x)4=x(1−x)4[2(1−x)−5x]=x(1−x)4(2−7x)\dfrac{dy}{dx} = 2x(1 - x)^5 - 5x^2(1 - x)^4 = x(1 - x)^4\big[2(1 - x) - 5x\big] = x(1 - x)^4(2 - 7x). Stationary points: (0,0)(0, 0), (1,0)(1, 0) and x=27x = \tfrac{2}{7}, where y=449(57)5=12500823543y = \tfrac{4}{49}\left(\tfrac{5}{7}\right)^5 = \dfrac{12500}{823543} (≈0.0152\approx 0.0152). For 0<x<270 < x < \tfrac{2}{7} every factor is positive so dydx>0\dfrac{dy}{dx} > 0; for 27<x<1\tfrac{2}{7} < x < 1 the factor 2−7x2 - 7x is negative so dydx<0\dfrac{dy}{dx} < 0. The gradient changes from positive to negative: a maximum.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action