Learn

Rules of Differentiation

Contents

Differentiating from first principles is slow. Each rule is that limit worked out once for one shape of expression. The skill is recognizing the shape: a power, a product, a quotient, or a function inside another function.

What does dy/dx actually mean?

dy/dx is the rate at which y changes as x changes, at one instant: the gradient of the tangent at a point. Draw a chord through two points on the curve; its gradient is rise over run. Slide one point toward the other and the chord's gradient settles on one value. That value is the derivative, and it is exact, because it is a limit.

The derivative is where that swinging settles: a limit, not an approximation. Full lesson: The Derivative As a Limit

Leibniz wrote it dy/dx and Lagrange wrote f'(x), read "f prime". On its own, d/dx is an instruction: differentiate whatever follows it.

From first principles, write the rise over a step h, divide by h, simplify, and only then let h go to 0. For y = x²: ((x + h)² − x²)/h = 2x + h, which goes to 2x.

Every first-principles derivation starts here: the rise over a step h, divided by h. Full lesson: Differentiating From First Principles

See The derivative as a limit, Derivative notation and Differentiating from first principles.

Where does a derivative fail to exist?

Wherever the curve has no single tangent. At a corner, the gradients on the two sides differ, so no single value fits. At a vertical tangent, the run is 0, so the gradient has no value. At a jump, there is no chord to shrink.

The two sides of this corner have gradients −1 and +1, so no single value fits. Full lesson: Where a Derivative Fails to Exist
y = ∛x stands vertical at 0, and a vertical tangent has no gradient value. Full lesson: Where a Derivative Fails to Exist
Where the curve jumps there is no chord to shrink, so no derivative exists. Full lesson: Where a Derivative Fails to Exist

y = |x| has no derivative at 0. The gradient is −1 on the left and +1 on the right.

Differentiable is stronger than continuous: a function with a derivative at a point is continuous there. The reverse fails, as y = |x| at 0 shows. See Where a derivative fails to exist.

What is the power rule?

xⁿ differentiates to nxⁿ⁻¹. There are two moves, in this order: the power comes down to the front and multiplies, then the power drops by one.

Now the power itself drops by one. Two moves, in that order: 3x squared. Full lesson: The Power Rule

x⁵ → 5x⁴. 1/x = x⁻¹ → −x⁻² = −1/x². √x = x^(1/2) → (1/2)x^(−1/2) = 1/(2√x).

Rewrite a reciprocal or a root as a power first, then run the same two moves.

Roots are powers in disguise: √x is x to the half, and the same two moves run. Full lesson: The Power Rule

A straight line y = mx + c has gradient m everywhere, so its derivative is m. A constant is a flat line, so its derivative is 0.

A flat line has gradient 0, which is why the derivative of a constant is 0. Full lesson: Differentiating Linear Functions

The sum rule: differentiate each term separately. The constant multiple rule: a numerical factor stays where it is. So 4x³ − 7x + 2 differentiates to 12x² − 7. See The power rule, Differentiating linear functions and The constant multiple and sum rules.

Now you

Differentiate 6x^2

Differentiate √x

When do you use the product rule?

When two functions of x are multiplied together. If y = uv, then dy/dx = uv' + vu′: differentiate each factor in turn, keep the other as it is, and add.

Grow a u by v rectangle a little and it gains a strip along each side. Full lesson: The Product Rule

y = x² sin x → x² cos x + 2x sin x.

The derivative of a product is not the product of the derivatives. Check with x · x: 1 × 1 = 1, but differentiates to 2x.

