CONTENTS

Integration by Parts

Motivation: why this matters in quant finance

Integration by parts is the integral counterpart of the product rule. Where the product rule tells you how to differentiate fgf \cdot g, integration by parts tells you how to integrate fdgf\,dg by transferring the "work" from one factor to the other. In quant finance, this transfer appears in three critical contexts:
  1. Deriving and manipulating option pricing formulas. The Black-Scholes call price involves terms like sϕ(z)dz\int s\,\phi(z)\,dz (integrating a price times a normal density). Integration by parts simplifies these integrals by moving the derivative from one factor to another, and it is the technique that produces the clean Φ(d1)\Phi(d_1) and Φ(d2)\Phi(d_2) terms in the Black-Scholes formula.
  2. Relating option prices to their Greeks. The "Breeden-Litzenberger" result — that the risk-neutral density is proportional to 2C/K2\partial^2 C / \partial K^2 — is derived by applying integration by parts twice to the call pricing integral. This connects the observed option surface to the implied distribution of the underlying.
  3. The stochastic (Itô) product rule. In stochastic calculus, the analogue of integration by parts for Itô processes is:
0TXtdYt=[XTYTX0Y0]0TYtdXtX,YT\int_0^T X_t\,dY_t = [X_T Y_T - X_0 Y_0] - \int_0^T Y_t\,dX_t - \langle X, Y \rangle_T
The extra term X,YT\langle X, Y \rangle_T — the covariation (or cross-variation) — has no classical analogue. It arises because the product rule in Itô calculus includes dXdYdX\,dY, and integrating that term produces the covariation. Understanding the deterministic formula first makes the stochastic extension natural.

The deterministic formula

Statement

Let uu and vv be differentiable functions on [a,b][a, b] with continuous derivatives. Then:
abudv=[uv]ababvdu\boxed{\int_a^b u\,dv = [uv]_a^b - \int_a^b v\,du}

Or equivalently, using dv=v(x)dxdv = v'(x)\,dx and du=u(x)dxdu = u'(x)\,dx:

abu(x)v(x)dx=u(b)v(b)u(a)v(a)abv(x)u(x)dx\int_a^b u(x)\,v'(x)\,dx = u(b)v(b) - u(a)v(a) - \int_a^b v(x)\,u'(x)\,dx
Intuition: The product uvuv changes because uu changes (while vv stays fixed) and vv changes (while uu stays fixed). The total change is [uv]ab[uv]_a^b, which splits into udv\int u\,dv (the part where vv changes) and vdu\int v\,du (the part where uu changes). Rearranging gives the formula.

Derivation from the product rule

The product rule states:
ddx[u(x)v(x)]=u(x)v(x)+u(x)v(x)\frac{d}{dx}[u(x)v(x)] = u'(x)v(x) + u(x)v'(x)
Integrate both sides from aa to bb and apply the Fundamental Theorem:
u(b)v(b)u(a)v(a)=abuvdx+abuvdxu(b)v(b) - u(a)v(a) = \int_a^b u'\,v\,dx + \int_a^b u\,v'\,dx

Rearranging:

abuvdx=[uv]ababvudx\int_a^b u\,v'\,dx = [uv]_a^b - \int_a^b v\,u'\,dx

The indefinite version

udv=uvvdu\int u\,dv = uv - \int v\,du

This is used when finding antiderivatives: you choose uu and dvdv from the integrand so that vdu\int v\,du is simpler than the original integral.

Strategy: choosing uu and dvdv

The art of integration by parts is choosing the right split. The LIATE rule is a common heuristic — choose uu from the first available category:
  1. Logarithmic (lnx\ln x)
  2. Inverse trigonometric (arctanx\arctan x, etc.)
  3. Algebraic (xnx^n, polynomials)
  4. Trigonometric (sinx\sin x, cosx\cos x)
  5. Exponential (exe^x)

and let dvdv be everything else. The idea is that differentiating uu should simplify it (log and algebraic functions get simpler when differentiated), while integrating dvdv should not make it worse.

In quant finance, the most common pattern is: uu is a polynomial or algebraic function (price, payoff) and dvdv is an exponential or Gaussian density term.

The Riemann-Stieltjes version

For the Riemann-Stieltjes integral, integration by parts takes the form:
abfdg=[fg]ababgdf\int_a^b f\,dg = [fg]_a^b - \int_a^b g\,df

This holds whenever both integrals exist and ff and gg have no common discontinuities. The formula is the same shape as the smooth version, but it applies to step functions, CDFs, and other non-differentiable integrators.

Finance application: Consider E[(XK)+]=K(xK)dF(x)\mathbb{E}[(X - K)^+] = \int_K^{\infty}(x - K)\,dF(x), the expected payoff of a call with strike KK. Apply Stieltjes integration by parts with f(x)=xKf(x) = x - K and g(x)=F(x)g(x) = F(x):
K(xK)dF(x)=[(xK)F(x)]KKF(x)dx\int_K^{\infty}(x-K)\,dF(x) = [(x-K)F(x)]_K^{\infty} - \int_K^{\infty}F(x)\,dx

