MATHEMATICS · LESSON 05 OF 10

Differentiation rules

Rules that give derivatives quickly and reliably: power, sum, product, quotient and chain rules, with the derivatives of trigonometric, exponential and logarithmic functions.

What this lesson explains

Computing every derivative from the limit definition is slow and error-prone. The rules below are consequences of that definition; once you trust them, you can differentiate almost any formula that appears in engineering models, from polynomials to damped oscillations and exponential decay.

Before you begin

Exponent laws

√x = x1/2, 1 / xn = x−n, xa·xb = xa+b. Rewrite roots and reciprocals as powers before using the power rule: 1 / √x = x−1/2.

Composition

In f(g(x)), g is the inside function and f the outside. For (2x + 5)4, the inside is u = 2x + 5 and the outside is u4. For sin(x2) the inside is x2 and the outside is sin.

Radians

π radians = 180°. Calculus formulas for sin, cos and tan assume radians.

The idea, made visible

Every formula is built from simple functions (powers, sin, ex, ln x) combined by a few operations: adding, multiplying, dividing, and putting one function inside another. There is one rule for each operation. The skill is to read the structure of the formula: which operation would you do last if you evaluated it at a number? That operation decides the first rule to use.

The power rule says that the derivative of xn is nxn−1: the exponent comes down and decreases by one. Constants multiply through and sums split term by term, because limits behave that way.

Choosing a differentiation rule from the last operationA decision diagram. The top box asks: what is the last operation you would do to evaluate the expression? Four branches lead to: sum or difference, differentiate term by term; product, product rule; quotient, quotient rule; function of a function, chain rule. Examples: x³ + 5x, x² sin x, (x + 1)/(x − 1), (2x + 5)⁴.What is the LAST operationwhen you evaluate it?Sum/differenceterm by terme.g. x³ + 5xProductproduct rulee.g. x² sin xQuotientquotient rulee.g. (x+1)/(x−1)Function ofa function: chaine.g. (2x + 5)⁴Inside each rule, apply the same question again to each part.Example: for (2x + 5)⁴ the last step is “raise to the 4th power”.
Read the structure first. The operation you would do last when evaluating the expression at a number decides the rule.

For a product f·g, both factors change, so both contribute: (fg)′ = f′g + fg′. It is not f′g′. For a quotient, (f/g)′ = (f′g − fg′)/g2; the order in the numerator matters because of the minus sign.

For a composition f(g(x)) — a function of a function — the rates multiply: if the inside changes at rate g′ and the outside responds at rate f′ (evaluated at the inside), the total rate is f′(g(x))·g′(x). This is the chain rule. Forgetting the inside derivative is the most common error in all of calculus.

Trigonometric derivatives such as (sin x)′ = cos x are only true when x is in radians, because they depend on lim sin h / h = 1. The exponential ex is its own derivative, and ln x has derivative 1/x for x > 0.

Examples of each rule
FunctionStructureDerivative
4x3 − 2x + 7sum of powers12x2 − 2
√x = x1/2power1 / 2x−1/2 = 1 / 2√x
x2 sin xproduct2x sin x + x2 cos x
x + 1 / x − 1quotient(x − 1) − (x + 1) / (x − 1)2 = −2 / (x − 1)2
(2x + 5)4chain (power of a linear function)4(2x + 5)3·2 = 8(2x + 5)3
e3xchain3e3x
sin(x2)chaincos(x2)·2x
ln(1 + x2)chain with ln2x / 1 + x2

Key terms

Power rule
d / dx xn = nxn−1 for any constant n (for non-integer n, on x > 0 where xn is defined).
Linearity
(cf)′ = cf′ and (f ± g)′ = f′ ± g′: constants factor out and sums split.
Product rule
(fg)′ = f′g + fg′.
Quotient rule
(f/g)′ = f′g − fg′ / g2, wherever g ≠ 0.
Chain rule
d / dx f(g(x)) = f′(g(x))·g′(x). In Leibniz form, with y = f(u) and u = g(x): dy / dx = dy / du·du / dx.
Higher derivatives
f″ is the derivative of f′; it measures how the rate itself changes. If s(t) is position, s′ = v is velocity and s″ = a is acceleration.
Implicit differentiation
When y is defined by an equation such as x2 + y2 = 25, differentiate both sides with respect to x, treating y as a function of x (so y2 gives 2y·y′), then solve for y′.

