Skip to main content

Derivatives

The derivative measures how fast a quantity is changing at a single instant. If you know the position of a car at every moment, the derivative tells you its speed at any chosen moment. If you know a company's revenue as a function of price, the derivative tells you how revenue responds to a tiny price change. Formally, the derivative is the slope of the tangent line to a curve at a point — but the intuition worth holding onto is simpler: the derivative is instantaneous rate of change.

Learning Objectives

By the end of this page, you should be able to:

  • Explain the derivative both as a slope and as an instantaneous rate of change
  • State the limit definition of the derivative and explain what it captures
  • Apply the power, constant, sum, product, quotient, and chain rules
  • Interpret the sign of a derivative (increasing, decreasing, stationary)
  • Use derivatives to solve real problems in motion and optimization

Quick Answer

The derivative of a function f(x)f(x), written f(x)f'(x) or dydx\frac{dy}{dx}, is defined as

f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}

That fraction is just "rise over run" — the slope between two nearby points on the curve. As hh shrinks to zero, the two points merge into one and you get the slope at a single point: the instantaneous rate of change. In practice you rarely use the limit directly; you use shortcut rules (the most important being the power rule: the derivative of xnx^n is nxn1nx^{n-1}).

The Core Problem It Solves

Imagine a car whose distance travelled is s(t)=t2s(t) = t^2 metres after tt seconds. Its average speed between t=2t = 2 and t=3t = 3 is easy: (94)/(32)=5(9 - 4)/(3 - 2) = 5 m/s. But what was its speed at exactly t=2t = 2? Average speed needs a time interval, and a single instant has no interval — the naive calculation gives 0/0 0/0, which is meaningless.

The derivative resolves this paradox. Compute the average speed over a shrinking interval [2,2+h][2, 2+h] and watch what it approaches as h0h \to 0:

(2+h)222h=4+4h+h24h=4h+h2h=4+hh04\frac{(2+h)^2 - 2^2}{h} = \frac{4 + 4h + h^2 - 4}{h} = \frac{4h + h^2}{h} = 4 + h \xrightarrow{h \to 0} 4

The instantaneous speed at t=2t = 2 is exactly 4 m/s. That is a derivative. The whole subject of differential calculus exists to answer the question "what is the rate right now?"

Where It Came From

The derivative was forged from two problems that obsessed 17th-century mathematicians: the tangent-line problem (how do you find the slope of a curve at a point?) and the problem of motion (how do you describe a speed that is constantly changing?).

Before Newton and Leibniz, mathematicians could find slopes only of straight lines. Curves defeated them, because slope requires two points and a curve's steepness differs at every point. Pierre de Fermat in the 1630s came remarkably close, computing tangents by a method that quietly used the idea of an infinitesimally small change. But it was Isaac Newton (who called derivatives "fluxions" and was driven by the physics of falling bodies and orbiting planets) and Gottfried Leibniz (who gave us the clean dydx\frac{dy}{dx} notation, deliberately chosen to look like a ratio of tiny changes) who, in the 1670s–80s, turned these scattered tricks into a general, rule-based method.

For over a century the logical foundation was shaky — Newton's "vanishing quantities" were mocked by the philosopher Bishop Berkeley as "ghosts of departed quantities," because dividing by a quantity and then setting it to zero looked like cheating. The paradox was only fully resolved in the 1800s when Cauchy and Weierstrass built the rigorous limit that underpins the modern definition above. So the derivative is a rare case where the technique worked brilliantly for 150 years before anyone could fully justify why — the need (describing motion and change) was so pressing that mathematicians used the tool long before they could prove it sound.

The Differentiation Rules

You almost never use the limit definition in practice. Instead, a handful of rules cover most functions:

RuleStatementExample
Constantddx(c)=0\frac{d}{dx}(c) = 0derivative of 7 7 is 0 0
Powerddx(xn)=nxn1\frac{d}{dx}(x^n) = n x^{n-1}derivative of x3x^3 is 3x2 3x^2
Constant multipleddx(cf)=cf\frac{d}{dx}(c\,f) = c\,f'derivative of 5x2 5x^2 is 10x 10x
Sumddx(f+g)=f+g\frac{d}{dx}(f + g) = f' + g'differentiate term by term
Productddx(fg)=fg+fg\frac{d}{dx}(fg) = f'g + fg'for products that don't simplify
Quotientddx ⁣(fg)=fgfgg2\frac{d}{dx}\!\left(\frac{f}{g}\right) = \frac{f'g - fg'}{g^2}for ratios
Chainddxf(g(x))=f(g(x))g(x)\frac{d}{dx}f(g(x)) = f'(g(x))\cdot g'(x)for functions inside functions

Worked example. Differentiate f(x)=3x42x2+7f(x) = 3x^4 - 2x^2 + 7.

Apply the power rule term by term: f(x)=12x34x+0=12x34xf'(x) = 12x^3 - 4x + 0 = 12x^3 - 4x.

Chain rule example. Differentiate (2x+1)5(2x + 1)^5. The "outside" is (something)5^5, the "inside" is 2x+1 2x+1:

