BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

The derivative: slope of the tangent line and rate of change

The derivative of a function at a point is the slope of its tangent line there, found as the limit of the slopes of secant lines. Worked out from this definition, 1/x has derivative −1/x² and xⁿ has derivative nxⁿ⁻¹; read physically, the derivative is a rate of change, such as a velocity.

On this page · 8 sections
  1. The geometric problem: a tangent line
  2. From secant to derivative: the difference quotient
  3. Example: the derivative of 1/x
  4. A word problem: triangles under the hyperbola
  5. Notations
  6. Example: the derivative of xⁿ
  7. Rates of change: the physical meaning
  8. Summary

Calculus begins with one question: how fast is something changing? MIT's 18.01 opens its first unit, on differentiation, with two goals. The first, for this lecture, is to understand what a derivative is, from a geometric and a physical point of view. The second, for the next few weeks, is to be able to differentiate any function you can write down, even something as untidy as exarctan⁡xe^x \arctan x. Professor Jerison stresses why this matters so widely: derivatives are central to measurement of almost every kind, in science, engineering, economics and opinion polling alike.

The geometric problem: a tangent line#

Draw the graph of a function y=f(x)y = f(x) and pick a point PP on it, above x=x0x = x_0. Drawing the tangent line at PP by eye is easy. The task is to do it analytically: with a calculation that a machine could follow as well as a person.

From school algebra, any line through the point (x0,y0)(x_0, y_0) has the equation

A line through a point
y−y0=m (x−x0)y - y_0 = m\,(x - x_0)
In words

y minus y nought equals m the quantity x minus x nought

Source: 18.01 Lecture 1 transcript, transcript p. 2

To pin down the tangent line we need two things. The point is no problem: y0=f(x0)y_0 = f(x_0). The slope mm is the calculus part. It gets its own name, the derivative of ff at x0x_0, written f′(x0)f'(x_0): by definition, the slope of the tangent line to y=f(x)y = f(x) at PP.

But what is a tangent line? It is not simply a line that meets the graph at only one point: a wiggly curve can cross its own tangent line several times, and a vertical line meets the parabola y=x2y = x^2 only once without being its tangent. The right idea is a limit. Take a second point QQ on the graph and draw the line through PP and QQ, a secant line. Now slide QQ along the curve towards PP, keeping PP fixed. The secant lines swing round and settle on one line: the tangent line is the limit of the secant lines PQPQ as Q→PQ \to P.

The graph of y=1/xy = 1/x with the secant line through PP and QQ and the tangent line at PP, all computed from the formula. Move QQ towards PP: the secant line turns until it lies on the tangent line.

From secant to derivative: the difference quotient#

Put this into symbols. Let QQ lie a horizontal distance Δx\Delta x (the change in xx) to the right of PP. Then P=(x0,f(x0))P = (x_0, f(x_0)) and Q=(x0+Δx, f(x0+Δx))Q = (x_0 + \Delta x,\, f(x_0 + \Delta x)), and the rise from PP to QQ is Δf=f(x0+Δx)−f(x0)\Delta f = f(x_0 + \Delta x) - f(x_0), the change in ff. The slope of the secant is Δf/Δx\Delta f/\Delta x; letting Q→PQ \to P means letting Δx→0\Delta x \to 0. This gives the formula Jerison boxes as the most important of the day:

Definition of the derivative
f′(x0)=lim⁡Δx→0ΔfΔx=lim⁡Δx→0f(x0+Δx)−f(x0)Δxf'(x_0) = \lim_{\Delta x \to 0} \frac{\Delta f}{\Delta x} = \lim_{\Delta x \to 0} \frac{f(x_0 + \Delta x) - f(x_0)}{\Delta x}
In words

f prime ( x nought ) equals the limit as capital delta x goes to 0 of capital delta f over the quantity capital delta x, equals the limit as capital delta x goes to 0 of the quantity f of the quantity x nought plus capital delta x, minus f( x nought ), all over the quantity capital delta x