The formulas and what they mean

Symbols, meanings and units
SymbolMeaningUnit
f′, df / dx, d / dxderivative with respect to xoutput units ÷ x units
f″, d2f / dx2second derivativeoutput units ÷ (x units)²
uthe inside function in the chain rule—

Constants and powers

(c)′ = 0; (xn)′ = nxn−1; (cf)′ = cf′; (f ± g)′ = f′ ± g′

Conditions and limits: n any real constant; for non-integer n restrict to x > 0 (and check endpoints separately).

Product and quotient

(fg)′ = f′g + fg′; (f / g)′ = f′g − fg′ / g2

Conditions and limits: f and g differentiable; the quotient needs g(x) ≠ 0.

Chain rule

[f(g(x))]′ = f′(g(x))·g′(x)

Conditions and limits: g differentiable at x and f differentiable at g(x).

Trigonometric

(sin x)′ = cos x; (cos x)′ = −sin x; (tan x)′ = sec2 x

Conditions and limits: x in radians; tan x needs cos x ≠ 0.

Exponential and logarithmic

(ex)′ = ex; (ax)′ = ax ln a; (ln x)′ = 1 / x; (ln|x|)′ = 1 / x

Conditions and limits: a > 0 constant; ln x needs x > 0, ln|x| needs x ≠ 0.

Chain-rule versions

(un)′ = nun−1u′; (sin u)′ = cos u·u′; (eu)′ = euu′; (ln u)′ = u′ / u

Conditions and limits: u is any differentiable inside function (ln u needs u > 0).

Inverse functions

(f−1)′(y) = 1 / f′(x) where y = f(x)

Conditions and limits: f one-to-one and differentiable at x with f′(x) ≠ 0. Evaluate f′ at the ORIGINAL input x that matches y.

Inverse trigonometric

(arcsin x)′ = 1 / √1 − x2; (arctan x)′ = 1 / 1 + x2

Conditions and limits: arcsin: |x| < 1. arctan: all real x. Note arcsin x is the inverse function, not 1/sin x.

Why it works: Why the product rule has two terms

Think of a rectangle with sides f(x) and g(x), so its area is A = fg. Increase x by h.

  1. The sides become f + Δf and g + Δg. The new area is fg + Δf·g + f·Δg + Δf·Δg.

    Expand (f + Δf)(g + Δg).

  2. The change in area is ΔA = Δf·g + f·Δg + Δf·Δg.

    Subtract the original area fg.

  3. Divide by h: ΔA / h = Δf / hg + fΔg / h + Δf / hΔg.

    This is the difference quotient of the product.

  4. Let h → 0: Δf/h → f′, Δg/h → g′ and Δg → 0 (g is continuous), so the last term vanishes.

    Two strips survive; the tiny corner does not.

Hence (fg)′ = f′g + fg′: each factor’s change, multiplied by the other factor.

A first worked example

How to differentiate a formula

  1. Rewrite roots and reciprocals as powers (√x = x1/2, 1/x2 = x−2) and simplify where it helps (expand simple products).
  2. Identify the last operation: sum, product, quotient or composition. Apply that rule.
  3. Inside each rule, differentiate each part by asking the same question again.
  4. For every composition, multiply by the derivative of the inside. Check that each chain has its inside factor.
  5. Simplify, and evaluate at the requested point last.

Power and sum rules

Problem. Differentiate y = 4x3 − 6 / x + 2√x.

  1. Rewrite: y = 4x3 − 6x−1 + 2x1/2.

    Every term becomes a power of x.

  2. Differentiate term by term: 12x2 − 6(−1)x−2 + 2·1 / 2x−1/2.

    Bring down each exponent and reduce it by one.

Result: y′ = 12x2 + 6 / x2 + 1 / √x (for x > 0).

What it means: The domain x > 0 comes from √x in the original function and 1/√x in the derivative.

A different case

Chain rule

Problem. For y = (2x + 1)2, find y′ and its value at x = 1.

  1. Outside: u2; inside: u = 2x + 1.

    The last operation is squaring.

  2. y′ = 2(2x + 1)·(2x + 1)′ = 2(2x + 1)·2 = 4(2x + 1).

    Outside derivative, evaluated at the inside, times the inside derivative.

  3. At x = 1: y′ = 4·3 = 12.

    Substitute last.

