Skip to content
8 min read

How to Find the Derivative: Power, Product, Quotient and Chain Rules

The derivative of a function tells you its rate of change: how fast yy changes as xx changes, or, on a graph, the slope of the curve at each point. Most derivatives you will meet in a course come from four rules. Spot which one the function needs, apply it, and simplify.

The calculator is loaded with example 2 from the power rule section. Type your own function using ^ for powers and * for multiplication, for example x^2*sin(x).

Which rule do I use?

If the function isExampleUse
A power of x, or a sum of them3x4−7x2+5x3x^4 - 7x^2 + 5xPower rule, term by term
Two functions multipliedx2sin⁡xx^2 \sin xProduct rule
One function divided by anotherx2+1x−3\dfrac{x^2 + 1}{x - 3}Quotient rule
A function inside another function(3x2+5)4(3x^2 + 5)^4Chain rule

Many functions need two rules at once; there is an example of that further down.

What a derivative is

The derivative of f(x)f(x) at a point is the slope of the tangent line there. You get it by taking the slope between two points on the curve and letting the gap hh between them shrink to zero:

f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}
1234-112xyh = 1: slope 3h = 0.5: slope 2.5tangent at x = 1: slope 2y = x²
On y=x2y = x^2, the slope from x=1x = 1 to x=1+hx = 1 + h is 2+h2 + h. As hh shrinks, the dashed lines close in on the tangent, whose slope is 2.

For f(x)=x2f(x) = x^2 the limit works out like this:

(x+h)2−x2h=2xh+h2h=2x+h→2x as h→0\begin{aligned} \frac{(x + h)^2 - x^2}{h} &= \frac{2xh + h^2}{h} \\ &= 2x + h \\ &\to 2x \text{ as } h \to 0 \end{aligned}

So f′(x)=2xf'(x) = 2x, and at x=1x = 1 the slope is 2, as in the picture. Working from the limit every time would be slow, which is what the rules below are for.

Rule 1: The power rule

ddxxn=nxn−1\frac{d}{dx} x^n = n x^{n-1}

Bring the power down in front and reduce the power by one. A constant on its own differentiates to zero, and a constant multiplier stays where it is.

Example 1

f(x)=x5f(x) = x^5

f′(x)=5x4f'(x) = 5x^4

Example 2: a polynomial

f(x)=3x4−7x2+5x−9f(x) = 3x^4 - 7x^2 + 5x - 9

Differentiate term by term:

f′(x)=12x3−14x+5f'(x) = 12x^3 - 14x + 5

Example 3: negative and fractional powers

Rewrite roots and fractions as powers first: 1x3=x−3\frac{1}{x^3} = x^{-3} and x=x1/2\sqrt{x} = x^{1/2}.

ddxx−3=−3x−4=−3x4\frac{d}{dx} x^{-3} = -3x^{-4} = -\frac{3}{x^4}ddxx1/2=12x−1/2=12x\frac{d}{dx} x^{1/2} = \frac{1}{2}x^{-1/2} = \frac{1}{2\sqrt{x}}

Rule 2: The product rule

ddx[uv]=u′v+uv′\frac{d}{dx}[u v] = u' v + u v'
u · vv duu dvdu dvuduvdv
Why the rule has two terms: think of uvuv as the area of a rectangle. When xx changes a little, the area grows by a strip v duv\,du and a strip u dvu\,dv; the corner du dvdu\,dv is so small it vanishes in the limit.

Example 4

f(x)=x2sin⁡xf(x) = x^2 \sin x. Let u=x2u = x^2 and v=sin⁡xv = \sin x, so u′=2xu' = 2x and v′=cos⁡xv' = \cos x.

f′(x)=2xsin⁡x+x2cos⁡xf'(x) = 2x \sin x + x^2 \cos x

Rule 3: The quotient rule

ddx[uv]=u′v−uv′v2\frac{d}{dx}\left[\frac{u}{v}\right] = \frac{u' v - u v'}{v^2}

Example 5

f(x)=x2+1x−3f(x) = \frac{x^2 + 1}{x - 3}. Let u=x2+1u = x^2 + 1 and v=x−3v = x - 3, so u′=2xu' = 2x and v′=1v' = 1.

