## If you could change one thing about college, what would it be? Outlier Articles Home

Calculus

# What Is the Product Rule? [With Examples]

## Rachel McLean

Subject Matter Expert

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) \cdot 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) \cdot g(x)$, where both $f$ and $g$ are differentiable functions, then the product rule is:

$h’(x) = f(x) \cdot g’(x) + g(x) \cdot f’(x)$

We can also express the product rule formula using Leibniz’s notation.

$\frac{d}{dx}[h(x)] = f(x)\frac{d}{dx}[g(x)] + g(x)\frac{d}{dx}[f(x)]$

So, the derivative of the product of functions $f(x) \cdot 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) = x^4\sin{(x)}$. We express this function as the product of two functions, $x^4$ and $sin{(x)}$.

Using the product rule formula to calculate the derivative of $h$, we’ll let $f(x) = x^4$ and $g(x) = \sin{(x)}$.

$\frac{d}{dx}[h(x)] = f(x)\frac{d}{dx}[g(x)] + g(x)\frac{d}{dx}[f(x)]$
$\frac{d}{dx}[h(x)] = x^4 \cdot \frac{d}{dx}[\sin{(x)}] + \sin{(x)} \cdot \frac{d}{dx}[x^4]$

To calculate $\frac{d}{dx}[\sin{(x)}]$, we can refer to the derivative rules for the sine function, which tells us that $\frac{d}{dx}[\sin{(x)}] = \cos{(x)}$. To calculate $\frac{d}{dx}[x^4]$, we’ll need to use the power rule for derivatives, which tells us that $\frac{d}{dx}[x^4] = 4x^3$.

Now, we can finish our calculation by plugging in these derivatives:

$\frac{d}{dx}[h(x)] = x^4 \cdot \frac{d}{dx}[\sin{(x)}] + \sin{(x)} \cdot \frac{d}{dx}[x^4]$
$\frac{d}{dx}[h(x)] = x^4 \cos{(x)} + 4x^3\sin{(x)}$

Using the product rule, we’ve found that the derivative of $h(x) = x^4\sin{(x)}$ is $x^4 \cos{(x)} + 4x^3\sin{(x)}$.

Be careful. The derivative of a product of functions is not equal to the product of each function’s derivatives.

$\frac{d}{dx}[f(x)\cdot g(x)] \neq \frac{d}{dx}[f(x)] \cdot \frac{d}{dx}[g(x)]$