Source: 18.01 Lecture 1 notes, p. 2; boxed on the board, transcript p. 4

The fraction is called the difference quotient: its numerator is a difference of two values of ff, and its denominator, Δx=(x0+Δx)−x0\Delta x = (x_0 + \Delta x) - x_0, is a difference in disguise.

One warning from the notes: setting Δx=0\Delta x = 0 straight away always gives 0/00/0, which means nothing. The method is always to simplify first, to cancel the factor of Δx\Delta x hidden in the numerator, and only then let Δx→0\Delta x \to 0.

Worked example

The derivative of x2x^2 at x=3x = 3, from the definition

Find f′(3)f'(3) for f(x)=x2f(x) = x^2, using only the definition.

Difference quotient

f(3+Δx)−f(3)Δx=9+6Δx+(Δx)2−9Δx=6Δx+(Δx)2Δx\dfrac{f(3 + \Delta x) - f(3)}{\Delta x} = \dfrac{9 + 6\Delta x + (\Delta x)^2 - 9}{\Delta x} = \dfrac{6\Delta x + (\Delta x)^2}{\Delta x}.

Cancel, then take the limit

Dividing by Δx\Delta x leaves 6+Δx6 + \Delta x, and as Δx→0\Delta x \to 0 this tends to f′(3)=6f'(3) = 6.

See it in numbers

With Δx=0.1\Delta x = 0.1 the secant slope is 6.1; with Δx=0.01\Delta x = 0.01 it is 6.01; with Δx=0.001\Delta x = 0.001, 6.001. The secant slopes close in on the tangent slope, 6.

Example: the derivative of 1/x#

MIT's first example is f(x)=1/xf(x) = 1/x, whose graph is a hyperbola. The difference quotient is

Difference quotient of 1/x1/x
ΔfΔx=1Δx[1x0+Δx−1x0]=1Δx[x0−(x0+Δx)(x0+Δx) x0]=−1(x0+Δx) x0\frac{\Delta f}{\Delta x} = \frac{1}{\Delta x}\left[\frac{1}{x_0 + \Delta x} - \frac{1}{x_0}\right] = \frac{1}{\Delta x}\left[\frac{x_0 - (x_0 + \Delta x)}{(x_0 + \Delta x)\,x_0}\right] = \frac{-1}{(x_0 + \Delta x)\,x_0}
In words

capital delta f over the quantity capital delta x, equals 1 over the quantity capital delta x, times the quantity 1 over the quantity x nought plus capital delta x, minus 1 over x nought, equals 1 over the quantity capital delta x, times ( the quantity x nought minus the quantity x nought plus capital delta x, all over the quantity the quantity x nought plus capital delta x, x nought, ) equals minus 1 over the quantity the quantity x nought plus capital delta x, x nought

Source: 18.01 Lecture 1 notes, p. 2

Putting the two fractions over a common denominator makes the x0x_0's cancel in the numerator, leaving −Δx-\Delta x, and that Δx\Delta x cancels the one outside. Now the limit is easy: set Δx=0\Delta x = 0.

Derivative of 1/x1/x
f′(x0)=−1x02f'(x_0) = -\frac{1}{x_0^2}
In words

f prime ( x nought ) equals minus 1 over x nought squared

Source: 18.01 Lecture 1 notes, pp. 2–3

Two quick checks against the graph: the answer is negative, and the hyperbola does slope downwards; and as x0x_0 grows it gets smaller in size, as the curve flattens out to the right. In answer to a student's question, Jerison also put in a number: at x0=3x_0 = 3 the expression −1/((3+Δx)⋅3)-1/((3 + \Delta x)\cdot 3) tends to −1/9-1/9.

A word problem: triangles under the hyperbola#

Real problems mix a little calculus with a lot of other mathematics. Jerison's example: find the area of the triangle formed by the two axes and a tangent line to y=1/xy = 1/x (in the first quadrant).