f′(x)=2x(x−3)−(x2+1)(x−3)2=x2−6x−1(x−3)2\begin{aligned} f'(x) &= \frac{2x(x - 3) - (x^2 + 1)}{(x - 3)^2} \\ &= \frac{x^2 - 6x - 1}{(x - 3)^2} \end{aligned}

Rule 4: The chain rule

ddxf(g(x))=f′(g(x))⋅g′(x)\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)

Differentiate the outside function, leave the inside alone, then multiply by the derivative of the inside.

xinside gu = 3x² + 5uoutside fy = u⁴y× g′(x) = 6x× f′(u) = 4u³dy/dx = 4u³ · 6x = 24x(3x² + 5)³
Example 6 as a pipeline: xx feeds the inside function, whose output feeds the outside one. Each stage multiplies the rate of change, so the two derivatives multiply.

Example 6

f(x)=(3x2+5)4f(x) = (3x^2 + 5)^4. The outside is u4u^4; the inside is u=3x2+5u = 3x^2 + 5, with derivative 6x6x.

f′(x)=4(3x2+5)3⋅6x=24x(3x2+5)3\begin{aligned} f'(x) &= 4(3x^2 + 5)^3 \cdot 6x \\ &= 24x(3x^2 + 5)^3 \end{aligned}

Example 7

f(x)=sin⁡(5x3)f(x) = \sin(5x^3)

f′(x)=cos⁡(5x3)⋅15x2=15x2cos⁡(5x3)\begin{aligned} f'(x) &= \cos(5x^3) \cdot 15x^2 \\ &= 15x^2 \cos(5x^3) \end{aligned}

Using two rules at once

f(x)=x2e3xf(x) = x^2 e^{3x} is a product, and its second factor needs the chain rule: ddxe3x=3e3x\frac{d}{dx} e^{3x} = 3e^{3x}.

f′(x)=2xe3x+x2⋅3e3x=xe3x(3x+2)\begin{aligned} f'(x) &= 2x e^{3x} + x^2 \cdot 3e^{3x} \\ &= x e^{3x}(3x + 2) \end{aligned}

What the derivative tells you

Where f′(x)f'(x) is positive the function is rising, where it is negative the function is falling, and where it is zero the graph is flat. These stationary points are where you look for maximums and minimums in optimisation problems. Most are turning points, but not all: x3x^3 is flat at 0 and keeps on rising.

-4-2246-2-112xyf(x) = x³ − 3xf′(x) = 3x² − 3
f(x)=x3−3xf(x) = x^3 - 3x (blue) and its derivative f′(x)=3x2−3f'(x) = 3x^2 - 3 (amber). The derivative is zero at x=−1x = -1 and x=1x = 1, exactly where ff turns.

Derivatives to know by heart

ddx[c]\frac{d}{dx}\left[c\right]00
ddx[xn]\frac{d}{dx}\left[x^n\right]nxn−1nx^{n-1}
ddx[ex]\frac{d}{dx}\left[e^x\right]exe^x
ddx[ax]\frac{d}{dx}\left[a^x\right]axln⁡aa^x \ln a
ddx[ln⁡x]\frac{d}{dx}\left[\ln x\right]1x\frac{1}{x}
ddx[sin⁡x]\frac{d}{dx}\left[\sin x\right]cos⁡x\cos x
ddx[cos⁡x]\frac{d}{dx}\left[\cos x\right]−sin⁡x-\sin x
ddx[tan⁡x]\frac{d}{dx}\left[\tan x\right]sec⁡2x\sec^2 x

Common mistakes

  1. Forgetting the inside derivative. The derivative of sin⁡(5x3)\sin(5x^3) is not cos⁡(5x3)\cos(5x^3); it needs the extra factor 15x215x^2.
  2. Getting the quotient rule backwards. The top is u′v−uv′u'v - uv', in that order, because subtraction does not swap.
  3. Treating a product like a sum. The derivative of x2sin⁡xx^2 \sin x is not 2xcos⁡x2x \cos x.
  4. Leaving roots as roots. Rewrite x\sqrt{x} as x1/2x^{1/2} before using the power rule.

Related calculators and guides

Related Articles