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 actually mean?
is the rate at which y changes as x changes at one instant: the gradient of the tangent at a point. To find it, take a chord's gradient and let the chord shrink. Take : the chord from x to x + h rises by , which is , and dividing by the run h leaves 2x + h. As h shrinks to 0 this settles on 2x, so at x = 3 the gradient is 6. The value is exact, not an estimate: every chord gradient is 2x + h, and 2x is the only number all of them approach. A cube needs more algebra but no new idea, since divided by h is , which settles on . As a check, the chord from 3 to 5 has gradient (25 − 9) ÷ 2 = 8, which is 6 + 2, the gradient plus h.
the chord’s gradient exceeds f ′(2) by exactly h
Drag the upper point along the curve
Leibniz wrote it and Lagrange wrote f'(x), read "f prime". On its own, 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.
See The derivative as a limit, Derivative notation and Differentiating from first principles.
Where does a derivative fail to exist?
A derivative fails to exist wherever the curve has no single tangent: at a corner, at a vertical tangent, or at a break. Take y = |x| at 0. A chord from 0 to h has gradient |h| ÷ h, which is 1 for every positive h and −1 for every negative h. The two sides approach different values, and a derivative is one limit, which exists only when both sides agree. A vertical tangent fails another way. For the cube root of x at 0, the chord to 8 has gradient , the chord to 1 has gradient 1, and the chord to has gradient 4, so the values grow without bound. At a jump the function is not even continuous, and the chord gradients blow up there too. Away from the corner, |x| is a straight line, and the chord from 2 to 3 has gradient 3 − 2 = 1, which is its derivative there.
the gradient is −1 from the left and +1 from the right for every h, so no single value fits: f′(0) does not exist
Shrink h on each curve and see whether the two gradients meet
y = |x| has no derivative at 0. The gradient is −1 on the left and +1 on the right.
What is the power rule?
The power rule says differentiates to : bring the power down to multiply, then lower the power by one. For , , and at x = 2 the gradient is . A number in front stays in front, so becomes , and a sum is differentiated term by term. The rule comes from first principles: expanding gives plus terms in and higher, so the chord gradient is plus terms that still carry h, and those vanish in the limit. The rule holds for every real power, so roots and reciprocals take one extra first step: rewrite them as powers. So is , which becomes . A constant has derivative 0, since 5 is . To check, the chord of from 2 to 3 has gradient 81 − 16 = 65, well above 32 because the curve steepens.
divided by Δx: 3x² + 3xΔx + Δx² = 15.96; the rods carry the 3xΔx and the corner the Δx², and both vanish with Δx
Shrink Δx to 0 and count what survives
. . .
Rewrite a reciprocal or a root as a power first, then run the same two moves.
A straight line y = mx + c has gradient m everywhere, so its derivative is m.
So differentiates to , by the sum and constant multiple rules. See The power rule, Differentiating linear functions and The constant multiple and sum rules.
Now you
Differentiate
Differentiate
When do you use the product rule?
Use the product rule when two functions of x are multiplied together. If y = uv, then : differentiate each factor in turn, leave the other alone, and add. For , take and v = sin x, so . The rule works because small changes in the factors grow the rectangle uv by two strips, u times the change in v and v times the change in u, plus a corner that vanishes when divided by the step. Three factors give three terms, each with one factor differentiated. A fraction calls for the quotient rule, whose numerator is a subtraction, so its order matters. Test it on : the rule gives , which is , the derivative of , and at x = 1 the two terms add as 1 + 3 = 4.
the two strips shrink in proportion to Δu and Δv, but the corner Δu·Δv shrinks faster, so it vanishes from the derivative; here it is 18.6%
Shrink both changes until the corner is under 5% of the growth
.
For a fraction , the quotient rule: vu′ .
If the denominator is a single power, use the power rule instead: . See The product rule and The quotient rule.
Now you
of
of , using the product rule
When do you use the chain rule?
Use the chain rule whenever one function sits inside another: differentiate the outer function with the inside left alone, then multiply by the derivative of the inside. For , the outer function is a cube and the inside is , so . At x = 1 the gradient is . In Leibniz notation, with u the inside, and the rates multiply because a step in x is scaled once on the way to u and again on the way to y. Deeper nesting adds one factor per layer, so differentiates to 2 sin(3x) × cos(3x) × 3. A linear inside contributes just its coefficient. To confirm the first result, expand the cube to , differentiate to , and put x = 1: 6 + 12 + 6 = 24.
a step in x is doubled on the way to u and multiplied by 2u on the way to y, so the rates multiply: dy/dx = 14
Make dy/dx equal 12
- Read the expression as "do this, then do that". means add 1 to 3x, then raise the result to the fifth power.
- Differentiate the outer layer, keeping the inside as it stands: .
- Multiply by the derivative of the inside, which is 3: .
.
The final multiplication is the step most often left out.
read the structure first: a product u·v, a quotient u/v, a composite f(g(x)), or a power xⁿ
Drag the expression into the rule that differentiates it
See The chain rule.
Now you
Differentiate sin(3x)
Differentiate
How do you differentiate trigonometric functions?
Sine differentiates to cosine, and cosine to negative sine, provided the angle is in radians. So y = 3 sin x + 2 cos x has derivative 3 cos x − 2 sin x, and its gradient at x = 0 is 3 × 1 − 2 × 0 = 3. Four differentiations return to sine: sin, cos, −sin, −cos, sin. The rule rests on one limit, approaching 1 as h shrinks, which holds only in radians. Expanding sin(x + h), subtracting sin x and dividing by h then leaves exactly cos x. In degrees that limit is , and every derivative would carry the factor. A coefficient on the angle brings in the chain rule, so sin 5x differentiates to 5 cos 5x, not cos 5x. The graph agrees: sine peaks at , where its tangent is flat and cosine is 0, and it climbs through the origin with gradient cos 0 = 1.
the height is sin θ and the upward part of the velocity (−sin θ, cos θ) is cos θ: d(sin θ)/dθ = cos θ
Rotate to θ = 0 and compare the height with the upward speed
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 , which is 1, and is .
The same route gives , and . 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 number, about 2.718, for which has a gradient equal to its height at every point, so differentiates to itself. Every exponential has a gradient proportional to its height; the constant is below 1 for and above 1 for , and e is the base between them where it is exactly 1. This matters because growth at a rate proportional to size, as in populations and cooling, is written with and no stray constant, and its inverse, ln x, has the simple derivative . Any other base is e in disguise, since , so the chain rule gives the derivative . A coefficient in the power multiplies through: differentiates to . The tangent shows it: because gradient equals height, every tangent meets the x-axis one unit to the left of its point, so the tangent at x = 1 crosses at 1 − 1 = 0.
ln b > 1: the tangent rises more than the height 1, so bˣ grows faster than its own size — lower b
Adjust b until the tangent at (0, 1) has gradient 1
For ln x, write and differentiate both sides: , so .
The logarithm to any base a is , so differentiates to .
See The number e, Differentiating exponentials and logarithms and Differentiating and .
What if the equation is not solved for y?
Differentiate every term as it stands, with respect to x, then solve for ; this is implicit differentiation. A term in y differentiates as usual and gains a factor of , by the chain rule, because y depends on x. For the circle , this gives , so , and at (3, 4) the gradient is . The geometry agrees: the radius to (3, 4) has gradient , the tangent is perpendicular to it, and . A term holding both letters needs the product rule. For xy = 12, differentiating gives , so , which is at (3, 4). Rearranging first is never required, and a curve such as cannot be rearranged at all. Both curves pass through (3, 4), since 9 + 16 = 25 and 3 × 4 = 12.
x and y share a sign, so −x/y < 0: the tangent falls, perpendicular to the radius of gradient y/x
Find the points where the tangent has gradient +1
Collect the terms on one side before solving.
.
Now you
. What is ?
. What is ?
How do you differentiate an inverse function?
An inverse function has the reciprocal gradient at the matching point: if f(a) = b, then . Take , with f(2) = 8. The gradient of at 2 is , so the cube root has gradient at 8. This works because the inverse is the reflection of the original in the line y = x, and that reflection swaps rise with run, turning every gradient upside down. The same step gives ln x from : has gradient at , so ln x has gradient at , which is there. The rule breaks down where f'(a) = 0: is flat at 0, so the cube root has a vertical tangent there. Differentiating the cube root directly as gives , and at 8 that is .
the inverse is the reflection in y = x, so its tangent is the reflected tangent and the slopes are reciprocals: f′(a) × (f⁻¹)′(f(a)) = 1
Drag the point and try to make the product of the two slopes anything but 1
For , undo the inverse first: sin y = x. Differentiate both sides: , so , and Pythagoras replaces cos y with .
The same moves on tan y = x give . 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 : the rate at which the gradient changes. For , the gradient 2x differentiates to 2.
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 and and Higher derivatives.
What are the hyperbolic functions?
The hyperbolic functions are built from exponentials: , , and . Since is 1, cosh 0 = 1 and sinh 0 = 0. Differentiating straight from , sinh x gives cosh x, and cosh x gives sinh x, with no minus sign, unlike cosine. The name comes from : the point (cosh t, sinh t) lies on the hyperbola , as (cos t, sin t) lies on the circle . Most identities copy the trigonometric ones, but by Osborn's rule the sign changes wherever a product of two sines appears, so becomes . Try x = ln 2: then and , so and , and .
the hyperbolic sector and the circular sector both have area t/2, so t is an angle for the hyperbola: (cosh t, sinh t) is to x² − y² = 1 what (cos t, sin t) is to x² + y² = 1
Sweep t until both sectors have area ½
A chain hanging under its own weight follows a cosh curve, called a catenary.
To prove , square the two definitions: the squares of and cancel in the subtraction, and the middle terms, and , leave 1.
tanh x differentiates to , which is sech²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 . arcosh keeps only , because cosh takes each value above 1 twice. See sinh, cosh and tanh, The identity , Differentiating sinh x and cosh x, Inverse hyperbolic functions and Inverse hyperbolics as logarithms.
The mistakes worth naming
the true increase is two strips of length x, so (uv)′ = 2x = 4; the fallacy u′v′ = 1 accounts for one unit of it and misses 2x − 1 = 3
Take x to 4 and compare the true increase with u′v′
- Forgetting the inner derivative. The chain rule ends with a multiplication.
- Differentiating a product factor by factor. The derivative of uv is not u'v'.
- Reversing the quotient rule's numerator. vu′ comes first.
- Using degrees. The derivative of sin x is cos x only in radians.
- Rearranging before differentiating implicitly. No curve needs it, and some cannot be rearranged.
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. Related guides: Partial Differentiation.
Your turn
Three to try — tap what you get.
d/dx of x³
d/dx of sin x
The derivative of a constant is
Questions and answers
- What does actually mean?
- It is the rate at which y changes as x changes, at one particular instant. It began life as a ratio of two tiny differences and became the limit of that ratio as the differences shrink toward zero, so the answer is exact rather than approximate. On a graph it is the gradient of the tangent at a point; in physics, if y is distance and x is time, it is speed.
- When do you use the chain rule?
- Whenever one function sits inside another. If you can describe the expression as do this, then do that — square it, then take the sine — the chain rule applies. Differentiate the outer function leaving the inside alone, then multiply by the derivative of the inside. Anything with a bracket raised to a power, or a function of anything more complicated than plain x, needs it.
- What is the product rule?
- For two functions multiplied together, the derivative is the first times the derivative of the second, plus the second times the derivative of the first. It exists because derivatives do not distribute over multiplication: the derivative of a product is not the product of the derivatives, and a single numerical check on x times x confirms it.
- Why is the derivative of e to the x equal to itself?
- Because that is what defines the number e. Every exponential curve has a derivative proportional to itself, and the constant of proportionality depends on the base. e is the unique base for which that constant is exactly 1, so e to the x is the one exponential function that is its own rate of change. This is why it appears in every growth and decay model.
- What is implicit differentiation?
- It is differentiating an equation that has not been rearranged to make y the subject. Differentiate every term with respect to x, applying the chain rule whenever a term contains y so that each one contributes a factor of , then collect those terms and solve for . It is the only way to get the gradient of a curve like a circle, which is not a function of x at all.
- What are sinh and cosh?
- They are the hyperbolic sine and cosine, defined from exponentials: cosh x is half of e to the x plus e to the minus x, and sinh x is half of the difference. They mirror the trigonometric functions almost exactly, with cosh squared minus sinh squared equal to 1 instead of a sum. A hanging chain follows a cosh curve, which is where the name catenary comes from.