CONTENTS

Introduction to Integration

Motivation: why this matters in quant finance

Integration is the inverse of differentiation. Where differentiation asks "how fast is this quantity changing?", integration asks "what is the cumulative effect of all those changes?" In quantitative finance, this cumulative perspective appears everywhere:
  1. Expected values. The expected payoff of an option — the quantity you price — is an integral: E[f(ST)]=f(s)p(s)ds\mathbb{E}[f(S_T)] = \int f(s)\,p(s)\,ds where pp is the density of STS_T. The Black-Scholes formula is the result of evaluating this integral when STS_T is log-normally distributed.
  2. Present value of continuous cash flows. A bond paying a continuous coupon c(t)c(t) has present value PV=0Tc(t)er(t)tdt\text{PV} = \int_0^T c(t)\,e^{-r(t)\,t}\,dt. This is a Riemann integral of the discounted cash flow stream. See Discounting.
  3. Cumulative probabilities from densities. The CDF of the normal distribution, Φ(z)=zϕ(t)dt\Phi(z) = \int_{-\infty}^{z} \phi(t)\,dt, is an integral of the density. Every probability statement — "the option finishes in the money with probability Φ(d2)\Phi(d_2)" — is computed via integration.
  4. From differential equations to solutions. The Black-Scholes PDE and stochastic differential equations are solved by integration. The SDE dSt=μStdt+σStdWtdS_t = \mu S_t\,dt + \sigma S_t\,dW_t is shorthand for the integral equation ST=S0+0TμStdt+0TσStdWtS_T = S_0 + \int_0^T \mu S_t\,dt + \int_0^T \sigma S_t\,dW_t — where the second integral is an Itô integral, a stochastic generalisation of the Riemann integral covered in this section.