Result: y′ = 4(2x + 1); y′(1) = 12.

What it means: Check by expanding: y = 4x2 + 4x + 1, so y′ = 8x + 4 = 4(2x + 1). Without the inside factor 2 you would get 6, which is wrong.

More worked cases

Each case below uses a different skill. Every step and result is shown.

Product rule

Problem. Differentiate y = x(x2 + 1) and find y′(2).

  1. f = x, f′ = 1; g = x2 + 1, g′ = 2x.

    Name the two factors and their derivatives.

  2. y′ = 1·(x2 + 1) + x·2x = 3x2 + 1.

    f′g + fg′.

  3. y′(2) = 3·4 + 1 = 13.

    Substitute.

Result: y′ = 3x2 + 1; y′(2) = 13.

What it means: Check: y = x3 + x, so y′ = 3x2 + 1. Multiplying the derivatives (1·2x = 2x) would be wrong.

Quotient rule

Problem. Differentiate y = x2 / x + 1 (x ≠ −1).

  1. f = x2, f′ = 2x; g = x + 1, g′ = 1.

    Top and bottom separately.

  2. y′ = 2x(x + 1) − x2·1 / (x + 1)2.

    f′g − fg′ over g2, in that order.

  3. Simplify the numerator: 2x2 + 2x − x2 = x2 + 2x.

    Expand and collect.

Result: y′ = x2 + 2x / (x + 1)2 = x(x + 2) / (x + 1)2.

What it means: y′ = 0 at x = 0 and x = −2, where the graph has horizontal tangents.

Product and chain together

Problem. Differentiate y = x2e3x.

  1. Last operation: multiplication, so use the product rule with f = x2 and g = e3x.

    Structure first.

  2. f′ = 2x; g′ = e3x·3 by the chain rule (inside 3x has derivative 3).

    Each part may need its own rule.

  3. y′ = 2x e3x + x2·3e3x = e3x(2x + 3x2).

    Factor out e3x for a tidy answer.

Result: y′ = xe3x(2 + 3x).

What it means: Since e3x > 0, the sign of y′ is the sign of x(2 + 3x).

Trigonometric and logarithmic chains

Problem. Find the derivatives of sin 3x at x = 0 and of ln(1 + x2) at x = 1.

  1. (sin 3x)′ = cos 3x·3. At x = 0: 3cos 0 = 3.

    Inside 3x has derivative 3; radians assumed.

  2. (ln(1 + x2))′ = 2x / 1 + x2. At x = 1: 2 / 2 = 1.

    (ln u)′ = u′/u with u = 1 + x2 > 0.

Result: 3 and 1.

What it means: Near x = 0, sin 3x rises about three times as fast as sin x.

Implicit differentiation

Problem. The circle x2 + y2 = 25 passes through (3, 4). Find the slope of the tangent there.

  1. Differentiate both sides with respect to x: 2x + 2y·y′ = 0.

    y depends on x, so y2 differentiates to 2y·y′ by the chain rule.

  2. Solve: y′ = −x / y (for y ≠ 0).

    Isolate y′.

  3. At (3, 4): y′ = −3 / 4.

    Substitute both coordinates.

Result: The slope is −0.75.

What it means: The tangent is perpendicular to the radius from (0, 0) to (3, 4), whose slope is 4/3, as geometry predicts.

Second derivative: velocity and acceleration

Problem. Position s(t) = t3 (m, t in s). Find the velocity and acceleration at t = 2 s.

  1. v = s′(t) = 3t2; v(2) = 12 m/s.

    Differentiate once.

  2. a = s″(t) = (3t2)′ = 6t; a(2) = 12 m/s2.

    Differentiate the derivative again. Do not square s′.

Result: v(2) = 12 m/s, a(2) = 12 m/s2.

What it means: Each differentiation divides the units by seconds: m, m/s, m/s2.

Logarithmic differentiation

Problem. Differentiate y = xx for x > 0.

  1. Neither the power rule (constant exponent) nor the exponential rule (constant base) applies: both base and exponent vary.

    Read the structure first.

  2. Take natural logarithms: ln y = x ln x.

    Valid because y > 0 for x > 0; the log turns the power into a product.

  3. Differentiate both sides: y′ / y = ln x + x·1 / x = ln x + 1.

    Chain rule on the left (y depends on x), product rule on the right.

  4. Multiply by y: y′ = xx(ln x + 1).

    Replace y by xx.

