Integration by parts is the integral counterpart of the product rule. Where the product rule tells you how to differentiate f⋅g, integration by parts tells you how to integrate fdg by transferring the "work" from one factor to the other. In quant finance, this transfer appears in three critical contexts:
Deriving and manipulating option pricing formulas. The Black-Scholes call price involves terms like ∫sϕ(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) and Φ(d2) terms in the Black-Scholes formula.
Relating option prices to their Greeks. The "Breeden-Litzenberger" result — that the risk-neutral density is proportional to ∂2C/∂K2 — 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.
The stochastic (Itô) product rule. In stochastic calculus, the analogue of integration by parts for Itô processes is:
∫0TXtdYt=[XTYT−X0Y0]−∫0TYtdXt−⟨X,Y⟩T
The extra term ⟨X,Y⟩T — the covariation (or cross-variation) — has no classical analogue. It arises because the product rule in Itô calculus includes dXdY, and integrating that term produces the covariation. Understanding the deterministic formula first makes the stochastic extension natural.
The deterministic formula
Statement
Let u and v be differentiable functions on [a,b] with continuous derivatives. Then:
∫abudv=[uv]ab−∫abvdu
Or equivalently, using dv=v′(x)dx and du=u′(x)dx:
∫abu(x)v′(x)dx=u(b)v(b)−u(a)v(a)−∫abv(x)u′(x)dx
Intuition: The product uv changes because u changes (while v stays fixed) and v changes (while u stays fixed). The total change is [uv]ab, which splits into ∫udv (the part where v changes) and ∫vdu (the part where u changes). Rearranging gives the formula.
This is used when finding antiderivatives: you choose u and dv from the integrand so that ∫vdu is simpler than the original integral.
Strategy: choosing u and dv
The art of integration by parts is choosing the right split. The LIATE rule is a common heuristic — choose u from the first available category:
Logarithmic (lnx)
Inverse trigonometric (arctanx, etc.)
Algebraic (xn, polynomials)
Trigonometric (sinx, cosx)
Exponential (ex)
and let dv be everything else. The idea is that differentiating u should simplify it (log and algebraic functions get simpler when differentiated), while integrating dv should not make it worse.
In quant finance, the most common pattern is: u is a polynomial or algebraic function (price, payoff) and dv is an exponential or Gaussian density term.
This holds whenever both integrals exist and f and g 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[(X−K)+]=∫K∞(x−K)dF(x), the expected payoff of a call with strike K. Apply Stieltjes integration by parts with f(x)=x−K and g(x)=F(x):
∫K∞(x−K)dF(x)=[(x−K)F(x)]K∞−∫K∞F(x)dx
If (x−K)F(x)→0 appropriately (which requires finite mean), and using F(∞)=1:
E[(X−K)+]=∫K∞[1−F(x)]dx
This representation expresses the call payoff expectation in terms of the survival function 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 Xt and Yt on [0,T]:
∫0TXtdYt=XTYT−X0Y0−∫0TYtdXt−⟨X,Y⟩T
where ⟨X,Y⟩T is the quadratic covariation (cross-variation) of X and Y:
⟨X,Y⟩T=n→∞limi∑(Xti+1−Xti)(Yti+1−Yti)
Equivalently, rearranging to match the Itô product rule from the product rule page:
d(XtYt)=XtdYt+YtdXt+dXtdYt
Integrating both sides from 0 to T and rearranging gives the formula above.
Why the extra term?
In the deterministic case, the cross term Δf⋅Δg=O(Δx2) vanishes as the partition refines. In the stochastic case, if both X and Y have Brownian motion components, the cross term ΔX⋅ΔY is O(Δt) (because (ΔW)2=O(Δt)) and does not vanish. Its accumulation over [0,T] is the covariation ⟨X,Y⟩T.
Special cases:
If dX=a1dt+b1dW and dY=a2dt+b2dW (same Brownian motion), then d⟨X,Y⟩=b1b2dt and ⟨X,Y⟩T=∫0Tb1b2dt.
If X and Y are driven by independent Brownian motions, ⟨X,Y⟩=0 and the stochastic formula reduces to the deterministic one.
If Xt is deterministic (no Brownian component), ⟨X,Y⟩=0 — the classical formula is recovered.
Examples and applications
Example 1: ∫xe−x2/2dx (Gaussian integral by parts)
This integral appears when computing E[Z] for a standard normal Z, or when deriving moments of the normal distribution.
Let u=x (so du=dx) and dv=e−x2/2dx (so... v is related to the error function, which doesn't simplify things). Instead, reverse the assignment: let u=1 and recognise that xe−x2/2=−dxde−x2/2. Then:
∫−∞∞xe−x2/2dx=[−e−x2/2]−∞∞=0
confirming E[Z]=0 for Z∼N(0,1).
For the second moment, compute ∫−∞∞x2e−x2/2dx. Let u=x and dv=xe−x2/2dx (so v=−e−x2/2):
∫x2e−x2/2dx=[−xe−x2/2]−∞∞+∫−∞∞e−x2/2dx=0+2π
Dividing by 2π confirms E[Z2]=1, i.e., Var(Z)=1.
Example 2: Breeden-Litzenberger (extracting the risk-neutral density)
The price of a European call is:
C(K)=e−rT∫K∞(s−K)q(s)ds
where q(s) is the risk-neutral density of ST. Differentiate with respect to K:
∂K∂C=−e−rT∫K∞q(s)ds=−e−rT[1−F(K)]=−e−rTQ(ST>K)
Differentiate again:
∂K2∂2C=e−rTq(K)
So the risk-neutral density is:
q(K)=erT∂K2∂2C
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=e−rt (deterministic discount factor) and Yt=St (stock price under GBM). Since Xt is deterministic, ⟨X,Y⟩=0, and Itô integration by parts gives:
∫0Te−rtdSt=e−rTST−S0−∫0TStd(e−rt)
Since d(e−rt)=−re−rtdt:
∫0Te−rtdSt=e−rTST−S0+r∫0TSte−rtdt
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 (where the discounted stock is a martingale), the expectation of the left side is zero, giving EQ[e−rTST]=S0−rEQ[∫0TSte−rtdt], which is the continuous-time cost-of-carry relation.
Example 4: Itô integration by parts with covariation
Let Xt=Yt=Wt (standard Brownian motion). Then ⟨W,W⟩T=T (the quadratic variation). Integration by parts gives:
Compare with the deterministic result: ∫0Txdx=x2/2, giving T2/2. The stochastic version has the extra −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 term is the integrated form of the (dW)2=dt rule.
Common confusions and pitfalls
Forgetting the boundary terms [uv]ab. 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 ±∞ must be checked carefully.
Applying the deterministic formula in the stochastic setting. If you write ∫XdY=XY−∫YdX when X and Y are Itô processes, you are missing the covariation term ⟨X,Y⟩. The missing term is O(T), not negligible, whenever both processes have Brownian components.
Choosing u and dv poorly. A bad choice can make the integral harder rather than easier. If ∫vdu 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). Substitution handles compositions (∫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+dXdY 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.