5(2x+1)42=10(2x+1)45(2x+1)^4 \cdot 2 = 10(2x+1)^4

Reading the Sign of a Derivative

The derivative's sign tells you what the function is doing:

  • f(x)>0f'(x) > 0 → the function is increasing (sloping up)
  • f(x)<0f'(x) < 0 → the function is decreasing (sloping down)
  • f(x)=0f'(x) = 0 → a stationary point — a peak, valley, or plateau

This is why derivatives are the engine of optimization: maxima and minima occur where the slope is zero, so to find the best price, the shortest time, or the largest area, you set the derivative to zero and solve.

Real-World Applications

  • Physics: velocity is the derivative of position; acceleration is the derivative of velocity. Every equation of motion is a statement about derivatives.
  • Economics: "marginal cost" and "marginal revenue" are literally derivatives — the rate of change of cost or revenue as output rises by one unit. Firms maximize profit where marginal revenue equals marginal cost, i.e. where a derivative condition holds.
  • Medicine: the rate at which a drug's concentration in the blood changes is a derivative, used to set safe dosing intervals.
  • Machine learning: training a neural network means using derivatives (gradients) to nudge millions of parameters in the direction that reduces error — the "gradient descent" algorithm is calculus at industrial scale.

Common Mistakes

Mistake 1: Power rule sign/arithmetic. The derivative of x2x^{-2} is 2x3-2x^{-3}, not 2x1-2x^{-1}. Subtract one from the exponent: 21=3-2 - 1 = -3.

Mistake 2: Forgetting the chain rule. The derivative of sin(3x)\sin(3x) is 3cos(3x) 3\cos(3x), not cos(3x)\cos(3x) — you must multiply by the derivative of the inside, 3 3. Whenever a function sits inside another function, the chain rule applies.

Mistake 3: Treating a product like a sum. ddx(x2sinx)\frac{d}{dx}(x^2 \sin x) is not 2xcosx 2x \cos x. Products need the product rule: 2xsinx+x2cosx 2x \sin x + x^2 \cos x.

Mistake 4: Confusing the derivative with the original function's value. f(2)f'(2) is the slope at x=2x = 2, not the height f(2)f(2). A function can be high in value yet have zero slope, or low in value yet steeply rising.

Comparison: Derivative vs. Average Rate of Change

Average rate of changeDerivative (instantaneous)
NeedsTwo points, an intervalA single point
Formulaf(b)f(a)ba\frac{f(b) - f(a)}{b - a}limh0f(x+h)f(x)h\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
Geometric meaningSlope of a secant lineSlope of the tangent line
AnalogyAverage trip speedSpeedometer reading

Practice Questions

Recall. State the power rule and use it to differentiate x5x^5.

Understanding. Explain, using the idea of a shrinking interval, why the derivative can find an instantaneous speed when a single instant has no time interval.

Application. A ball's height is h(t)=20t5t2h(t) = 20t - 5t^2 metres. Find its velocity h(t)h'(t), and determine when the ball is momentarily at rest. (Answer: h(t)=2010th'(t) = 20 - 10t; the ball is at rest when h(t)=0h'(t) = 0, i.e. at t=2t = 2 s — the top of its flight.)

Analysis. Two functions have the same value at x=3x = 3 but different derivatives there. What does that tell you about their graphs at that point? (They pass through the same point but with different slopes — one is rising or falling faster than the other.)

FAQ

What's the difference between f(x)f'(x) and dydx\frac{dy}{dx}? Nothing — they're two notations for the same thing. f(x)f'(x) (Newton/Lagrange style) is compact; dydx\frac{dy}{dx} (Leibniz style) reminds you it's a ratio of changes and is handy for the chain rule.

Why do we need limits to define derivatives? Because you're dividing a change in output by a change in input, then letting that input change shrink to zero. Without limits, "zero divided by zero" is undefined; the limit gives it precise meaning.

Is every function differentiable? No. A function must be smooth (no sharp corners, jumps, or breaks) at a point to have a derivative there. The graph of x|x| has no derivative at x=0x = 0 because of its sharp corner.

What does a second derivative tell me? It's the derivative of the derivative — the rate of change of the rate of change. In motion, it's acceleration; on a graph, it tells you whether the curve bends upward (concave up) or downward.

How is this used in real jobs? Anywhere quantities change over time or respond to inputs: engineering design, financial modelling, drug dosing, weather prediction, and the training of essentially every modern AI system.

Quick Revision

  • Derivative = instantaneous rate of change = slope of the tangent line.
  • Definition: f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}.
  • Power rule: ddxxn=nxn1\frac{d}{dx}x^n = nx^{n-1}.
  • Chain rule: derivative of the outside × derivative of the inside.
  • Sign: f>0f' > 0 rising, f<0f' < 0 falling, f=0f' = 0 stationary (max/min).

Prerequisites: Limits, Algebra (functions), and Quadratic Equations.

Related: integrals — the inverse operation.

Next: applications of derivatives (optimization, related rates) and then integration.