If (xK)F(x)0(x-K)F(x) \to 0 appropriately (which requires finite mean), and using F()=1F(\infty) = 1:

E[(XK)+]=K[1F(x)]dx\mathbb{E}[(X-K)^+] = \int_K^{\infty}[1 - F(x)]\,dx

This representation expresses the call payoff expectation in terms of the survival function 1F(x)1 - F(x). It is model-free and is used in variance swap pricing, the Carr-Madan formula, and static replication arguments.

The stochastic (Itô) version

Statement

For Itô processes XtX_t and YtY_t on [0,T][0, T]:

0TXtdYt=XTYTX0Y00TYtdXtX,YT\int_0^T X_t\,dY_t = X_T Y_T - X_0 Y_0 - \int_0^T Y_t\,dX_t - \langle X, Y \rangle_T
where X,YT\langle X, Y \rangle_T is the quadratic covariation (cross-variation) of XX and YY:
X,YT=limni(Xti+1Xti)(Yti+1Yti)\langle X, Y \rangle_T = \lim_{n \to \infty} \sum_{i} (X_{t_{i+1}} - X_{t_i})(Y_{t_{i+1}} - Y_{t_i})
Equivalently, rearranging to match the Itô product rule from the product rule page:
d(XtYt)=XtdYt+YtdXt+dXtdYtd(X_t Y_t) = X_t\,dY_t + Y_t\,dX_t + dX_t\,dY_t

Integrating both sides from 00 to TT and rearranging gives the formula above.

Why the extra term?

In the deterministic case, the cross term ΔfΔg=O(Δx2)\Delta f \cdot \Delta g = O(\Delta x^2) vanishes as the partition refines. In the stochastic case, if both XX and YY have Brownian motion components, the cross term ΔXΔY\Delta X \cdot \Delta Y is O(Δt)O(\Delta t) (because (ΔW)2=O(Δt)(\Delta W)^2 = O(\Delta t)) and does not vanish. Its accumulation over [0,T][0, T] is the covariation X,YT\langle X, Y \rangle_T.
Special cases:
  • If dX=a1dt+b1dWdX = a_1\,dt + b_1\,dW and dY=a2dt+b2dWdY = a_2\,dt + b_2\,dW (same Brownian motion), then dX,Y=b1b2dtd\langle X, Y \rangle = b_1 b_2\,dt and X,YT=0Tb1b2dt\langle X, Y \rangle_T = \int_0^T b_1 b_2\,dt.
  • If XX and YY are driven by independent Brownian motions, X,Y=0\langle X, Y \rangle = 0 and the stochastic formula reduces to the deterministic one.
  • If XtX_t is deterministic (no Brownian component), X,Y=0\langle X, Y \rangle = 0 — the classical formula is recovered.

Examples and applications

Example 1: xex2/2dx\int x\,e^{-x^2/2}\,dx (Gaussian integral by parts)

This integral appears when computing E[Z]\mathbb{E}[Z] for a standard normal ZZ, or when deriving moments of the normal distribution.