Name the point of tangency (x0,y0)(x_0, y_0), with y0=1/x0y_0 = 1/x_0. The only calculus step is the tangent line itself:

Tangent line to y=1/xy = 1/x
y−y0=−1x02 (x−x0)y - y_0 = -\frac{1}{x_0^2}\,(x - x_0)
In words

y minus y nought equals minus 1 over x nought squared, times the quantity x minus x nought

Source: 18.01 Lecture 1 notes, p. 3

Everything else is algebra. The tangent meets the xx-axis where y=0y = 0: then −1/x0=−(x−x0)/x02-1/x_0 = -(x - x_0)/x_0^2, which gives x=2x0x = 2x_0. For the yy-intercept there is a shortcut by symmetry: y=1/xy = 1/x is the same equation as xy=1xy = 1 and as x=1/yx = 1/y, so swapping the roles of xx and yy turns any true statement about the graph into another true one, and the yy-intercept is 2y02y_0. (Putting x=0x = 0 into the tangent line gives the same.) The area is

Area of the triangle
Area=12 (2x0)(2y0)=2x0y0=2\text{Area} = \tfrac12\,(2x_0)(2y_0) = 2x_0y_0 = 2
In words

Area equals one half (2 x nought )(2 y nought ) equals 2 x nought y nought equals 2

Source: 18.01 Lecture 1 notes, p. 4

whatever point you choose: a curious property of this particular curve.

Jerison adds two remarks. The first is about what Jerison calls the hardest part of "one-variable" calculus: it is happy to juggle many variables at once, and this small problem already has four, xx, yy, x0x_0 and y0y_0.

The second is subtler: the letter yy itself was used in two roles. In the equation of the curve, y=1/xy = 1/x, it is the height of a point on the hyperbola; that is where y0=1/x0y_0 = 1/x_0 came from. In the tangent-line equation it is the height of a point on the tangent line, and putting y=0y = 0 there found where that line meets the axis. Putting y=0y = 0 into y=1/xy = 1/x instead would be a mistake. Such reuse of letters is everywhere, because it is convenient; so always keep track of which curve or line an equation describes.

Worked example

The triangle at x0=4x_0 = 4

Find the tangent line to y=1/xy = 1/x at x0=4x_0 = 4, where it meets the axes, and the area of the triangle it forms with them.

Point and slope

y0=1/4y_0 = 1/4 and f′(4)=−1/16f'(4) = -1/16, so the tangent line is y−14=−116(x−4)y - \tfrac14 = -\tfrac{1}{16}(x - 4).

Intercepts

Setting y=0y = 0: x=4+16×14=8=2x0x = 4 + 16 \times \tfrac14 = 8 = 2x_0. Setting x=0x = 0: y=14+416=12=2y0y = \tfrac14 + \tfrac{4}{16} = \tfrac12 = 2y_0.

Area

12×8×12=2\tfrac12 \times 8 \times \tfrac12 = 2, as promised.

Notations#

Calculus was developed by several people, and their notations all survive. With y=f(x)y = f(x), the change Δy\Delta y means the same as Δf\Delta f, and in the limit Δx→0\Delta x \to 0

Notations for the derivative
ΔyΔx→dydx    (Leibniz),ΔfΔx→f′(x0)    (Newton)\frac{\Delta y}{\Delta x} \to \frac{dy}{dx} \;\;\text{(Leibniz)}, \qquad \frac{\Delta f}{\Delta x} \to f'(x_0) \;\;\text{(Newton)}
In words

capital delta y over the quantity capital delta x, goes to d y over d x (Leibniz), capital delta f over the quantity capital delta x, goes to f prime ( x nought ) (Newton)

Source: 18.01 Lecture 1 notes, p. 5

Other forms in use are dfdx\dfrac{df}{dx}, ddxf\dfrac{d}{dx}f, ddxy\dfrac{d}{dx}y and DfDf. They are used interchangeably. Leibniz's dy/dxdy/dx has one drawback: it does not show the point x0x_0 where the derivative is taken, so that has to be filled in from the context.

