# Product Rule

The product rule tells us the derivative of two functions **f** and **g** that are multiplied together:

(fg)’ = fg’ + gf’

(The little mark ’ means "derivative of".)

### Example: What is the derivative of cos(x)sin(x) ?

We have two functions **cos(x)** and **sin(x)** multiplied together, so let's use the Product Rule:

(fg)’ = f g’ + f’ g

Which in our case becomes:

(cos(x)sin(x))’ = cos(x) sin(x)’ + cos(x)’ sin(x)

We know (from Derivative Rules) that:- sin(x)’ = cos(x)
- cos(x)’ = −sin(x)

So we can substitute:

(cos(x)sin(x))’ = cos(x) cos(x) + −sin(x) sin(x)

Which simplifies to:

(cos(x)sin(x))’ = cos^{2}(x) − sin^{2}(x)

**cos**

^{2}(x) − sin^{2}(x)## Why Does It Work?

When we multiply two functions f(x) and g(x) the result is the **area fg**:

The derivative is the rate of change, and when **x** changes a little then both **f** and **g** will also change a little (by Δf and Δg). In this example they both increase making the area bigger.

How much bigger?

Increase in area = Δ(fg) = fΔg + ΔfΔg + gΔf

As the change in x heads towards zero, the "ΔfΔg" term also heads to zero, and we get:

(fg)’ = fg’ + gf’

## Alternative Notation

An alternative way of writing it (called Leibniz Notation) is:

\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx}

Here is our example from before in Leibniz Notation:

### Example: What is the derivative of cos(x)sin(x) ?

This:

\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx}

Becomes this:

\frac{d}{dx}(cos(x)sin(x)) = cos(x)\frac{d(sin(x))}{dx} + sin(x)\frac{d(cos(x))}{dx}

From Derivative Rules:- \frac{d}{dx}sin(x) = cos(x)
- \frac{d}{dx}cos(x) = −sin(x)

\frac{d}{dx}(cos(x)sin(x)) = cos(x) cos(x) + −sin(x) sin(x)

Which simplifies to:

\frac{d}{dx}(cos(x)sin(x)) = cos^{2}(x) − sin^{2}(x)

## Three Functions

For three functions multiplied together we can use:

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