Consider the earlier example, $h(x) = x^4\sin{(x)}$. In this example, we define $h(x)$ as the product of $x^4$ and $\sin{(x)}$. The derivative of $x^4$ is $4x^3$ and the derivative of $\sin{(x)}$ is $\cos{(x)}$. The product of these derivatives is $4x^3 \cdot \cos{(x)}$. Notice that this function is not equal to the derivative of $h(x)$ that we calculated earlier: $h’(x) = x^4 \cos{(x)} + 4x^3\sin{(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) = \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{{f\left( {x + \Delta{x} } \right) - f\left( x\right)}}{\Delta{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) \cdot g(x)$.

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{{f\left( {x + \Delta{x} } \right)g\left( {x + \Delta{x} } \right) - f\left( x\right)g\left( x\right)}}{\Delta{x}}$

To move forward from this step, we’ll use some algebraic manipulation. First, we subtract $f(x+\Delta{x})g(x)$ from the numerator. Follow this by immediately adding $f(x+\Delta{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.

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{{f( x + \Delta{x})g(x + \Delta{x})- f(x+\Delta{x})g(x) + f(x+\Delta{x})g(x) - f(x)g(x)}}{\Delta{x}}$

Adding and subtracting $f(x+\Delta{x})g(x)$ allows us to factor cleverly the numerator. First, we’ll factor $f(x+\Delta{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.

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{f(x+\Delta{x})[g(x+\Delta{x})-g(x)] + g(x)[f(x+\Delta{x})-f(x)]}{\Delta{x}}$

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{f(x+\Delta{x})[g(x+\Delta{x})-g(x)]}{\Delta{x}} + \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{g(x)[f(x+\Delta{x})-f(x)]}{\Delta{x}}$

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} f(x+\Delta{x})\frac{g(x+\Delta{x})-g(x)}{\Delta{x}} + \mathop{\lim }\limits_{\Delta{x} \to 0} g(x)\frac{f(x+\Delta{x})-f(x)}{\Delta{x}}$

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:

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} f(x+\Delta{x}) + \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{g(x+\Delta{x})-g(x)}{\Delta{x}} + \mathop{\lim }\limits_{\Delta{x} \to 0} g(x) + \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{f(x+\Delta{x})-f(x)}{\Delta{x}}$

Notice that $\mathop{\lim }\limits_{\Delta{x} \to 0} f(x+\Delta{x})$ and $\mathop{\lim }\limits_{\Delta{x} \to 0} g(x)$ are simply equal to $f(x)$ and $g(x)$. Similarly, observe that $\mathop{\lim }\limits_{\Delta{x} \to 0} \frac{f(x+\Delta{x})-f(x)}{\Delta{x}}$ and $\mathop{\lim }\limits_{\Delta{x} \to 0} \frac{g(x+\Delta{x})-g(x)}{\Delta{x}}$ are simply the limit definitions of the derivatives of $f(x)$ and $g(x)$:

$\mathop{\lim }\limits_{\Delta{x} \to 0} f(x+\Delta{x}) = f(x)$
$\mathop{\lim }\limits_{\Delta{x} \to 0} g(x) = g(x)$
$\mathop{\lim }\limits_{\Delta{x} \to 0} \frac{f(x+\Delta{x})-f(x)}{\Delta{x}} = f’(x)$
$\mathop{\lim }\limits_{\Delta{x} \to 0} \frac{g(x+\Delta{x})-g(x)}{\Delta{x}} = g’(x)$

The last step is to plug in the above substitutions.

$h’(x) = \mathop{\lim }\limits_{\Delta{x} \to 0} f(x+\Delta{x}) + \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{g(x+\Delta{x})-g(x)}{\Delta{x}} + \mathop{\lim }\limits_{\Delta{x} \to 0} g(x) + \mathop{\lim }\limits_{\Delta{x} \to 0} \frac{f(x+\Delta{x})-f(x)}{\Delta{x}}$

$h’(x) = f(x)g’(x) + g(x)f’(x)$

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)]’$.

$2f(x)f’(x) + 2f(x)g’(x) + 2g(x)f’(x) + 2g(x)g’(x) = 2f(x)f’(x) + 2[f(x)g(x)]’ + 2g(x)g’(x)$

$2f(x)g’(x) + 2g(x)f’(x) = 2[f(x)g(x)]’$

$f(x)g’(x) + g(x)f’(x) = [f(x)g(x)]’$

$[f(x)g(x)]’ = f(x)g’(x) + g(x)f’(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) = 7x\cos{(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:

$\frac{d}{dx}[f(x)] = f(x)\frac{d}{dx}[g(x)] + g(x)\frac{d}{dx}[f(x)]$
$\frac{d}{dx}[f(x)] = 7x\frac{d}{dx}[\cos{(x)}] + \cos{(x)}\frac{d}{dx}[7x]$
$\frac{d}{dx}[f(x)] = 7x \cdot (-\sin{(x)}) + \cos{(x)} \cdot 7$
$\frac{d}{dx}[f(x)] = -7x\sin{(x)}) + 7\cos{(x)}$
$\frac{d}{dx}[f(x)] = 7\cos{(x)} - 7x\sin{(x)})$

### Practice Problem 2

Calculate the derivative of $f(x) = \ln{(x)}e^{3x}$ 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:

$\frac{d}{dx}[f(x)] = f(x)\frac{d}{dx}[g(x)] + g(x)\frac{d}{dx}[f(x)]$
$\frac{d}{dx}[f(x)] = \ln{(x)}\frac{d}{dx}[e^{3x}] + e^{3x}\frac{d}{dx}[\ln{(x)}]$
$\frac{d}{dx}[f(x)] = \ln{(x)}[e^{3x}\cdot 3] + e^{3x}\cdot \frac{1}{x}$
$\frac{d}{dx}[f(x)] = 3e^{3x}\ln{(x)} + \frac{e^{3x}}{x}$

### Practice Problem 3

Calculate the derivative of $f(x) = x\tan{(7x^2)}$ 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:

$\frac{d}{dx}[f(x)] = f(x)\frac{d}{dx}[g(x)] + g(x)\frac{d}{dx}[f(x)]$
$\frac{d}{dx}[f(x)] = x\frac{d}{dx}[\tan{(7x^2)}] + \tan{(7x^2)}\frac{d}{dx}[x]$
$\frac{d}{dx}[f(x)] = x\sec ^2 {(7x^2)} \cdot 14x + \tan{(7x^2)} \cdot 1$
$\frac{d}{dx}[f(x)] = 14x^2\sec ^2{(7x^2)} + \tan{(7x^2)}$

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.

### Explore Outlier's Award-Winning For-Credit Courses

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.

Check out these related courses: ## Calculus I

The mathematics of change.

Explore course ## Intro to Statistics

How data describes our world.

Explore course ## Intro to Microeconomics

Why small choices have big impact.

Explore course