Let u=xu = x (so du=dxdu = dx) and dv=ex2/2dxdv = e^{-x^2/2}\,dx (so... vv is related to the error function, which doesn't simplify things). Instead, reverse the assignment: let u=1u = 1 and recognise that xex2/2=ddxex2/2x\,e^{-x^2/2} = -\frac{d}{dx}e^{-x^2/2}. Then:

xex2/2dx=[ex2/2]=0\int_{-\infty}^{\infty} x\,e^{-x^2/2}\,dx = \left[-e^{-x^2/2}\right]_{-\infty}^{\infty} = 0

confirming E[Z]=0\mathbb{E}[Z] = 0 for ZN(0,1)Z \sim \mathcal{N}(0,1).

For the second moment, compute x2ex2/2dx\int_{-\infty}^{\infty} x^2 e^{-x^2/2}\,dx. Let u=xu = x and dv=xex2/2dxdv = xe^{-x^2/2}\,dx (so v=ex2/2v = -e^{-x^2/2}):

x2ex2/2dx=[xex2/2]+ex2/2dx=0+2π\int x^2 e^{-x^2/2}\,dx = \left[-xe^{-x^2/2}\right]_{-\infty}^{\infty} + \int_{-\infty}^{\infty} e^{-x^2/2}\,dx = 0 + \sqrt{2\pi}

Dividing by 2π\sqrt{2\pi} confirms E[Z2]=1\mathbb{E}[Z^2] = 1, i.e., Var(Z)=1\text{Var}(Z) = 1.

Example 2: Breeden-Litzenberger (extracting the risk-neutral density)

The price of a European call is:

C(K)=erTK(sK)q(s)dsC(K) = e^{-rT}\int_K^{\infty}(s - K)\,q(s)\,ds

where q(s)q(s) is the risk-neutral density of STS_T. Differentiate with respect to KK:

CK=erTKq(s)ds=erT[1F(K)]=erTQ(ST>K)\frac{\partial C}{\partial K} = -e^{-rT}\int_K^{\infty} q(s)\,ds = -e^{-rT}[1 - F(K)] = -e^{-rT}\mathbb{Q}(S_T > K)

Differentiate again:

2CK2=erTq(K)\frac{\partial^2 C}{\partial K^2} = e^{-rT}\,q(K)

So the risk-neutral density is:

q(K)=erT2CK2q(K) = e^{rT}\frac{\partial^2 C}{\partial K^2}
The first differentiation is equivalent to integration by parts on the call pricing integral. This result — that the second derivative of the call price with respect to strike recovers the risk-neutral density — is the Breeden-Litzenberger formula and is one of the most important results in empirical option pricing. It means that a continuum of call prices across strikes implicitly encodes the entire risk-neutral distribution.

Example 3: Itô integration by parts for the discounted stock

Let Xt=ertX_t = e^{-rt} (deterministic discount factor) and Yt=StY_t = S_t (stock price under GBM). Since XtX_t is deterministic, X,Y=0\langle X, Y \rangle = 0, and Itô integration by parts gives:
0TertdSt=erTSTS00TStd(ert)\int_0^T e^{-rt}\,dS_t = e^{-rT}S_T - S_0 - \int_0^T S_t\,d(e^{-rt})

Since d(ert)=rertdtd(e^{-rt}) = -re^{-rt}\,dt:

0TertdSt=erTSTS0+r0TStertdt\int_0^T e^{-rt}\,dS_t = e^{-rT}S_T - S_0 + r\int_0^T S_t e^{-rt}\,dt
This decomposes the discounted gains from holding stock into the terminal discounted value, the initial investment, and the "financing cost" of carrying the position. Under the risk-neutral measure Q\mathbb{Q} (where the discounted stock is a martingale), the expectation of the left side is zero, giving EQ[erTST]=S0rEQ[0TStertdt]\mathbb{E}^{\mathbb{Q}}[e^{-rT}S_T] = S_0 - r\mathbb{E}^{\mathbb{Q}}[\int_0^T S_t e^{-rt}\,dt], which is the continuous-time cost-of-carry relation.

Example 4: Itô integration by parts with covariation

Let Xt=Yt=WtX_t = Y_t = W_t (standard Brownian motion). Then W,WT=T\langle W, W \rangle_T = T (the quadratic variation). Integration by parts gives:

0TWtdWt=WT200TWtdWtT\int_0^T W_t\,dW_t = W_T^2 - 0 - \int_0^T W_t\,dW_t - T 20TWtdWt=WT2T2\int_0^T W_t\,dW_t = W_T^2 - T 0TWtdWt=12WT212T\int_0^T W_t\,dW_t = \frac{1}{2}W_T^2 - \frac{1}{2}T

Compare with the deterministic result: 0Txdx=x2/2\int_0^T x\,dx = x^2/2, giving T2/2T^2/2. The stochastic version has the extra T/2-T/2 correction, which is the Itô correction. This is the simplest non-trivial Itô integral and is often the first example computed in any stochastic calculus course. The T/2-T/2 term is the integrated form of the (dW)2=dt(dW)^2 = dt rule.

Common confusions and pitfalls

Forgetting the boundary terms [uv]ab[uv]_a^b. Integration by parts has three pieces: the boundary term and two integrals. Dropping the boundary term is the most common error, especially with improper integrals where the boundary behaviour at ±\pm\infty must be checked carefully.
Applying the deterministic formula in the stochastic setting. If you write XdY=XYYdX\int X\,dY = XY - \int Y\,dX when XX and YY are Itô processes, you are missing the covariation term X,Y\langle X, Y \rangle. The missing term is O(T)O(T), not negligible, whenever both processes have Brownian components.
Choosing uu and dvdv poorly. A bad choice can make the integral harder rather than easier. If vdu\int v\,du is more complex than the original, try reversing the assignment. The LIATE heuristic is a guide, not a rule.
Confusing integration by parts with substitution. Integration by parts handles products (udv\int u\,dv). Substitution handles compositions (f(g(x))g(x)dx\int f(g(x))g'(x)\,dx). They are different techniques for different integral structures, though complex integrals may require both.

Where this goes next

Integration by parts connects to:

  • Product Rule: Integration by parts is the integral form of the product rule, just as the Fundamental Theorem connects integration to differentiation generally.
  • Itô's Lemma: The stochastic product rule d(XY)=XdY+YdX+dXdYd(XY) = X\,dY + Y\,dX + dX\,dY integrates to the Itô version of integration by parts, with the covariation as the extra term.
  • Change of Variables: Substitution is the other main integration technique, corresponding to the chain rule rather than the product rule.
  • The Breeden-Litzenberger formula and static replication: Integration by parts applied to the call pricing integral extracts the risk-neutral density from observed option prices.

References

  • Stewart, J. (2008). Single Variable Calculus: Early Transcendentals (6th ed.). Thomson Brooks/Cole. Ch. 7 Section 7.1 (Integration by Parts) for the product-rule derivation and tabular examples.