Example: the derivative of xⁿ#

Now take f(x)=xnf(x) = x^n for n=1,2,3,…n = 1, 2, 3, \ldots To save writing, drop the subscript: xx is the fixed point and Δx\Delta x the change. The difference quotient needs (x+Δx)n(x + \Delta x)^n, the product of nn equal factors (x+Δx)(x + \Delta x). Multiplying out, the term xnx^n comes from choosing xx in every factor, and a term xn−1Δxx^{n-1}\Delta x comes from choosing Δx\Delta x in exactly one factor, which can happen in nn ways. Everything else contains Δx\Delta x at least twice. This is the start of the binomial theorem:

Binomial expansion, first terms
(x+Δx)n=xn+n xn−1 Δx+O((Δx)2)(x + \Delta x)^n = x^n + n\,x^{n-1}\,\Delta x + O\bigl((\Delta x)^2\bigr)
In words

the quantity x plus capital delta x, all to the power n equals x to the power n plus n x to the power n minus 1, end of power, capital delta x plus O (( capital delta x) squared )

Source: 18.01 Lecture 1 notes, p. 6

where O((Δx)2)O((\Delta x)^2) stands for all the terms with (Δx)2(\Delta x)^2, (Δx)3(\Delta x)^3 and so on: "junk", as Jerison calls it, because it will disappear. Subtract xnx^n and divide by Δx\Delta x:

Difference quotient of xⁿ
ΔfΔx=(x+Δx)n−xnΔx=n xn−1+O(Δx)\frac{\Delta f}{\Delta x} = \frac{(x + \Delta x)^n - x^n}{\Delta x} = n\,x^{n-1} + O(\Delta x)
In words

capital delta f over the quantity capital delta x, equals the quantity the quantity x plus capital delta x, all to the power n minus x to the power n, all over the quantity capital delta x, equals n x to the power n minus 1, end of power, plus O( capital delta x)

Source: 18.01 Lecture 1 notes, p. 6

As Δx→0\Delta x \to 0 the junk vanishes:

Power rule
ddx xn=n xn−1\frac{d}{dx}\,x^n = n\,x^{n-1}
In words

d over d x x to the power n equals n x to the power n minus 1, end of power

Source: 18.01 Lecture 1 notes, p. 6

The rule extends straight away to polynomials, term by term. For example, ddx(4x3+x6)=12x2+6x5\dfrac{d}{dx}\left(4x^3 + x^6\right) = 12x^2 + 6x^5. (Why one may differentiate a sum term by term, and pull out constant factors, comes in the next lectures.) For n=2n = 2 the rule gives 2x2x, which at x=3x = 3 is the 6 found above.

Rates of change: the physical meaning#

The same limit has a second meaning: the derivative is a rate of change. The lecture notes illustrate it with MIT's Halloween tradition of dropping pumpkins from the roof of a tall building. If y(t)y(t) is the height of a falling object at time tt, the difference quotient Δy/Δt\Delta y/\Delta t is its average velocity over the interval Δt\Delta t (its size is the distance travelled divided by the time taken: the average speed), and the derivative dy/dtdy/dt is its instantaneous velocity: how fast it is going at a single moment. The notes take the equation of motion near the Earth's surface as given for now; the physics course derives it.

Worked example

A dropped stone

A stone is dropped from a cliff 44.1 m high. Its height above the ground is y=44.1−4.9t2y = 44.1 - 4.9t^2 (metres, with tt in seconds). How long does it take to land, what is its average speed on the way down, and how fast is it going when it lands?

Time to land

The stone lands when y=0y = 0: 4.9t2=44.14.9t^2 = 44.1, so t2=9t^2 = 9 and t=3t = 3 s.

Average speed

It falls 44.1 m in 3 s: an average of 44.1/3=14.744.1/3 = 14.7 m/s.

Speed on landing

