Chalk−1

Math · Calculus I · Concept

The product rule for derivatives

To differentiate a product f⁡(x)⁢g⁡(x), use the product rule. The derivative is f′(x)⁢g⁡(x)+f⁡(x)g′(x), one term for each factor changing while the other holds still. It is not f′(x)g′(x).

A concrete case

Follow one small change

Take f⁡(x)=x2(x+1), the product of the two factors x2 and x+1. At x=2 the factors are 4 and 3, and the product is 12.

Nudge x up by 0.01, to 2.01. The first factor becomes 4.0401, a change of 0.0401. The second becomes 3.01, a change of 0.01. The product becomes 12.160701, a change of 0.160701. Divided by the nudge, that is a rate of about 16.07.

Multiplying the factors’ own rates does not come close. At x=2 the first factor changes 4 times as fast as x and the second exactly as fast, and 4×1 is only 4. The product changes for two reasons at once. The first factor grows while the second is about 3, which contributes 4×3=12. The second factor grows while the first is about 4, which contributes 4×1=4. Together they make 12+4=16, the exact rate at x=2.

0.1607010.01=16.0701
Following a nudge of 0.01 through x2(x+1) at x=2
QuantityAt x=2At x=2.01Change
First factor, x244.04010.0401
Second factor, x+133.010.01
Product, x2(x+1)1212.1607010.160701

The rule

The product rule

Let f and g be functions that both have a derivative at x. The derivative of their product is the derivative of the first times the second, plus the first times the derivative of the second. In the formula, f′(x) and g′(x) are the rates of the two factors, and f⁡(x) and g⁡(x) are their values at the same x.

Read it as two effects added together. Let the first factor change while the second keeps its value, then let the second change while the first keeps its value. The order of the two terms does not matter, because each is a product and the two are added.

dd⁢x[f⁡(x)⁢g⁡(x)]=f′(x)⁢g⁡(x)+f⁡(x)g′(x)
dd⁢x[f⁡(x)⁢g⁡(x)]=f′(x)⁢g⁡(x)+f⁡(x)g′(x)

Why it works

Why there are two terms

Picture the product as the area of a rectangle with width f and height g. When x moves by a small amount h, the width grows by Δ⁢f and the height by Δ⁢g. The new rectangle is the old one plus three pieces. A strip down the side has area g⋅Δ⁢f, a strip along the top has area f⋅Δ⁢g, and a small corner has area Δ⁢f⋅Δ⁢g.

The nudge above fits this picture exactly. With h=0.01 at x=2, the side strip is 3×0.0401=0.1203, the top strip is 4×0.01=0.04, and the corner is 0.0401×0.01=0.000401. They add to 0.160701, the whole change in the product.

Now divide by h and let h shrink to 0. The side strip over h becomes g⋅f′, and the top strip over h becomes f⋅g′. The corner over h is (Δ⁢f/⁢h)⋅Δ⁢g. Its first part tends to f′ and its second part tends to 0, because g barely moves when h is tiny. The corner contributes nothing, and the two strips are the two terms of the rule.

Δ⁢(fg)=gΔ⁢f+fΔ⁢g+Δ⁢fΔ⁢g
The three pieces of the change in x2(x+1) from x=2 to x=2.01
PieceAreaDivided by h=0.01
Side strip, g⋅Δ⁢f3 ×0.0401 =0.120312.03
Top strip, f⋅Δ⁢g4 ×0.01 =0.044
Corner, Δ⁢f⋅Δ⁢g0.0401 ×0.01 =0.0004010.0401
Whole change0.16070116.0701

The method

The method in five steps

Write the four pieces f, f′, g and g′ before you assemble anything. Most product rule errors are a piece put in the wrong place, and a list makes the places plain. The table works through y=(x2+1)ex.

Step 4 is worth the trouble. The factored form shows that the slope is 0 only at x=−1, because ex is never 0.

dd⁢x[(x2+1)ex]=2⁢xex+(x2+1)ex=ex(x+1)2
dd⁢x[(x2+1)ex]=2⁢xex+(x2+1)ex=ex(x+1)2
The product rule on y =(x2+1)ex
StepWhat to doFor y =(x2+1)ex
1Name the two factorsf =x2+1 and g=ex
2Differentiate each factorf′=2⁢x and g′=ex
3Write f′g+fg′2⁢x⋅ex+(x2+1)⋅ex
4Factor out what the terms shareex(x2+2⁢x+1) =ex(x+1)2
5Check one valueat x=0 the slope is 1

When to multiply out instead

If both factors are polynomials, you have a choice. Multiplying out x2(x+1) gives x3+x2, and the power rule finishes the job. The product rule gives the same answer and is quicker when the factors are long.

When the factors are different kinds of function, such as x2cosx, exsinx or xlnx, nothing multiplies out, and the product rule is the route. A constant factor needs no rule at all. 5x3 is a constant times x3, and its derivative is 5⋅3x2=15x2.

For three factors, let one change at a time and add the three terms. The pattern extends to any number of factors, with one term for each.

(fgh)′=f′gh+fg′h+fgh′

Where it breaks

Where it breaks

