Introduction
Differentiation answers one question: how fast is a quantity changing at a single instant? Average rates of change are easy, since they are just ratios of differences. The derivative refines that idea until the interval shrinks to a point. Mechanics, optimisation, curve sketching and differential equations all build on it, and so does a large part of analysis.
On this page we build the derivative from its definition. We then derive the rules that make it practical, and use them to analyse curves, solve optimisation problems and handle relations that are not written as .
Mathematical motivation
Suppose a stone falls so that it has dropped metres after seconds. Between and its average speed is
Make smaller and the average speed settles on . That limiting value is the instantaneous speed at . Speedometers and marginal cost both rest on this one construction, and so does the slope of a tangent line.
Intuitive explanation
Zoom in far enough on a smooth curve and it looks straight. The derivative is the gradient of that apparent straight line, the tangent at .
Near a differentiable function behaves like its tangent line:
The error is small compared with , so it vanishes faster than does. This is the most useful way to think about derivatives, and it is exactly the idea that generalises to several variables.
A chord through and has gradient . As the chord swings round into the tangent. Open the calculus visualiser to watch this happen.
Watching the limit happen
Take at and compute the gradient of the chord from to for smaller and smaller :
The values close in on from both sides. Algebra shows why: . The "error" is exactly , which disappears in the limit. So , matching .
If you zoom in on the graph of near by a factor of , the curve becomes indistinguishable from the straight line . A function is differentiable at a point exactly when this happens. Its graph is "locally straight", and the derivative is the slope of the line you see. A corner like at never straightens out, however far you zoom.
Formal definitions
Let be defined on an open interval containing . We say is differentiable at if the limit
exists (as a finite real number). The function , defined wherever this limit exists, is the derivative of .
A point where is a stationary point. It is a local maximum if for all near , a local minimum if for all near . A stationary point that is neither is a stationary point of inflection.
If is differentiable at then is continuous at , because . The converse fails: is continuous at , but its difference quotient is for and for , so it has no limit.
Important notation
- Leibniz: , . These are best for the chain rule and for related rates.
- Lagrange: , , . These are best when the function has a name.
- Newton: , for derivatives with respect to time.
- Operator: acting on an expression.
is not a fraction, but the notation is designed so that many fraction-like manipulations (such as the chain rule) turn out to be valid theorems.
Standard derivatives
Trigonometric results require in radians.
Theorems and rules
If and are differentiable at and are constants, then .
If and are differentiable at , then .
If are differentiable at and , then .
If is differentiable at and is differentiable at , then is differentiable at and
Suppose and exists. If then is a local minimum; if , a local maximum. If the test is inconclusive.
, and all have , yet is respectively a minimum, a maximum and an inflection. When , examine the sign of either side of .
Proofs of important results
Let with . By the binomial theorem,
Every term after the first contains a positive power of , so the limit as is .
∎Add and subtract in the numerator:
As , (differentiable functions are continuous) and the two difference quotients tend to and . Hence .
∎Define for and ; then is continuous at and for all (including ). Put , which tends to as :
Defining separately avoids the classic flaw of dividing by , which may be zero for some small .
∎Write . By the chain rule , so by the product rule
Step-by-step derivations
The derivative of from first principles
Using :
The two standard limits and hold in radians; the first follows from the squeeze obtained by comparing areas in the unit circle.
Therefore .
The derivative of
If then . Differentiating with respect to (chain rule): , so
The derivative of
Since , the chain rule gives .
The product rule
Let . If increases by , then and change by and , and
Divide by :
As , and , while . So the last term vanishes:
Think of as the area of a rectangle with sides and . Growing the sides by and adds two thin strips (areas and ) and a tiny corner square (). The corner is "second order small" and does not survive the limit. That is the whole product rule.
The chain rule
If and , then for small changes
Rates multiply. If changes 3 times as fast as , and changes 5 times as fast as , then changes 15 times as fast as .
This argument has a gap: might be for some small , so we cannot divide by it. The section Proving the rules properly below repairs this.
The quotient rule (from the other two)
Write . The chain rule gives , so by the product rule
You never need to memorise the quotient rule separately.
The derivative of
Everything rests on one limit. From the definition,
For with any base we would get . Numerically, that limit is about for and about for . The number is defined to be the base for which the limit equals exactly . That is why is the natural base: , with no awkward constant.
The derivative of
means . Differentiate with respect to :
The derivative of
, so by the chain rule
This explains the numbers above: and .
Powers with any real exponent
For , , so
This one line proves the power rule for every real : fractions, negatives, even .
The other trigonometric functions
- . Write and use the chain rule: .
- .
- .
- and , in the same way.
Inverse trigonometric functions
If then , so , giving
Similarly and .
Worked examples
Differentiate .
With , : and (chain rule). So
Find for the circle at .
Differentiate every term with respect to , treating as a function of :
Check: the radius to has gradient , and the tangent is perpendicular, so its gradient is .
For : , zero at . , so gives a minimum at and gives a maximum at .
Common mistakes
, not . Whenever the input to a standard function is anything other than plain , multiply by the derivative of that input.
. For example , whereas .
only in radians. In degrees, .
A stationary point need not be a maximum or minimum ( at ), and a maximum need not be stationary ( has a minimum at with no derivative there; endpoints of a closed interval can be extrema too).
Applications
- Kinematics: velocity and acceleration .
- Optimisation: maximise volume, minimise cost or time. Find stationary points, classify them, and check the endpoints.
- Related rates: if a balloon's volume grows at a known rate, gives the rate at which its radius grows.
- Approximation: underlies error estimates and Newton–Raphson.
- Economics: marginal cost and marginal revenue are derivatives.
Connections to other topics
- Integration reverses differentiation, by the Fundamental Theorem of Calculus.
- Taylor series extend the tangent-line approximation to higher-order polynomials.
- Differential equations relate a function to its own derivatives.
- Real analysis makes the limit rigorous, using – language and the Mean Value Theorem.
- Partial derivatives generalise the idea to functions of several variables.
Summary
- is the gradient of the tangent, i.e. the instantaneous rate of change.
- The linearity, product, quotient and chain rules reduce almost every derivative to the standard list.
- Implicit differentiation: differentiate both sides, then remember that .
- Stationary points satisfy . Classify them with , or with the sign of when .
- Differentiable implies continuous, but not conversely.
University-level ideas and the deeper mathematics behind this topic. Not needed for exams, but this is where the subject really opens up.
Limits made rigorous (university)
At A level, "" is treated intuitively. University analysis makes it precise. This matters because intuition about infinity and the infinitely small is famously unreliable. Berkeley mocked Newton's infinitesimals as "the ghosts of departed quantities", and it took nearly 150 years, until Cauchy and Weierstrass, to put calculus on solid ground.
means: for every there exists such that
Read it as a game. Your opponent names a tolerance , however tiny. You must find a distance such that every within of (except itself) gives within of . If you can always win, the limit is . Notice that itself plays no part: the function need not even be defined at .
We need to be small. The factor is the one we control. To stop getting large, first insist , so and . Then .
So given , choose . If :
The derivative as the best linear approximation
The definition can be rewritten without division:
So the tangent line approximates with an error that is small even compared with . No other straight line does this. This is the version that generalises to several variables, to vectors and to infinite-dimensional spaces. It is the one mathematicians really use.
is differentiable at if and only if there is a function , continuous at , with
Then .
If is differentiable, define for and . Continuity of at is exactly the statement that the difference quotient tends to . Conversely, if such a exists, then .
∎If is differentiable at , then is continuous at .
as .
∎The converse is false: is continuous at but has a corner there. Worse is possible, as the last section shows.
Proving the rules properly (university)
The informal chain-rule argument divided by , which can be zero. Take : it equals at infinitely many points near . Carathéodory's criterion avoids division altogether and gives short, watertight proofs.
If are differentiable at , so is , and .
Write and , with continuous at . Then
The bracket is continuous at (because is continuous there, being differentiable), so by Carathéodory
If is differentiable at and is differentiable at , then is differentiable at and
Write with continuous at , and with continuous at . Put :
Now is continuous at (a continuous function of a continuous function), so the product is continuous at . By Carathéodory the derivative is . Nothing was ever divided by .
∎Let be continuous and strictly monotonic on an interval, differentiable at with . Then is differentiable at and .
Write . For near : . Since is strictly monotonic, for , and . So
The inverse of a continuous strictly monotonic function is continuous, so is continuous at , with value .
∎Building eˣ and ln x from scratch (university)
At A level, is introduced as "the number whose exponential is its own derivative". It is not obvious that such a number exists, or that even makes sense for irrational . Analysis builds everything from a power series.
By the ratio test, this converges for every real (indeed complex) .
A power series with radius of convergence is differentiable on , and its derivative is , which has the same radius of convergence.
This is proved using uniform convergence. Applied to :
The key limit, proved
which tends to . So , the fact we assumed in the derivations above.
If on and , then .
First, (differentiate the product: , so it is constant, equal to its value at ). Hence is never zero. Let . Then , so is constant (by the Mean Value Theorem, next section), and . So .
∎Everything else follows
- The law of indices : fix and show has zero derivative.
- is strictly increasing and positive: .
- is defined as the inverse of , so the inverse function rule gives .
- Real powers are defined by . This is how gets a meaning.
- is defined as . Then , so the notation is consistent.
- The other classical definition: . Expanding binomially, the th term , so the limit is the series.
The series works for complex numbers too. Splitting into real and imaginary parts gives exactly the series for and , which is Euler's formula . The derivative rules for and then come for free from .
The Mean Value Theorem and its consequences (university)
A level uses facts like "if then is increasing" and "if everywhere then is constant" without proof. Both are consequences of one theorem, which is perhaps the most useful result in single-variable calculus.
A continuous function on a closed bounded interval attains a maximum and a minimum value.
This needs the completeness of the real numbers. It fails on : on has no maximum.
If has a local maximum or minimum at an interior point , and exists, then .
Suppose a local maximum. For small : , so , and letting gives . For small the quotient is (a non-positive number over a negative one), giving . So .
∎If is continuous on , differentiable on , and , then for some .
By the Extreme Value Theorem, attains a maximum and a minimum . If both occur at the endpoints, then , so is constant and everywhere. Otherwise one of them occurs at an interior point , and Fermat gives .
∎If is continuous on and differentiable on , then for some
Subtract the chord: . Then , so by Rolle , i.e. .
∎In words: somewhere, the instantaneous rate equals the average rate. If you drive 120 km in 1.5 hours, at some instant your speedometer read exactly 80 km/h. (This has been used in court to prove speeding from average-speed cameras.)
The consequences A level relies on
- on an interval is constant. For any , . This is why the "" in integration is the only freedom.
- on an interval is strictly increasing. For , . This justifies the first derivative test for stationary points.
- Bounds: if then . For example , and so .
- The converse fails: is strictly increasing but . So "" is sufficient for increasing, not necessary.
If are continuous on and differentiable on , then for some
Apply Rolle to . Expanding shows .
∎Suppose , and are differentiable near , near (except possibly at ), and . Then .
For , Cauchy's MVT on gives with
As , (it is squeezed between and ), so the right-hand side tends to . The case is identical.
∎Each step is a form. The answer says for small , the start of the Taylor series.
, but "differentiating top and bottom" gives . The rule needs both numerator and denominator to tend to (or both to ).
Taylor's theorem: the derivative's full story (university)
The tangent line uses and . Adding higher derivatives gives better and better polynomial approximations, and Taylor's theorem says exactly how good they are.
If is times differentiable on an interval containing and , then for some strictly between and ,
For this is exactly the Mean Value Theorem.
Fix and write for the Taylor polynomial. Choose the constant so that , and let
By construction of , , and by the choice of , .
Rolle on gives with . Rolle on (since ) gives with . Continue times to reach with . But and , so
With , , , , the remainder is with . So the error is less than . Indeed the sum is and , an error of .
The second derivative test, proved
Suppose , and is continuous with . Taylor with :
By continuity, for close to , so : a strict local minimum.
When , look at the first non-zero derivative . If is even, the point is a maximum or minimum (by the sign of ). If is odd, it is a point of inflection. This settles , and at at a stroke.
(), , has every derivative equal to at the origin. So its Maclaurin series is identically , yet for all . Infinitely differentiable ("smooth") does not imply analytic. Complex differentiable functions are completely different: there, one derivative forces infinitely many, and the Taylor series always converges to the function.
Derivatives in several variables (university)
Real problems have many inputs: temperature depends on position and time . Derivatives generalise in a beautiful way.
For , is the derivative with respect to with held constant. For : and .
. It points in the direction of steepest ascent, and its length is that steepest rate. The rate of change in the direction of a unit vector is .
The real definition: a linear map
In one variable, . For we ask for a linear map (an matrix) with
That matrix is the Jacobian, the matrix of partial derivatives . The derivative is no longer a number but a transformation, the best linear approximation.
The chain rule becomes matrix multiplication. The one-variable rule "rates multiply" is the case. The proof is the Carathéodory argument with matrices in place of numbers.
Let for , and . On both axes , so . But along the line , , so is not even continuous at the origin, let alone differentiable. Partial derivatives only look along two directions.
The fix (a standard theorem): if the partial derivatives exist and are continuous near a point, then is differentiable there.
Strange functions: where intuition fails (university)
Every function met at A level is differentiable except at a few isolated points. That is a very special situation.
For and an odd integer with , the function
is continuous everywhere and differentiable nowhere.
Why it is continuous: and converges, so the series converges uniformly (the Weierstrass -test). A uniform limit of continuous functions is continuous.
Why it is nowhere differentiable: each new term adds wiggles times faster, with amplitude reduced only by . The steepness of the th term grows like . Zoom in anywhere and you find more corners, never a straight line. The graph is a fractal.
Mathematicians of the time were appalled. Hermite wrote of turning away "with fear and horror from this lamentable plague of continuous functions which do not have derivatives". Then Banach (1931) showed, using the Baire category theorem, that in a precise sense most continuous functions are nowhere differentiable. The smooth functions of A level are the rare exceptions.
The path of a pollen grain jiggling in water (Brownian motion) is, with probability , continuous and nowhere differentiable. The grain has a position at every instant but no velocity at any instant. This is why the calculus of random processes, Itô calculus, needs new rules. In it, rather than , and it underpins modern financial mathematics.
Volterra (1881) built a function that is differentiable everywhere, with bounded, yet is not Riemann integrable. So fails for the Riemann integral. This was one of the motivations for Lebesgue's theory of integration.
Newton (fluxions, 1660s) and Leibniz (differentials, 1670s) invented calculus independently, and their notations survive as and . Their foundations were shaky, but the results were spectacular. Cauchy (1821) introduced limits, and Weierstrass (1860s) gave the ε–δ definitions used today. Robinson's non-standard analysis (1960s) finally made Leibniz's infinitesimals rigorous, using mathematical logic.
Why does this work?
, so , which tends to . For non-integer , use and the chain rule: .
If changes by a small when changes by , and changes by when changes by , then . Rates multiply, like gear ratios.
Beyond the syllabus
Mathematical curiosities
has derivative , which has no derivative at . And (with ) is differentiable everywhere, but its derivative is not continuous at .
Further exploration
Reading pathway: Calculus (Spivak) for a rigorous but friendly treatment.