This page covers the classical Riemann integral — the deterministic foundation. The stochastic extensions build on it: the Riemann-Stieltjes integral generalises the integrator, and the Itô integral (in Itô's Lemma and Brownian motion) generalises further to stochastic integrators.

The Riemann integral: definition

Intuition: area under a curve

The definite integral abf(x)dx\int_a^b f(x)\,dx represents the signed area between the graph of ff and the xx-axis on the interval [a,b][a, b]. "Signed" means regions where f>0f > 0 contribute positive area and regions where f<0f < 0 contribute negative area.

Construction from Riemann sums

Partition the interval [a,b][a, b] into nn subintervals [xi1,xi][x_{i-1}, x_i] with a=x0<x1<<xn=ba = x_0 < x_1 < \cdots < x_n = b. Choose a sample point xi[xi1,xi]x_i^* \in [x_{i-1}, x_i] in each subinterval. The Riemann sum is:
Rn=i=1nf(xi)Δxi,Δxi=xixi1R_n = \sum_{i=1}^{n} f(x_i^*)\,\Delta x_i, \qquad \Delta x_i = x_i - x_{i-1}
Each term f(xi)Δxif(x_i^*)\Delta x_i is the area of a rectangle with height f(xi)f(x_i^*) and width Δxi\Delta x_i. The Riemann integral is the limit of these sums as the partition becomes infinitely fine:
abf(x)dx=limΔ0i=1nf(xi)Δxi\int_a^b f(x)\,dx = \lim_{\|\Delta\| \to 0} \sum_{i=1}^{n} f(x_i^*)\,\Delta x_i

where Δ=maxiΔxi\|\Delta\| = \max_i \Delta x_i is the mesh of the partition. The limit must exist and be independent of the choice of sample points xix_i^* and the specific partition.

When does the limit exist? A bounded function on [a,b][a, b] is Riemann integrable if and only if it is continuous almost everywhere (its set of discontinuities has measure zero). All continuous functions are integrable, as are functions with finitely many jump discontinuities — which covers essentially all functions encountered in quant finance.

Connection to stochastic integration

The Itô integral 0Tf(t)dWt\int_0^T f(t)\,dW_t is constructed by the same logic: approximate with sums f(ti)(Wti+1Wti)\sum f(t_i)(W_{t_{i+1}} - W_{t_i}), then take a limit. The crucial difference is that the integrator WtW_t is a Brownian motion path (nowhere differentiable, infinite variation) rather than a smooth variable xx. This forces the limit to be taken in L2L^2 rather than pointwise, and the choice of sample point (left endpoint vs midpoint) matters — left-endpoint gives Itô, midpoint gives Stratonovich. The Riemann integral is the clean deterministic case where none of these subtleties arise.

The Fundamental Theorem of Calculus

The Fundamental Theorem connects integration and differentiation and is, alongside Itô's Lemma, one of the two most important theorems in the calculus toolkit for quants.

Part I: differentiation undoes integration

If ff is continuous on [a,b][a, b] and F(x)=axf(t)dtF(x) = \int_a^x f(t)\,dt, then FF is differentiable and:

F(x)=f(x)F'(x) = f(x)

The derivative of the "running integral" recovers the original function. In finance: if V(t)=0tc(s)dsV(t) = \int_0^t c(s)\,ds is the cumulative cash flow received up to time tt, then V(t)=c(t)V'(t) = c(t) is the instantaneous cash flow rate.

Part II: integration undoes differentiation

If FF is any antiderivative of ff (i.e., F=fF' = f), then:

abf(x)dx=F(b)F(a)\int_a^b f(x)\,dx = F(b) - F(a)

This converts the problem of evaluating an integral (a limit of sums) into the much simpler problem of finding an antiderivative and evaluating it at two points.

Finance example: The present value of a continuous coupon stream cc paid at constant rate on [0,T][0, T], discounted at constant rate rr, is:
PV=0Tcertdt=c[1rert]0T=cr(1erT)\text{PV} = \int_0^T c\,e^{-rt}\,dt = c\left[-\frac{1}{r}e^{-rt}\right]_0^T = \frac{c}{r}\left(1 - e^{-rT}\right)

The antiderivative of certce^{-rt} is crert-\frac{c}{r}e^{-rt}, and the Fundamental Theorem turns the integral into a closed-form expression. As TT \to \infty, this converges to c/rc/r — the perpetuity formula.

Properties of the Riemann integral

Linearity

ab[af(x)+bg(x)]dx=aabf(x)dx+babg(x)dx\int_a^b [af(x) + bg(x)]\,dx = a\int_a^b f(x)\,dx + b\int_a^b g(x)\,dx
Linearity of integration corresponds to linearity of expectation: E[aX+bY]=aE[X]+bE[Y]\mathbb{E}[aX + bY] = a\mathbb{E}[X] + b\mathbb{E}[Y]. Both are consequences of the linearity of limits.

Additivity over intervals

acf(x)dx=abf(x)dx+bcf(x)dx\int_a^c f(x)\,dx = \int_a^b f(x)\,dx + \int_b^c f(x)\,dx

You can split an integral at any interior point. In finance, this is used to split a cash flow stream into sub-periods (e.g., before and after a coupon date).

Comparison / monotonicity

If f(x)g(x)f(x) \leq g(x) for all x[a,b]x \in [a, b], then abfdxabgdx\int_a^b f\,dx \leq \int_a^b g\,dx.

This is the integral version of the statement "a dominated payoff has a lower price" — if one option always pays less than another, its expected (and hence discounted) value is lower.

Triangle inequality

abf(x)dxabf(x)dx\left|\int_a^b f(x)\,dx\right| \leq \int_a^b |f(x)|\,dx

Mean Value Theorem for integrals

If ff is continuous on [a,b][a, b], there exists c(a,b)c \in (a, b) such that:

abf(x)dx=f(c)(ba)\int_a^b f(x)\,dx = f(c)(b - a)
The integral equals the function value at some interior point times the interval length. This is used in error analysis for numerical integration methods.

Integration techniques

Substitution (change of variables)

If u=g(x)u = g(x) is differentiable with gg' continuous:

abf(g(x))g(x)dx=g(a)g(b)f(u)du\int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du
This is the integral counterpart of the chain rule. A full treatment, including the probabilistic version (change of measure), is in Change of Variables.

Integration by parts

abudv=[uv]ababvdu\int_a^b u\,dv = [uv]_a^b - \int_a^b v\,du
This is the integral counterpart of the product rule. It is used constantly in deriving option pricing formulas and in the theory of distributions. A full treatment, including the stochastic version, is in Integration by Parts.

Improper integrals

When the interval is infinite or the integrand is unbounded, the integral is defined as a limit:
0f(x)dx=limb0bf(x)dx\int_0^{\infty} f(x)\,dx = \lim_{b \to \infty} \int_0^b f(x)\,dx 011xdx=limε0+ε11xdx\int_0^1 \frac{1}{\sqrt{x}}\,dx = \lim_{\varepsilon \to 0^+} \int_\varepsilon^1 \frac{1}{\sqrt{x}}\,dx

Both types are common in quant finance:

Infinite limits: The normal distribution CDF Φ(z)=zϕ(t)dt\Phi(z) = \int_{-\infty}^{z} \phi(t)\,dt integrates over the entire real line. The expected value of any continuous random variable is an improper integral E[X]=xf(x)dx\mathbb{E}[X] = \int_{-\infty}^{\infty} x\,f(x)\,dx.
Unbounded integrands: Some option pricing integrals have integrands that blow up near the strike (e.g., the digital option's delta near expiry). These require careful treatment as improper integrals.
An improper integral converges if the limit exists and is finite; otherwise it diverges. The Gaussian integral ex2/2dx=2π\int_{-\infty}^{\infty} e^{-x^2/2}\,dx = \sqrt{2\pi} is the fundamental convergent improper integral — it normalises the normal density.

Examples and applications

Example 1: expected payoff of a European call

The price of a European call is:

C=erTK(sK)fST(s)dsC = e^{-rT}\int_K^{\infty} (s - K)\,f_{S_T}(s)\,ds
where fSTf_{S_T} is the risk-neutral density of STS_T. Under GBM, STS_T is log-normal, and this integral can be evaluated in closed form by substituting s=S0e(rσ2/2)T+σTzs = S_0 e^{(r - \sigma^2/2)T + \sigma\sqrt{T}z} and completing the square. The result is the Black-Scholes formula C=S0Φ(d1)KerTΦ(d2)C = S_0\Phi(d_1) - Ke^{-rT}\Phi(d_2).

Example 2: present value of a continuous coupon bond

A bond paying continuous coupon rate cc with face value FF and maturity TT, discounted at constant rate rr:

P=0Tcertdt+FerT=cr(1erT)+FerTP = \int_0^T c\,e^{-rt}\,dt + F\,e^{-rT} = \frac{c}{r}(1 - e^{-rT}) + F\,e^{-rT}

This is the continuous-time analogue of the discrete bond pricing formula P=i=1nc(1+r)ti+F(1+r)TP = \sum_{i=1}^{n} \frac{c}{(1+r)^{t_i}} + \frac{F}{(1+r)^T}.

Example 3: cumulative distribution from density

The probability that a standard normal variable falls below 1.96:

Φ(1.96)=1.9612πet2/2dt0.975\Phi(1.96) = \int_{-\infty}^{1.96} \frac{1}{\sqrt{2\pi}}e^{-t^2/2}\,dt \approx 0.975
There is no closed-form antiderivative for et2/2e^{-t^2/2}, so this integral must be computed numerically — see Numerical Integration.

Common confusions and pitfalls

Confusing the integral with the antiderivative. The definite integral abfdx\int_a^b f\,dx is a number. The indefinite integral fdx=F(x)+C\int f\,dx = F(x) + C is a family of functions. The Fundamental Theorem connects them, but they are different objects.
Forgetting the limits of integration when changing variables. Under the substitution u=g(x)u = g(x), the limits change from [a,b][a, b] to [g(a),g(b)][g(a), g(b)]. Forgetting to update the limits is one of the most common integration errors and appears frequently when transforming between log-price and price integrals in option pricing.
Assuming every function has a closed-form antiderivative. Most functions do not. The Gaussian integral ex2dx\int e^{-x^2}\,dx has no elementary antiderivative, which is why Φ(z)\Phi(z) must be computed numerically. In practice, most option pricing integrals beyond Black-Scholes require numerical methods.
Treating the Itô integral as a Riemann integral. The stochastic integral 0Tf(t)dWt\int_0^T f(t)\,dW_t looks like a Riemann-Stieltjes integral, but it cannot be defined pathwise because Brownian motion has infinite total variation. The Itô integral is an L2L^2 limit with different properties (e.g., it is a martingale, its expectation is zero). The Riemann-Stieltjes integral page explains where classical integration breaks down and why Itô's construction is needed.

Where this goes next

This introduction covers the Riemann integral — the simplest and most classical form of integration. The remaining pages in this section build toward the stochastic integral:

  1. Riemann-Stieltjes Integral: Generalises from fdx\int f\,dx to fdg\int f\,dg for a general integrator gg. This is the bridge to stochastic integration and to expected values written as fdF\int f\,dF.
  2. Integration by Parts: The integral counterpart of the product rule, with a stochastic extension that adds a covariation term.
  3. Change of Variables: The integral counterpart of the chain rule, with extensions to change of measure in probability — the foundation of risk-neutral pricing.
  4. Numerical Integration: Practical methods for computing integrals that have no closed form, including Monte Carlo simulation.

References

  • Stewart, J. (2008). Single Variable Calculus: Early Transcendentals (6th ed.). Thomson Brooks/Cole. Ch. 5 Sections 5.1-5.2 (areas, distances, and the definite integral) for Riemann sums and definite integrals.
Introduction to Integration (The Riemann Integral) | q4quant.studio