By the power rule, y′(t)=−9.8 ty'(t) = -9.8\,t, so at t=3t = 3 s, y′=−29.4y' = -29.4 m/s. The minus sign says the height is decreasing: the stone is moving down, at 29.4 m/s, twice its average speed, because it started from rest and sped up steadily.

Summary#

  • The derivative f′(x0)f'(x_0) is the slope of the tangent line to y=f(x)y = f(x) at x0x_0. The tangent line is the limit of secant lines PQPQ as Q→PQ \to P, so f′(x0)=lim⁡Δx→0(f(x0+Δx)−f(x0))/Δxf'(x_0) = \lim_{\Delta x \to 0} \bigl(f(x_0 + \Delta x) - f(x_0)\bigr)/\Delta x, the limit of the difference quotient.
  • Never put Δx=0\Delta x = 0 straight in (that gives 0/00/0): simplify and cancel first, then take the limit.
  • From the definition: ddx1x=−1x2\dfrac{d}{dx}\dfrac1x = -\dfrac{1}{x^2}, and ddxxn=nxn−1\dfrac{d}{dx}x^n = nx^{n-1} (from the binomial theorem), which extends to polynomials.
  • The tangent line at x0x_0 is y−y0=f′(x0)(x−x0)y - y_0 = f'(x_0)(x - x_0). Tangents to y=1/xy = 1/x always cut off a triangle of area 2 with the axes.
  • Notations: f′f' (Newton), df/dxdf/dx and dy/dxdy/dx (Leibniz), DfDf.
  • Physically, a derivative is a rate of change: Δy/Δt\Delta y/\Delta t is an average velocity, dy/dtdy/dt the instantaneous velocity.

Symbols on this page

Show the 25 symbols used here
Δ\Delta capital delta.
A change or difference in a quantity, e.g. Δx = x₂ − x₁. Say it: “capital delta”.
→\to arrow.
Goes to (tends to), or becomes. Say it: “goes to”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
lim⁡\lim limit.
Limit: the value approached as the variable written below approaches its target. Say it: “the limit”.
aa a.
The scale factor a(t): how much the universe has expanded (a = 1 today). Say it: “a”.
HH H.
The Hubble parameter H = ȧ/a: the expansion rate of the universe. Unit: 1/s (usually km/s/Mpc). Say it: “H”.
arctan⁡\arctan arctangent.
The inverse tangent: the angle whose tangent is the given number. Say it: “arc tangent”.
xx x.
The independent variable, the horizontal coordinate on the graph of y = f(x); in the section on xⁿ it also stands for the fixed point where the derivative is taken. Say it: “x”.
yy y.
The height of a point on the graph of y = f(x); in the tangent-line equation, the height of a point on the tangent line; in the dropped-stone example, the stone's height y(t). Say it: “y”.
tt t.
Time. Unit: s. Say it: “t”.
dd d.
As in dx or dy/dx: marks an infinitesimally small change of the quantity after it; d/dx means the derivative with respect to x. Say it: “d”.
nn n.
A positive whole number, the power in xⁿ. Say it: “n”.
ee e.
Euler's number, e ≈ 2.718, the base of the exponential function eˣ. Say it: “e”.
mm m.
The slope of a line; for the tangent line it is the derivative f′(x₀). Say it: “m”.
ff f.
A function; f(x) is its value at x. Say it: “f”.
PP P.
The point (x₀, f(x₀)) on the graph where the tangent line is drawn. Say it: “P”.
QQ Q.
A second point on the graph, (x₀ + Δx, f(x₀ + Δx)); the secant line runs through P and Q. Say it: “Q”.
DD D.
As in Df: another notation for the derivative of f. Say it: “capital D”.
OO big O.
Big O: O((Δx)²) stands for all the terms with (Δx)² or higher powers, which vanish in the limit Δx → 0. Say it: “big O”.
f′f' f prime.
The derivative of f; f′(x₀) is the slope of the tangent line at x₀. Say it: “f prime”.
y′y' y prime.
The derivative of the height y with respect to time: the stone's velocity, y′ = −9.8t. Unit: m/s. Say it: “y prime”.
x0x_{0} x nought.
The x coordinate of the point P where the derivative (the slope of the tangent line) is taken. Say it: “x nought”.
y0y_{0} y nought.
The y coordinate of the point P, y₀ = f(x₀). Say it: “y nought”.
a˙\dot{a} a dot.
The rate of change of a with time, ȧ = da/dt: how fast the scale factor grows. Say it: “a dot”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 29 words used here

