Skip to content

Integration by parts

Integration by parts reverses the product rule. Value a growing cash-flow stream, keep its boundary term, and check the zero-rate limit and Itô distinction.

Integration by parts exchanges an integral of one product for a boundary term minus another integral. It is the product rule read backwards. In finance, it can turn a growing cash-flow rate multiplied by a discount factor into an explicit present-value formula. The boundary term is part of the value; losing it can overwhelm the answer.

The identity, including both endpoints

For continuously differentiable functions uu and vv on a finite interval [a,b][a,b],

∫abu(t)v′(t) dt=u(b)v(b)−u(a)v(a)⏟[uv]ab−∫abv(t)u′(t) dt.\int_a^b u(t)v'(t)\,dt =\underbrace{u(b)v(b)-u(a)v(a)}_{[uv]_a^b} -\int_a^b v(t)u'(t)\,dt.
The compact notation is ∫abu dv=[uv]ab−∫abv du\int_a^b u\,dv=[uv]_a^b-\int_a^b v\,du. Here dvdv means v′(t) dtv'(t)\,dt, rather than a second function to differentiate. The fundamental theorem of calculus applied to (uv)′=u′v+uv′(uv)'=u'v+uv' gives the formula. MIT's introduction derives both forms from this identity.
For an indefinite integral, write ∫u dv=uv−∫v du\int u\,dv=uv-\int v\,du and include one arbitrary constant in the final antiderivative. For a definite integral, evaluate the product at upper minus lower endpoint. There is no arbitrary constant in the resulting number.

Choose uu so differentiation simplifies it, and choose dvdv so an antiderivative is available. A polynomial times an exponential is a useful candidate: differentiating the polynomial reduces its degree, while integrating the exponential preserves its form. This is a strategy, not a promise that every product becomes easier.

A revenue stream that ramps up

Consider a hypothetical contract paying continuously over its first two years. With tt measured in years, its cash-flow rate is

c(t)=αt,α=10 USD/year2,0≤t≤T=2 years.c(t)=\alpha t,\qquad \alpha=10\ \text{USD/year}^2,\qquad 0\le t\le T=2\ \text{years}.
Thus the rate rises from zero to USD 20 per year. The coefficient is USD per year squared because multiplication by time must produce a rate in USD per year. These are continuous receipts: c(t) dtc(t)\,dt is an amount of cash. They are not one payment of c(T)c(T) at maturity.
Assume certain receipts, no fees and a constant continuously compounded discount rate r=0.05r=0.05 per year. The discount factor is e−rte^{-rt}, with dimensionless exponent rtrt. The time-zero present value is
PV=∫0Tαte−rt dt.PV=\int_0^T \alpha t e^{-rt}\,dt.

Use u=αtu=\alpha t and dv=e−rt dtdv=e^{-rt}\,dt. Then du=α dtdu=\alpha\,dt and v=−e−rt/rv=-e^{-rt}/r, for r≠0r\ne0. Consequently,

PV=[−αte−rtr]0T+αr∫0Te−rt dt=−αTe−rTr+αr2(1−e−rT)=αr2[1−(1+rT)e−rT].\begin{aligned} PV &=\left[-\frac{\alpha t e^{-rt}}{r}\right]_0^T +\frac{\alpha}{r}\int_0^T e^{-rt}\,dt\\ &=-\frac{\alpha T e^{-rT}}{r} +\frac{\alpha}{r^2}(1-e^{-rT})\\ &=\frac{\alpha}{r^2}\left[1-(1+rT)e^{-rT}\right]. \end{aligned}

Both terms have units of USD. Substituting the example's values gives:

