What is the product rule? Learn how to use the product rule to calculate derivatives of products. Then, explore how we derive the product rule, and test your mastery with examples.
The product rule is a useful addition to your mathematical toolbox. Keep reading to learn how we use the product rule to simplify the differentiation process.
What Is the Product Rule?
The product rule is a handy tool for differentiating a product of functions. The term “product of functions” refers to the multiplication of two or more functions. The product rule allows us to calculate quickly the derivatives of products of functions that are not easily multiplied by hand—or that we can’t simplify any further.
Dr. Tim Chartier refers to the product rule as a game-changing derivative rule:
How do you know when to use the product rule? The product rule allows us to differentiate two differentiable functions that are being multiplied together. If we can express a function in the form f(x)⋅g(x)—where f and g are both differentiable functions—then we can calculate its derivative using the product rule.
What Is the Product Rule Formula?
The product rule derivative formula tells us that the derivative of a product of two differentiable functions is equal to the first function multiplied by the second function’s derivative, plus the second function multiplied by the first function’s derivative. Phew, that's a mouthful!
So, if h(x)=f(x)⋅g(x), where both f and g are differentiable functions, then the product rule is:
So, the derivative of the product of functions f(x)⋅g(x) is equal to f(x) multiplied by g’(x), plus g(x) multiplied by f’(x).
For example, let’s consider the function h defined by h(x)=x4sin(x). We express this function as the product of two functions, x4 and sin(x).
Using the product rule formula to calculate the derivative of h, we’ll let f(x)=x4 and g(x)=sin(x).
dxd[h(x)]=f(x)dxd[g(x)]+g(x)dxd[f(x)]
dxd[h(x)]=x4⋅dxd[sin(x)]+sin(x)⋅dxd[x4]
To calculate dxd[sin(x)], we can refer to the derivative rules for the sine function, which tells us that dxd[sin(x)]=cos(x). To calculate dxd[x4], we’ll need to use the power rule for derivatives, which tells us that dxd[x4]=4x3.
Now, we can finish our calculation by plugging in these derivatives:
dxd[h(x)]=x4⋅dxd[sin(x)]+sin(x)⋅dxd[x4]
dxd[h(x)]=x4cos(x)+4x3sin(x)
Using the product rule, we’ve found that the derivative of h(x)=x4sin(x) is x4cos(x)+4x3sin(x).
Be careful. The derivative of a product of functions is not equal to the product of each function’s derivatives.
dxd[f(x)⋅g(x)]=dxd[f(x)]⋅dxd[g(x)]
Consider the earlier example, h(x)=x4sin(x). In this example, we define h(x) as the product of x4 and sin(x).
The derivative of x4 is 4x3 and the derivative of sin(x) is cos(x). The product of these derivatives is 4x3⋅cos(x).
Notice that this function is not equal to the derivative of h(x) that we calculated earlier: h’(x)=x4cos(x)+4x3sin(x). Be cautious of this common mistake when differentiating a product of functions.
Product Rule Proof
We’ll discuss two popular proofs of the product rule. The first involves using the first principle of derivatives. The second proof relies upon the chain rule.
Proof Using the First Principle of Derivatives
We formally define derivatives using limits. This relationship is often called the first principle of derivatives.
f’(x)=Δx→0limΔxf(x+Δx)−f(x)
To begin our proof of the product rule, we apply the above definition to a product of functions, where the function h is defined by h(x)=f(x)⋅g(x).
h’(x)=Δx→0limΔxf(x+Δx)g(x+Δx)−f(x)g(x)
To move forward from this step, we’ll use some algebraic manipulation. First, we subtract f(x+Δx)g(x) from the numerator. Follow this by immediately adding f(x+Δx)g(x) to the numerator. This results in no change to the value of the numerator, since adding and subtracting the same number results in zero.
Adding and subtracting f(x+Δx)g(x) allows us to factor cleverly the numerator. First, we’ll factor f(x+Δx) out of the first two expressions of the numerator. Then, we’ll factor g(x) out of the last two expressions of the numerator. We can also use the sum law for limits to separate our expression into a sum of limits.
The product law for limits states that the limit of a product of two functions is the product of their limits. This law allows us to separate our expression into four limits:
Notice that Δx→0limf(x+Δx) and Δx→0limg(x) are simply equal to f(x) and g(x). Similarly, observe that Δx→0limΔxf(x+Δx)−f(x) and Δx→0limΔxg(x+Δx)−g(x) are simply the limit definitions of the derivatives of f(x) and g(x):
Δx→0limf(x+Δx)=f(x)
Δx→0limg(x)=g(x)
Δx→0limΔxf(x+Δx)−f(x)=f’(x)
Δx→0limΔxg(x+Δx)−g(x)=g’(x)
The last step is to plug in the above substitutions.
Through the first principle of derivatives, we’ve proved the product rule!
Proof Using the Chain Rule
We use the chain rule to differentiate compositions of functions. Define F such that F(x)=f(g(x)) for every x, and let f and g be differentiable. Then:
F’(x)=f’(g(x))g’(x)
To derive the product rule, we’ll consider the function h defined by h(x)=[f(x)+g(x)]2, where f and g are differentiable functions.
For this proof of the product rule, we’ll differentiate h in two different ways, and then equate the results in order to derive the formula for the product rule.
First, we’ll use the chain rule to differentiate. We’ll also need the sum rule and power rule for derivatives.
h’(x)=2[f(x)+g(x)][f’(x)+g’(x)]
h’(x)=2f(x)f’(x)+2f(x)g’(x)+2g(x)f’(x)+2g(x)g’(x)
Now, we’ll calculate the derivative a second way, by expanding h(x)=[f(x)+g(x)]2.
h(x)=[f(x)]2+2f(x)g(x)+[g(x)]2
Now, differentiating h, we have:
h’(x)=2f(x)f’(x)+2[f(x)g(x)]’+2g(x)g’(x)
Now we have two different equations for h’(x). Notice that the second equation has the term 2[f(x)g(x)]’. The inside term [f(x)g(x)]’ represents the derivative of a product of functions. This is what we will solve for.
Since we have two equations for h’(x), we can equate the two and solve for [f(x)g(x)]’.
Now, we’ve proved the product rule using the chain rule!
Examples of the Product Rule
Let’s walk through a few product rule examples.
Practice Problem 1
Calculate the derivative of f(x)=7xcos(x) using the product rule.
Solution
For this problem, we’ll use the derivative rule for the cosine function, as well as a special case of the power rule, where our exponent is 1. Using the product rule, we have:
dxd[f(x)]=f(x)dxd[g(x)]+g(x)dxd[f(x)]
dxd[f(x)]=7xdxd[cos(x)]+cos(x)dxd[7x]
dxd[f(x)]=7x⋅(−sin(x))+cos(x)⋅7
dxd[f(x)]=−7xsin(x))+7cos(x)
dxd[f(x)]=7cos(x)−7xsin(x))
Practice Problem 2
Calculate the derivative of f(x)=ln(x)e3x using the product rule.
Solution
For this problem, we’ll use the differentiation rules for exponential functions and the natural log function, as well as the chain rule. Using the product rule formula, we have:
dxd[f(x)]=f(x)dxd[g(x)]+g(x)dxd[f(x)]
dxd[f(x)]=ln(x)dxd[e3x]+e3xdxd[ln(x)]
dxd[f(x)]=ln(x)[e3x⋅3]+e3x⋅x1
dxd[f(x)]=3e3xln(x)+xe3x
Practice Problem 3
Calculate the derivative of f(x)=xtan(7x2) using the product rule.
Solution
For this problem, we’ll use the differentiation rule for the tangent function, as well as the power rule and chain rule. Using the product rule formula, we have:
dxd[f(x)]=f(x)dxd[g(x)]+g(x)dxd[f(x)]
dxd[f(x)]=xdxd[tan(7x2)]+tan(7x2)dxd[x]
dxd[f(x)]=xsec2(7x2)⋅14x+tan(7x2)⋅1
dxd[f(x)]=14x2sec2(7x2)+tan(7x2)
The product rule comes in handy quite often. Other helpful rules to learn include the quotient rule, the chain rule, and the power rule. Once you have a grasp of the different derivative rules, you’re on your way to excelling in calculus.
Outlier (from the co-founder of MasterClass) has brought together some of the world's best instructors, game designers, and filmmakers to create the future of online college.