For a fraction u/v, the quotient rule: dy/dx = (vu′ − uv')/v². The numerator is a subtraction, so the order matters.

Unlike the product rule, swapping the two terms changes the sign of the answer. Full lesson: The Quotient Rule

If the denominator is a single power, use the power rule instead: 3/x² = 3x⁻² → −6x⁻³. See The product rule and The quotient rule.

Now you

d/dx of x·x³

d/dx of x·x², using the product rule

When do you use the chain rule?

Whenever one function sits inside another. Differentiate the outer function, leaving the inside as it is, then multiply by the derivative of the inside.

  1. Read the expression as "do this, then do that". (3x + 1)⁵ means add 1 to 3x, then raise the result to the fifth power.
  2. Differentiate the outer layer, keeping the inside as it stands: 5(3x + 1)⁴.
  3. Multiply by the derivative of the inside, which is 3: 15(3x + 1)⁴.
Finally multiply by the inside’s own derivative, which is 3. That gives 15. Full lesson: The Chain Rule

sin(x²) → cos(x²) × 2x.

The final multiplication is the step most often left out. In Leibniz notation, dy/dx = dy/du × du/dx: the two rates of change multiply.

The inside changes 3 times as fast as x, so a gradient in u is 3 times steeper in x. Full lesson: The Chain Rule

See The chain rule.

Now you

Differentiate sin(3x)

Differentiate (3x + 1)^3

How do you differentiate trigonometric functions?

sin x differentiates to cos x, and cos x differentiates to −sin x. Four differentiations return to sin x.

Where sine is steepest cosine peaks, and where sine peaks cosine crosses zero. Full lesson: Differentiating Trigonometric Functions
Four differentiations bring you back to where you started: one closed cycle. Full lesson: Differentiating Trigonometric Functions

This holds only in radians; in degrees, every derivative picks up a factor of π/180. The proof uses the limit of sin x / x from limits and continuity.

tan x = sin x / cos x, so the quotient rule applies. The numerator is cos²x + sin²x, which is 1, and 1/cos²x is sec²x.

The numerator is 1 by Pythagoras, and 1 over cos²x has a name: sec²x. Full lesson: Differentiating tan x and the Reciprocal Ratios

The same route gives sec x → sec x tan x, cosec x → −cosec x cot x and cot x → −cosec²x. See Differentiating trigonometric functions and Differentiating tan x and the reciprocal ratios.

Now you

Differentiate −sin x

Differentiate sin x

What is e, and why does it matter?

e is the base whose exponential curve has a gradient equal to its height at every point. The gradient of is less than its height and the gradient of is greater; near 2.718 they match exactly.

Somewhere near 2.718 the two match exactly. That number is called e. Full lesson: The Number E

So differentiates to itself. For ln x, write eʸ = x and differentiate both sides: eʸ dy/dx = 1, so dy/dx = 1/eʸ = 1/x.

Undo the log: e to the y is x, so differentiating both sides gives 1 over x. Full lesson: Differentiating Exponentials and Logarithms

Any other base is e in disguise: aˣ = e^(x ln a), and the chain rule gives aˣ ln a. Likewise logₐ x = ln x / ln a differentiates to 1/(x ln a).

Write it back with base a: the derivative of is times ln a. Full lesson: Differentiating aˣ and logₐ x

See The number e, Differentiating exponentials and logarithms and Differentiating and logₐ x.

What if the equation is not solved for y?

Differentiate every term as it stands, then solve for dy/dx. x² + y² = 25 is a circle, and no rearranging writes y as a single function of x.

x² + y² = 25 is a circle, and no rearranging writes y as a single function of x. Full lesson: Implicit Differentiation

A y-term differentiates as usual and then gains a factor of dy/dx, by the chain rule. Collect the dy/dx terms and solve.

Differentiate y-terms as usual, then multiply by dy/dx — that is the chain rule. Full lesson: Implicit Differentiation

x² + y² = 25 → 2x + 2y dy/dx = 0 → dy/dx = −x/y.

The radius to (x, y) has gradient y/x, so the tangent is perpendicular to the radius. See Implicit differentiation.

Now you

3x² + y² = 4. What is dy/dx?

4x² + y² = 7. What is dy/dx?

How do you differentiate an inverse function?

Take the reciprocal. An inverse function is the reflection of the original in the line y = x, and reflecting swaps the rise with the run. Read f' at the matching point: if f(a) = b, then (f⁻¹)'(b) = 1/f'(a).

The reflection swaps the rise with the run, so every gradient becomes its reciprocal. Full lesson: The Derivative of an Inverse Function

For sin⁻¹ x, undo the inverse first: sin y = x. Differentiate both sides: cos y dy/dx = 1, so dy/dx = 1/cos y, and Pythagoras replaces cos y with √(1 − x²).

The answer should be in terms of x: Pythagoras replaces cos y with √(1 − x²). Full lesson: Differentiating sin⁻¹ x and tan⁻¹ x

The same moves on tan y = x give 1/(1 + x²). Both derivatives are algebraic, so an integral of that shape has an inverse-trigonometric answer.

Differentiate again and you get the second derivative, f'′(x) or d²y/dx²: the rate at which the gradient changes. For y = x², the gradient 2x differentiates to 2.

Differentiating again gives 2: the gradient grows at a steady rate. Full lesson: Higher Derivatives

A positive second derivative means the curve bends upward, like a bowl, which is the test for maxima and minima in the applications of differentiation. See The derivative of an inverse function, Differentiating sin⁻¹ x and tan⁻¹ x and Higher derivatives.

What are the hyperbolic functions?

They are built from exponentials: cosh x = (eˣ + e⁻ˣ)/2, sinh x = (eˣ − e⁻ˣ)/2, and tanh x = sinh x / cosh x.

Average with e⁻ˣ and you get cosh; take half their difference and you get sinh. Full lesson: sinh, cosh and tanh

A chain hanging under its own weight follows a cosh curve, called a catenary.

Square the two definitions and subtract: cosh²x − sinh²x = 1. Compare cos²θ + sin²θ = 1, which puts (cos θ, sin θ) on a circle; with one sign changed, (cosh t, sinh t) lies on a hyperbola.

One sign changes, and (cosh t, sinh t) lies on a hyperbola. That is where the name comes from. Full lesson: The Identity cosh²x − sinh²x = 1

sinh x differentiates to cosh x, and cosh x differentiates to sinh x, with no minus sign. tanh x differentiates to 1/cosh²x.

Differentiate cosh the same way. Unlike cosine, no minus sign appears at all. Full lesson: Differentiating sinh x and cosh x

The inverses are logarithms. Write x = sinh y, multiply every term by to get a quadratic in , solve it, reject the negative root, and take logarithms: arsinh x = ln(x + √(x² + 1)). arcosh keeps only x ≥ 0, because cosh takes each value above 1 twice. See sinh, cosh and tanh, The identity cosh²x − sinh²x = 1, Differentiating sinh x and cosh x, Inverse hyperbolic functions and Inverse hyperbolics as logarithms.

The mistakes worth naming

Learn this properly in the app

Every lesson linked above is a screen in Math Challenge with a diagram, a worked example and practice questions. The limit behind these rules is in limits and continuity, using a derivative is the applications of differentiation, and running each rule backward is techniques of integration.

Your turn

Three to try — tap what you get.

d/dx of x³

d/dx of sin x

The derivative of a constant is

Math ChallengePractice that adapts to you, the whole lesson ladder, and your progress saved.
Start with Math Challenge

Mr. Chalk Practice this lesson in the app