Skip to content
Calculus Solver

Derivative Rules: A Complete Guide with Examples

Differentiating a function comes down to recognising its structure and applying the matching rule. This guide covers every rule you need for a first calculus course, shows when each one applies, and ends with a strategy you can use on any problem.

Last reviewed:

Connected gears and circles, representing derivative rules that combine and chain together

Quick reference table

Memorise these basic derivatives. Every other derivative is built from them using the combination rules below.

Basic derivatives
f(x)f′(x)
cc00
xnx^{n}nxn−1n x^{n-1}
exe^{x}exe^{x}
axa^{x}axln⁡aa^{x}\ln a
ln⁡x\ln x1x\frac{1}{x}
sin⁡x\sin xcos⁡x\cos x
cos⁡x\cos x−sin⁡x-\sin x
tan⁡x\tan xsec⁡2x\sec^{2}x
sec⁡x\sec xsec⁡xtan⁡x\sec x\tan x
arcsin⁡x\arcsin x11−x2\frac{1}{\sqrt{1 - x^{2}}}
arctan⁡x\arctan x11+x2\frac{1}{1 + x^{2}}

The power rule

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

Bring the exponent down as a coefficient, then subtract one from the exponent. The rule holds for every real n, not just positive integers. That makes it the fastest way to handle roots and reciprocals once you rewrite them as powers.

  • √x = x^(1/2), so its derivative is (1/2)x^(−1/2) = 1/(2√x).
  • 1/x³ = x^(−3), so its derivative is −3x^(−4) = −3/x⁴.
  • Constants differentiate to 0, and a constant factor stays put: (5x²)′ = 10x.

Product and quotient rules

(fg)′=f′g+fg′(fg)′=f′g−fg′g2(fg)' = f'g + fg' \qquad \left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^{2}}

Use the product rule whenever two non-constant factors are multiplied. The quotient rule is the product rule applied to f·g⁻¹, and is worth memorising for speed. The numerator starts with the derivative of the top: “low d-high minus high d-low, over low squared.”

Before reaching for the quotient rule, check whether simplifying first is easier. (x³ + x)/x is just x² + 1 for x ≠ 0.

The chain rule

ddxf(g(x))=f′(g(x)) g′(x)\frac{d}{dx}f\big(g(x)\big) = f'\big(g(x)\big)\,g'(x)

The chain rule handles compositions, meaning a function inside another function. Identify the outer function, differentiate it while leaving the inside untouched, then multiply by the derivative of the inside. For nested compositions, repeat from the outside in.

  • (3x + 1)⁵ → 5(3x + 1)⁴ · 3
  • e^(x²) → e^(x²) · 2x
  • ln(cos x) → (1/cos x) · (−sin x) = −tan x

Logarithmic differentiation

When both the base and the exponent contain x, as in xˣ, none of the basic rules apply directly. Take logarithms first: if y = xˣ then ln y = x ln x. Differentiate both sides (y′/y = ln x + 1) and multiply by y.

ddxxx=xx(ln⁡x+1)\frac{d}{dx}x^{x} = x^{x}\left(\ln x + 1\right)

A strategy that works every time

  • Simplify first: expand small products, cancel common factors, rewrite roots and reciprocals as powers.
  • Look at the outermost operation. A sum calls for the sum rule, a product for the product rule, a quotient for the quotient rule, and a function of something other than x for the chain rule.
  • Apply that one rule, then repeat on each smaller piece.
  • Simplify the result and sanity-check it, for example by plugging in a value or comparing with a graph.

The derivative calculator follows exactly this outside-in process and labels each step with the rule it used, so you can compare your own work line by line.

Worked examples

Example 1

Combining product and chain rules

ddx(x e2x)\frac{d}{dx}\left(x\,e^{2x}\right)
  1. Product rule with f = x, g = e^(2x). The chain rule gives g′ = 2e^(2x).

    1⋅e2x+x⋅2e2x1\cdot e^{2x} + x\cdot 2e^{2x}

Answer

e2x(1+2x)e^{2x}\left(1 + 2x\right)

Example 2

Rewriting a root as a power

ddxx2+4\frac{d}{dx}\sqrt{x^{2} + 4}
  1. Rewrite as (x² + 4)^(1/2), then use the power rule with the chain rule.

    12(x2+4)−1/2⋅2x\frac{1}{2}\left(x^{2} + 4\right)^{-1/2}\cdot 2x

Answer

xx2+4\frac{x}{\sqrt{x^{2} + 4}}

Example 3

A nested chain rule

ddxln⁡(cos⁡x)\frac{d}{dx}\ln\left(\cos x\right)
  1. The outer function is ln u with u = cos x.

    1cos⁡x⋅(−sin⁡x)\frac{1}{\cos x}\cdot\left(-\sin x\right)

Answer

−tan⁡x-\tan x

Questions about this topic

Which derivative rule should I use first?

Look at the outermost operation of the expression. That single operation decides the first rule; the inner pieces are handled afterwards.

Do I always need the quotient rule for fractions?

No. If the denominator is a constant, just use the constant multiple rule. If the fraction simplifies, simplify first. You can also rewrite f/g as f·g⁻¹ and use the product and chain rules.

Practise what you learned

Try the worked examples above in the calculator and compare each step with your own. You can also use the main Calculus Solver for every operation in one place.

Check your derivatives with the Derivative Calculator