### Finding the derivative of   $f(x) = g(x)\cdot h(x)$

Very often we need to find the derivative of a product of functions. We'll prove this rule below, but the simple statement in the box is what you need to remember:

To find the derivative of a product multiply the first function by the derivative of the second and add the product of the second function and the derivative of the first.

#### The product rule

The derivative of a product of functions f(x)·g(x) is the first function multiplied b the derivative of the second, plus the second multiplied by the derivative of the first.

Another way to state the rule, using functions u(x) and v(x), is:

### Derivation of the product rule

We begin the derivation of the product rule with the definition of the derivative of f(x)·g(x) (see The Derivative):

Now this is a difficult limit, in that we can't just substitute h = 0 because the function would blow up. So we have to do some kind of manipulation that eliminates h from at least some additive part of the denominator. One clever manipulation is to both add and subtract f(x + h)g(x) to the numerator, like this:

Now we can rearrange that numerator like this. What we're doing is moving toward being able to identify individual derivatives of f(x) and g(x):

We can split the function into two limits of products. Remember that the limit of a product is the product of limits, and the limit of a sum is the sum of limits:

Now here's our final statement. Starting from the right, we see the limit definition of f'(x), that g(x) does not depend in any way on x, and the limit definition of g'(x). Trickier is the final limit on the left, which I'll address below.

The limit of f(x + h) as h approaches zero is f(x) only if f is continuous and has a limit in of f(a) for x = a.

Our result is the product rule:

In the derivation above, we relied on the continuity of a function. It's worth reconsidering that now.

The limit of f(x + h), as h → 0 is f(x) if f(x) is a "well-behaved" function. That means that it is continuous and differentiable everywhere, or at least in the part of the domain in which we're interested.

If, for example, f(x) has a hole at x (see graph at right), then the limit of f(x) as h → 0 would exist (because the one-sided limits from the left and right are the same), but the function is discontinuous, so it has neither a defined value nor a derivative at x.

### Example 1

Find the derivative of   $f(x) = x^2 \, cos(x)$

Solution: Our function is a product of two functions, g(x) = x2 and h(x) = cos(x),

$$f(x) = x^2 \cdot cos(x)$$

The power rule give us:

which doesn't simplify all that much:

$$f'(x) = 1x \, cos(x) - x^2 \, sin(x)$$

This is a good example to compare the features of the graphs of a function and its derivative. Plotted here are the f(x) and f'(x) from our first example above.

First, notice that the two are plotted on separate axes. Resist the temptation to plot a function and its derivative on the same axes. They don't belong together and the result can be misleading. The derivative graph need not resemble the function graph.

The derivative graph is positive where the slope of f(x) is positive and negative where the slope of f(x) is negative. At the two local maxima and the local minimum, the derivative graph passes through zero because the derivative at a max. or min. is zero.

An inflection point is a point at which the curvature of a graph changes from concave upward to concave downward, or the reverse. They occur at maxima or minima in the derivative. We'll learn more about those when we study the second derivative.

### Example 2

Find the derivative of   $f(x) = (x^2 - 3)(2x^3 - x)$

Solution: The function

$$f(x) = (x^2 - 3)(2x^3 - x)$$

is the product of two functions. We could call them g(x) = x2 - 3 and h(x) = (2x3 - x). To find the derivative, we use the pattern of the product rule: f'(x) = f(x)·g'(x) + g(x)·f'(x):

\begin{align} f'(x) &= (2x^3 - x) \, \frac{d}{dx} (x^2 - 3) \\ \\ &+ (x^2 - 3) \, \frac{d}{dx} (2x^3 - x) \end{align}

A little algebra gets us a simplified derivative:

\begin{align} f'(x) &= (2x^3 - x)(2x) + (x^2 - 3)(6x^2 - 1) \\ &= 4x^4 - 2x^2 + 6x^4 -x^2 - 18x^2 + 3 \\ &= 10x^4 - 21x^2 + 3 \end{align}

#### A double check

We could check our work by multiplying the binomials of this function first:

\begin{align} f(x) &= (x^2 - 3)(2x^3 - x) \\ &= 2x^5 - x^3 - 6x^3 + 3x \\ &= 2x^5 - 7x^3 + 3x \end{align}

Now the power rule derivative is easy to find:

$$f'(x) = 10x^4 - 21x^2 + 3$$

... and it's the same as what we found with the product rule – nice to confirm that the product rule works!

### Practice problems

Find the derivative of each of the following functions. Where possible, calculate the derivative without using the product rule in order to check your answer.

 1 f(x) = √ x (x - 1) Solution 2 f(x) = (x - 2)(2x + 3) Solution 3 f(x) = (2x3 + 3)(x4 - 2x) Solution 4 f(x) = (1 + x + x2)(2 - x3) Solution 5 f(x) = (x3 - 2x)(x-3 + x-2) Solution 6 f(x) = sin(x)·cos(x) Solution 7 f(x) = x-4 sin(x) Solution 8 f(x) = (1 + x)·cos(x) Solution 9 f(x) = x(2x2 - 1)·sin(x) Solution 10 f(x) = (x2 - 1)3 Solution

### Video examples

Here are eight examples (four videos) of product-rule derivatives. Enjoy! (OK, maybe that's overdoing it. I do hope they're helpful, though).

#### Example 1

The first example shows that the product rule yields the same result as the power rule when both can be used.

#### Example 2

Two examples involving products of polynomial, exponential and trigonometric functions.

#### Example 3

These are two trickier product rule derivatives. One contains a negative exponent, showing how the product rule can be used to find the derivative of a quotient of functions.