An option's payoff depends on where a price ends up, and the price could end up anywhere. To value it you add up every possible payoff, each weighted by how likely it is. With infinitely many possible prices, that sum becomes an integral.
What is the area under y = x² between 0 and 2? The edge is curved, so no school formula fits. But a thin rectangle is easy: height times width. Cut the region into strips, add up the rectangles, and make the strips thinner.
n = 4: area ≈ 1.75n = 16: area ≈ 2.4219n = 64: area ≈ 2.6045
With 4 strips the total is 1.75; with 64 it is 2.6045. The rectangles always miss a little sliver under the curve, but the slivers shrink as the strips thin, and the totals close in on one number, 8/3 = 2.6667. That limit is the integralThe definite integral ∫ₐᵇ f(x) dx: the signed area between the curve y = f(x) and the x-axis from x = a to x = b, defined as the limit of sums of thin strips.. Every integral on this page, and every one you will meet in option pricing, is this idea: add up something small over a range, and let the pieces shrink.
The rules
The definite integral. The limit of Riemann sumsA Riemann sum: the total of f(xᵢ)Δx over n strips of width Δx, with xᵢ a point in strip i., and its notation.
The fundamental theorem. Areas without strips, using an antiderivativeA function F whose derivative is f. For f(x) = x², F(x) = x³/3 (plus any constant) is one..
Probabilities are areas. A densityA probability density f: a curve with f(x) ≥ 0 and total area 1, such that P(a < X ≤ b) is the area under f from a to b. turns areas into probabilities, and its CDFThe cumulative distribution function F(x) = P(X ≤ x): the area under the density up to x. For the standard normal it is written Φ. is an integral.
Numerical integration. When no antiderivative can be written down, as for the normal density, the trapezium ruleThe trapezium rule: join neighbouring points of the curve with straight lines and add the trapezium areas. Error shrinks like h². and Simpson's ruleSimpson's rule: fit a parabola through each three neighbouring points and add the areas under them. Needs an even number of strips. Error shrinks like h⁴. add up shapes that hug the curve better than rectangles.
The formal version
∫abf(x)dx∫abf(x)dxP(a<X≤b)Tn∫abfdx−Tn=n→∞limi=1∑nf(xi)Δx,Δx=nb−a,xi∈[a+(i−1)Δx,a+iΔx]=F(b)−F(a)for any F with F′=f on [a,b]=∫abfX(x)dx,Φ(z)=∫−∞z2π1e−u2/2du,E[g(X)]=∫−∞∞g(x)fX(x)dx=h(21f0+f1+⋯+fn−1+21fn),Sn=3h(f0+4f1+2f2+⋯+4fn−1+fn)≤12(b−a)h2max∣f′′∣,∫abfdx−Sn≤180(b−a)h4max∣f(4)∣
f is continuous on [a, b]; h = (b − a)/n is the strip width and fk = f(a + kh); n is even for Simpson's rule; fX is the density of X. The error bounds hold when f has a continuous second (trapezium) or fourth (Simpson) derivative. Sources: Stewart, Clegg and Watson (2020); Press et al. (2007), chapter 4.
Try it
Pick a curve and a rule, then double the strips. Watch the last column of the table: when n doubles, the error of left rectangles falls about 2 times, the midpoint and trapezium errors about 4 times, and Simpson's about 16 times. On x² Simpson's rule is exact from the start, because a parabola fits a parabola perfectly.
The area here is the probability that a standard normal Z lands between −1 and 1.
n
Error
Ratio to the row above
2
−4.18e−2
4
−1.02e−2
4.1
8
−2.53e−3
4
16
−6.30e−4
4
32
−1.58e−4
4
64
−3.94e−5
4
Worked examples
1. The area under x² from 0 to 2
Step 1 of 4
1
Four strips
Width h = 0.5. The curve's heights at x = 0, 0.5, 1, 1.5, 2 are 0, 0.25, 1, 2.25, 4.
2. Normal probabilities as areas
Step 1 of 4
1
The set-up
P(−1 < Z ≤ 1) for a standard normal Z is the area under φ(z) = e−z²/2/√(2π) from −1 to 1. φ has no antiderivative in ordinary functions, so add strips. With four, h = 0.5 and the heights at −1, −0.5, 0, 0.5, 1 are 0.242, 0.3521, 0.3989, 0.3521, 0.242.
3. An expected payoff as an integral
Step 1 of 4
1
The set-up
A price starts at 100. After one year it is lognormal (M-C07: The lognormal distribution) with ln S ~ N(m, s²), m = ln 100 + (5% − ½ × 20%²) = 4.6352 and s = 0.2. The payoff is max(S − 100, 0). Its expectation adds each payoff times its density:
Common mistakes
Each line below is a tempting slip. Spot what is wrong, then check.
Reaction
Check what stuck
Question 1 · objective 2
Use the fundamental theorem to find the integral of 2x from x = 1 to x = 3.
Question 2 · objective 4
Estimate the integral of x² from 0 to 2 with the trapezium rule on a single strip (n = 1).
Question 3 · objective 3
A random variable X has density f(x) = 2x on 0 ≤ x ≤ 1 (and 0 elsewhere). What is P(X ≤ 0.5)?
Question 4 · objective 4
You halve the strip width in Simpson's rule for a smooth curve. Roughly what happens to the error?
Question 5 · objective 3
X has a continuous density. What is the probability that X equals exactly 1.3?
Glossary
Definite integral
The definite integral ∫ₐᵇ f(x) dx: the signed area between the curve y = f(x) and the x-axis from x = a to x = b, defined as the limit of sums of thin strips.
Riemann sum
A Riemann sum: the total of f(xᵢ)Δx over n strips of width Δx, with xᵢ a point in strip i.
Antiderivative
A function F whose derivative is f. For f(x) = x², F(x) = x³/3 (plus any constant) is one.
Fundamental theorem of calculus
The fundamental theorem of calculus: if F′ = f, then ∫ₐᵇ f(x) dx = F(b) − F(a). Integration undoes differentiation.
Probability density
A probability density f: a curve with f(x) ≥ 0 and total area 1, such that P(a < X ≤ b) is the area under f from a to b.
Cumulative distribution function (CDF)
The cumulative distribution function F(x) = P(X ≤ x): the area under the density up to x. For the standard normal it is written Φ.
Trapezium rule
The trapezium rule: join neighbouring points of the curve with straight lines and add the trapezium areas. Error shrinks like h².
Simpson's rule
Simpson's rule: fit a parabola through each three neighbouring points and add the areas under them. Needs an even number of strips. Error shrinks like h⁴.
Deep Dives & Origins
Deep Dives
M-C02: Expectation: expectation as a probability-weighted sum, the discrete version of the integral here. Introductory.
M-D06: Monte Carlo simulation: estimating the same integrals by averaging random draws, the method that wins in many dimensions. Intermediate.
Press et al., Numerical Recipes, chapter 4: Romberg and Gaussian quadrature, which beat Simpson's rule on smooth curves. Advanced.
Origins
James Stewart, Daniel K. Clegg and Saleem Watson, Calculus: Early Transcendentals, 9th edition, Cengage, 2020 (integrals, the fundamental theorem and approximate integration).
William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, Numerical Recipes: The Art of Scientific Computing, 3rd edition, Cambridge University Press, 2007 (chapter 4, integration of functions).