New here

differentiation.
Finding a derivative: working out how fast a function changes.
analytic.
Worked out exactly with formulas and algebra, rather than by drawing pictures or by computer.
difference quotient.
The change in a function divided by the change in its input, the slope of a secant line: [f(x + Δx) − f(x)]/Δx.
symmetry.
A change, such as a reflection, a rotation or a shift, that leaves something looking exactly the same.
binomial theorem.
The formula for multiplying out a power of a sum, (a + b)ⁿ, as a sum of terms with known whole-number coefficients.

Also used

derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
tangent.
A straight line that touches a curve at a point and runs in the same direction as the curve there. Explained in Angles, radians and trigonometry.
parabola.
The U-shaped curve of y = ax² + bx + c, also the path of a thrown ball when air resistance is ignored. Explained in Quadratics and power laws.
limit.
The value a quantity gets closer and closer to, as near as we like, as its input approaches some value, without having to reach it. Explained in Rates of change and area under a graph.
secant.
A straight line through two points of a curve; its slope is the average rate of change between them. Explained in Rates of change and area under a graph.
hyperbola.
An open curve with two separate branches: the set of points whose distances from two fixed points differ by the same amount. Explained in Quadratics and power laws.
rate of change.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
average velocity.
The total change in position divided by the time it took, whatever happened in between. Explained in Rates of change and area under a graph.
interval.
A stretch between two values or two moments; in maths, all the numbers between two end points. Explained in Time dilation, length contraction and the interval.
instantaneous velocity.
The velocity at one moment: what the average velocity becomes when the time interval shrinks towards zero. Explained in Speed and velocity.
equation of motion.
The equation, usually from Newton's second law, that says how a system's position changes with time. Explained in The harmonic oscillator.
power rule.
The rule that the derivative of xⁿ is n xⁿ⁻¹; read backwards, it integrates powers of x.
scale factor.
The number a(t) that tells how much distances in the universe have stretched: when it doubles, every distance between galaxies doubles. Explained in Towards the universe: an expanding gas cools.
Hubble rate.
How fast the universe expands: the rate at which distances between galaxies grow, as a fraction of their size, per unit of time. Explained in Towards the universe: will an expanding ball of matter stop?.
with respect to.
Taking that variable as the one that changes: a derivative with respect to t measures change as t changes, others held fixed. Explained in Average value, weighted averages and probability.

Academic

by eye.
Judged just by looking, without measuring or calculating.
pin down.
To fix exactly, leaving no freedom or doubt.
by definition.
True simply because of what the words or symbols were set up to mean, not because of any further fact.
in disguise.
Looking different on the surface but really the same as something already known.
subtle.
Hard to notice or understand, though it matters; needing care.
notation.
A system of symbols used to write ideas down briefly, such as dy/dx for a derivative.
vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.
derive.
To obtain a result by reasoning or calculation from other known results.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

33 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Using the definition, what is the derivative of f(x)=x2f(x) = x^2 at x0=3x_0 = 3?
  2. What is the slope of the tangent line to y=1/xy = 1/x at x0=2x_0 = 2?
  3. Why can't you simply put Δx=0\Delta x = 0 into the difference quotient right away?
  4. What is ddx(2x5+x2)\dfrac{d}{dx}\left(2x^5 + x^2\right)?
0 of 4 answered

Flashcards

1 / 5