← All Calculators

Derivative Calculator — Step by Step

Differentiate any function and see which rule is used at every step — power, product, quotient and chain rules, plus trig, exponential and log derivatives. Get the 2nd and 3rd derivatives, the slope and tangent line at a point, and a graph.

Use ^ for powers, sqrt(), sin(), cos(), tan(), ln(), log() (base 10), e^x, atan(), |x|.

Try:
Derivative
f′(x) = 2x sin(3x) + 3x2 cos(3x)

Step-by-step differentiation

First derivative
  • Product rule
    (uv)′ = u′v + uv′,  u = x2, v = sin(3x)ddx[x2 sin(3x)] = 2x sin(3x) + x2 · 3 cos(3x) = 2x sin(3x) + 3x2 cos(3x)
    • Power rule
      ddx[xn] = nxn−1ddx[x2] = 2x2 − 1 = 2x
    • Chain rule (sin)
      ddx[f(u)] = f′(u)·u′,  u = 3xddx[sin(3x)] = cos(3x) · 3 = 3 cos(3x)

Graph of f and f′

x-range:
-4-2024-2002040
f(x)f′(x)

Where f′ is above the axis, f is increasing; where f′ crosses zero, f has a peak, a dip or a flat point.

How to use the steps

  • Each line names the rule, shows it applied, then the simplified result. Indented lines work out the inner pieces (u′ and v′) the outer rule needs.
  • Results are computed symbolically and exactly — not estimated — so you can use them to check homework.
  • Natural log is ln(x); log(x) means base 10. Angles in trig functions are in radians.

Derivative formulas

Definitionf′(x) = limh→0 f(x + h) − f(x)h
Power ruled/dx [xn] = n xn−1
Constant multiple & sumd/dx [c·f] = c·f′, d/dx [f ± g] = f′ ± g′
Product rule(uv)′ = u′v + uv′
Quotient rule(uv)′ = u′v − uv′v2
Chain ruled/dx [f(g(x))] = f′(g(x)) · g′(x)
Exponentialsd/dx [ex] = ex, d/dx [ax] = ax ln a
Logarithmsd/dx [ln x] = 1x, d/dx [loga x] = 1x ln a
Trigsin → cos, cos → −sin, tan → sec2
More trigsec → sec tan, csc → −csc cot, cot → −csc2
Inverse trigsin−1 x → 1√1 − x2, tan−1 x → 11 + x2
Tangent line at x = ay = f(a) + f′(a)(x − a)

Worked examples

  1. Differentiate f(x) = 3x⁴ − 5x² + 2x − 7.

    1. Power rule on each term: 3·4x3 − 5·2x + 2 − 0

    Answer: f′(x) = 12x³ − 10x + 2

  2. Product rule: f(x) = x² eˣ.

    1. u = x2, v = ex → u′ = 2x, v′ = ex
    2. f′ = 2x·ex + x2·ex

    Answer: f′(x) = x eˣ (x + 2)

  3. Quotient rule: f(x) = (x + 1)/(x − 1).

    1. f′ = 1·(x − 1) − (x + 1)·1(x − 1)2

    Answer: f′(x) = −2/(x − 1)²

  4. Chain rule: f(x) = (3x² + 1)⁴.

    1. Outside: 4(3x2 + 1)3, inside derivative: 6x
    2. f′ = 4(3x2 + 1)3 · 6x

    Answer: f′(x) = 24x(3x² + 1)³

  5. Tangent line to f(x) = x³ at x = 2.

    1. f(2) = 8, f′(x) = 3x2 → f′(2) = 12
    2. y = 8 + 12(x − 2)

    Answer: y = 12x − 16

Tips & common mistakes

  • Rewrite roots and fractions as powers first: √x = x1/2, 1/x2 = x−2 — then the power rule does the work.
  • Chain rule in words: derivative of the outside (leave the inside alone) × derivative of the inside.
  • (uv)′ is not u′v′ — forgetting the product rule is the most common mistake.