ContributionUSD
Boundary term −αTe−rT/r-\alpha T e^{-rT}/r−361.934967
Residual integral α(1−e−rT)/r2\alpha(1-e^{-rT})/r^2+380.650328
Present value18.715361
The large negative boundary contribution does not mean the contract pays negative cash. It is one term in an algebraic decomposition. The original discounted integrand is nonnegative throughout. Dropping the boundary would give USD 380.65 for receipts whose undiscounted total is only USD 20.
Synthetic continuous cash-flow rate rises from zero to USD 20 per year over two years; its discounted rate ends at USD 18.097 per year. The discounted area is USD 18.715361. Integration by parts decomposes it into a negative USD 361.934967 boundary and a positive USD 380.650328 residual.
Synthetic continuous cash-flow rate rises from zero to USD 20 per year over two years; its discounted rate ends at USD 18.097 per year. The discounted area is USD 18.715361. Integration by parts decomposes it into a negative USD 361.934967 boundary and a positive USD 380.650328 residual.
Original deterministic example. The top panel shows rates in USD/year; the bottom shows amounts in USD on a common signed scale. The boundary and residual must be combined.
Discounting reduces the value to USD 18.72, versus USD 20 without discounting. This is an illustrative valuation under certain cash flows and a flat discount rate. Uncertain revenue or a non-flat term structure needs its own cash-flow and discounting model.

Check the answer where the formula looks fragile

An antiderivative is

F(t)=−αe−rt(tr+1r2).F(t)=-\alpha e^{-rt}\left(\frac{t}{r}+\frac{1}{r^2}\right).

Differentiating it gives F′(t)=αte−rtF'(t)=\alpha t e^{-rt}: the extra exponential and polynomial terms cancel. Subtracting F(0)F(0) from F(T)F(T) checks both the minus sign and the lower endpoint.

The formula with r2r^2 in the denominator cannot be evaluated by substituting r=0r=0. The original integral can:

PV∣r=0=∫0Tαt dt=αT22.PV\big|_{r=0}=\int_0^T \alpha t\,dt=\frac{\alpha T^2}{2}.

The closed form has the same limit. Its small-rate expansion is

PV=α(T22−rT33+r2T48+⋯ ).PV=\alpha\left(\frac{T^2}{2}-\frac{rT^3}{3} +\frac{r^2T^4}{8}+\cdots\right).

Near zero, direct subtraction in 1−(1+rT)e−rT1-(1+rT)e^{-rT} can lose numerical precision. Use a stable series or numerical integration rather than interpreting that cancellation as a financial discontinuity. In the example the limit is USD 20, and a positive rate makes the first correction negative.

Repeated integration by parts handles higher polynomial cash rates. Writing In=∫0Ttne−rt dtI_n=\int_0^T t^n e^{-rt}\,dt, for integer n≥1n\ge1 and r≠0r\ne0,

In=−Tne−rTr+nrIn−1,I0=1−e−rTr.I_n=-\frac{T^n e^{-rT}}{r}+\frac{n}{r}I_{n-1}, \qquad I_0=\frac{1-e^{-rT}}{r}.

Each step lowers the polynomial degree. Close to zero, this recurrence also needs a stable evaluation method; algebraic correctness alone does not guarantee numerical accuracy.

Ordinary time integration and Itô integration differ

The cash-flow example uses ordinary integration with respect to time. For continuous semimartingales XX and YY, the stochastic product formula instead gives

∫0TXt dYt=XTYT−X0Y0−∫0TYt dXt−[X,Y]T,\int_0^T X_t\,dY_t =X_TY_T-X_0Y_0-\int_0^T Y_t\,dX_t-[X,Y]_T,
where X,Y]TX,Y]_T is their [quadratic covariation. For Brownian motion starting at zero, this implies ∫0TWt dWt=(WT2−T)/2\int_0^T W_t\,dW_t=(W_T^2-T)/2, rather than WT2/2W_T^2/2. Tehranchi's Cambridge notes give the continuous-semimartingale product formula, p. 54. This correction belongs to Itô integration; it is not an extra term in the smooth cash-flow calculation above.
To practise choosing the factors, repeated integration and cyclic cases, use Examples 1–5 of Integration by Parts. The public page is a preview; the full lesson requires membership.

Sources

Last updated
  • calculus
  • integration
  • product rule
  • cash flow
  • discounting
← Back to the glossaryBack to top ↑