The tempting shortcut is to multiply the two derivatives. Test it on x⋅x=x2. The shortcut gives 1⋅1=1, but the derivative of x2 is 2⁢x. The product rule gives 1⋅x+x⋅1=2⁢x, as it should.

A product is also easy to confuse with a composition. The function x2sinx multiplies two functions you work out separately, so it takes the product rule. In sin(x2) the x2 sits inside the sine, so it takes the chain rule, and its derivative is 2⁢xcos(x2). To tell them apart, ask which operation is done last. If it is a multiplication, start with the product rule.

The rule needs both factors to have a derivative at the point. Where one of them does not, the rule cannot be used there, though the product itself may still have a derivative. Deeper shows such a case.

dd⁢x⁢(x⋅x)=1⋅x+x⋅1=2⁢x

Check your answer

Check your answer

A product rule derivative can be checked against the product itself.

Multiply out when you can. The product x2(x+1) is x3+x2, whose derivative 3x2+2⁢x matches the product rule’s answer.

Compare with a secant. The ratio [f⁡(x+h)−f⁡(x)]⁢/⁢h with a small h such as 0.001 should be close to your derivative. For x2(x+1) at x=2 it is about 16.007, against f′(2)=16. Try a second point too, because one point can hide a sign error.

Count the terms before you simplify. Two factors give two terms and three factors give three, each with exactly one derivative in it.

To have Chalk check the work, write it in a Math box. Put the function on the first row as f⁡(x)=… and each step of the derivative on its own row below it as f′(x)=…. A value such as f′(2)=16 can follow, once the derivative is in the same box. A wrong derivative reads ✗ with “Not the derivative of row 1.”

Why the rule is true, and where it leads

The rectangle is a picture, not a proof. The proof adds and subtracts one term, f⁡(x)⁢g⁡(x+h), in the difference quotient. The numerator then splits into [f⁡(x+h)−f⁡(x)]⋅g⁡(x+h) plus f⁡(x)⋅[g⁡(x+h)−g⁡(x)]. Divide by h and let h shrink to 0. The first part tends to f′(x)⁢g⁡(x), because a function with a derivative is continuous. The second tends to f⁡(x)g′(x).

The rule asks more than it needs. The function x⁢∣⁢x⁢∣ has derivative 0 at x=0, though ∣⁢x⁢∣ has no derivative there. Its difference quotient at 0 is h⁢∣⁢h⁢∣⁢/⁢h=∣⁢h⁢∣, which tends to 0.

Applied twice, the rule gives the second derivative of a product, f′⁢′g+2f′g′+fg′⁢′. Read backwards, it becomes integration by parts, the method for integrating a product such as x ex.

f⁡(x+h)⁢g⁡(x+h)−f⁡(x)⁢g⁡(x)h=f⁡(x+h)−f⁡(x)hg⁡(x+h)+f⁡(x)g⁡(x+h)−g⁡(x)h
f⁡(x+h)⁢g⁡(x+h)−f⁡(x)⁢g⁡(x)h=f⁡(x+h)−f⁡(x)hg⁡(x+h)+f⁡(x)g⁡(x+h)−g⁡(x)h

Common mistakes

  • Multiplying the derivatives. The derivative of x2⋅x3=x5 is 5x4, not 2⁢x⋅3x2=6x3, because each factor’s rate is weighed against the other factor’s value, not its rate.
  • Putting both derivatives in one term, as in f′g′+fg. Each term of the rule holds exactly one derivative, so the right form is f′g+fg′.
  • Dropping the 3 from the derivative of e3⁢x. In x2e3⁢x, the second factor’s derivative is 3e3⁢x, not e3⁢x, because ek⁢x has derivative kek⁢x. The answer is 2⁢xe3⁢x+3x2e3⁢x.
  • Losing the sign of the cosine’s derivative. The derivative of xcosx is cosx−xsinx, not cosx+xsinx, because the derivative of cosx is −sinx.

Key terms

Product rule
To differentiate a product, take the derivative of the first factor times the second, plus the first times the derivative of the second: (u⁢v)′=u′v+uv′.
Derivative
The instantaneous rate of change of a function: the limit of the average rate of change as the step shrinks to zero, when that limit exists. On a graph it is the slope of the tangent line.
Differentiable
Having a derivative at a point. A function is continuous wherever it is differentiable, but not the other way round: ∣⁢x⁢∣ is continuous at x=0 with no derivative there.
Chain rule
The rule for differentiating a function inside another function: [f⁡(g⁡(x))]′ =f′(g⁡(x))⋅g′(x). Differentiate the outside, keeping the inside as it is, then multiply by the derivative of the inside.

Work through an example

Differentiate f⁡(x)=x2(x+1) with the product rule, then check the result by expanding first.

Differentiate x2(x+1) with the product rule →

Differentiate x2cosx with the product rule →

Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Study it, then try it

Practice the key terms as flashcards, then open the example in its tool, change a value and keep a useful result on your board.

Study the 4 key terms Open Product Rule Geometry Check the derivative in Math Open worked example on a board Product rule in Math Reference

Your existing work stays on this device. Examples open as editable copies.