Result: y′ = xx(ln x + 1); for example y′(1) = 1.

What it means: The same method handles products of many factors and powers such as (x2 + 1)x.

The derivative of an inverse function

Problem. f(x) = x3 + x is one-to-one, with f(1) = 2. Find (f−1)′(2).

  1. The inverse input 2 corresponds to the original input 1, because f(1) = 2.

    Match the point on the original graph first.

  2. f′(x) = 3x2 + 1, so f′(1) = 4.

    Slope of f at the matching point.

  3. (f−1)′(2) = 1 / f′(1) = 1 / 4.

    Inverse-function rule: reflecting the graph in y = x turns a slope m into 1/m.

Result: (f−1)′(2) = 1/4.

What it means: We found the slope of the inverse without a formula for f−1. The rule needs f′ ≠ 0 at the matching point.

Common misunderstandings

  • Misunderstanding: (fg)′ = f′g′.

    Correct idea: The product rule has two terms: f′g + fg′. Check with x·x = x²: f′g′ = 1, but the true derivative is 2x.

  • Misunderstanding: Forgetting the inside derivative: (sin 3x)′ = cos 3x.

    Correct idea: The chain rule multiplies by the inside derivative: (sin 3x)′ = 3cos 3x.

  • Misunderstanding: Reversing the quotient-rule numerator.

    Correct idea: It is f′g − fg′ (derivative of the top first). The reversed order gives the wrong sign.

  • Misunderstanding: Applying the power rule to ex or 2x: (ex)′ = xex−1.

    Correct idea: The power rule needs a variable base and constant exponent. For a constant base: (ex)′ = ex, (2x)′ = 2x ln 2.

  • Misunderstanding: Using degrees in trigonometric derivatives.

    Correct idea: The formulas require radians.

  • Misunderstanding: Treating arcsin x as 1/sin x.

    Correct idea: arcsin is the inverse function (angle whose sine is x); 1/sin x is csc x.

Going further (optional): L’Hôpital’s rule (check whether your outline includes it)

For a limit of a quotient that gives 0 / 0 or ∞ / ∞ on substitution, lim f(x) / g(x) = lim f′(x) / g′(x), provided f and g are differentiable near the point, g′(x) ≠ 0 there (except possibly at the point), and the right-hand limit exists (or is ±∞).

Example: limx→0 ex − 1 / x has the form 0 / 0. Differentiate top and bottom separately: limx→0 ex / 1 = 1. Another: limx→0 sin 5x / x = limx→0 5 cos 5x / 1 = 5, the same answer as in the Limits lesson.

Check the form every time. For limx→1 x + 1 / x = 2, substitution already works; applying the rule anyway would give the wrong answer 1. This is not the quotient rule: the numerator and denominator are differentiated separately.

Keep in mind

  • (c)′ = 0; (xn)′ = nxn−1; (cf)′ = cf′; (f ± g)′ = f′ ± g′Constants and powers
  • (fg)′ = f′g + fg′; (f / g)′ = f′g − fg′ / g2Product and quotient
  • [f(g(x))]′ = f′(g(x))·g′(x)Chain rule
  • (sin x)′ = cos x; (cos x)′ = −sin x; (tan x)′ = sec2 xTrigonometric
  • (ex)′ = ex; (ax)′ = ax ln a; (ln x)′ = 1 / x; (ln|x|)′ = 1 / xExponential and logarithmic
  • (un)′ = nun−1u′; (sin u)′ = cos u·u′; (eu)′ = euu′; (ln u)′ = u′ / uChain-rule versions
  • (f−1)′(y) = 1 / f′(x) where y = f(x)Inverse functions
  • (arcsin x)′ = 1 / √1 − x2; (arctan x)′ = 1 / 1 + x2Inverse trigonometric

Scope of this lesson

  • Derivatives of hyperbolic functions are not included; check your outline.
  • The rules assume each function is differentiable where it is used; at corners, cusps or outside the domain they do not apply.
  • Higher derivatives repeat the rules: e2x has fourth derivative 16e2x, and the derivatives of sin x repeat every four steps (cos x, −sin x, −cos x, sin x).

Next: Related rates. When quantities are linked by an equation, their rates of change are linked too. Differentiate the equation with respect to time.

Original study text. Sources and credits.