Stochastic Integration by Parts

Ordinary calculus has the product rule d(xy) = x\,dy + y\,dx, and its integral twin, integration by parts. In the stochastic world both pick up one extra term — the quadratic covariation of the two factors. For Itô processes X, Y,

d(X_t Y_t) = X_t\,dY_t + Y_t\,dX_t + d[X, Y]_t,

and, integrating from 0 to T,

\int_0^T X_t\,dY_t = X_T Y_T - X_0 Y_0 - \int_0^T Y_t\,dX_t - [X, Y]_T.

The lone correction d[X, Y]_t is the entire difference from the rule you learned in first-year calculus — and it is a direct application of Itô's lemma to the function f(x, y) = xy.

Deriving the product rule, line by line

Apply the two-variable Itô lemma to f(x, y) = xy. The two-variable form, for processes X, Y, reads

df = f_x\,dX + f_y\,dY + \tfrac{1}{2}\Big(f_{xx}\,d[X] + 2f_{xy}\,d[X,Y] + f_{yy}\,d[Y]\Big),

the second-order part now carrying the covariation cross-term 2f_{xy}\,d[X,Y] alongside the two pure variations.

Step 1 — compute the partials of f(x, y) = xy:

f_x = y, \qquad f_y = x, \qquad f_{xy} = 1, \qquad f_{xx} = 0, \qquad f_{yy} = 0.

Step 2 — substitute. The two pure second derivatives vanish, so the variation terms d[X] and d[Y] drop out entirely; only the cross term remains:

d(X_t Y_t) = y\,dX_t + x\,dY_t + \tfrac{1}{2}\cdot 2\cdot 1\cdot d[X, Y]_t.

Step 3 — write x = X_t, y = Y_t and simplify the \tfrac12\cdot 2 = 1:

d(X_t Y_t) = Y_t\,dX_t + X_t\,dY_t + dX_t\,dY_t.

Step 4 — recognise the cross-product as a covariation. From the box algebra, dX_t\,dY_t = d[X, Y]_t, which delivers the product rule:

\boxed{\,d(X_t Y_t) = Y_t\,dX_t + X_t\,dY_t + d[X, Y]_t.\,}

Integrating both sides over [0, T] and moving one integral across gives the integration-by-parts formula stated above. The extra -[X, Y]_T is the Itô tax on the classical rule.

A worked example: d(t\,W_t) and \int_0^T t\,dW_t

Take X_t = t (pure drift, dX_t = dt) and Y_t = W_t (dY_t = dW_t). The covariation term d[t, W]_t = 0, because t has finite variation — it is smooth, so it accumulates no covariation with anything (formally its diffusion coefficient b^X = 0). Then

d(t\,W_t) = t\,dW_t + W_t\,dt + \underbrace{d[t, W]_t}_{=\,0} = W_t\,dt + t\,dW_t.

This one has no correction — the ordinary product rule already holds, precisely because one factor is smooth. Now integrate from 0 to T (using 0\cdot W_0 = 0) and rearrange to evaluate an otherwise-awkward Itô integral:

T\,W_T = \int_0^T W_t\,dt + \int_0^T t\,dW_t \;\;\Longrightarrow\;\; \int_0^T t\,dW_t = T\,W_T - \int_0^T W_t\,dt.

Integration by parts has traded an integral against dW (a stochastic integral) for one against ordinary dt — exactly the kind of simplification that makes the formula a workhorse in pricing.

For Itô processes X, Y:

Why does the correction disappear for a smooth factor? In the cross-product dX_t\,dY_t, a finite-variation process contributes a dt in place of a dW, and a product with a dt is always second-order (dt\,dW = 0, (dt)^2 = 0). So the covariation term is non-zero only when both factors carry genuine Brownian roughness — the ordinary product rule fails exactly when both legs wiggle.

As a consistency check, set X_t = Y_t = W_t in the product rule. Then d[W, W]_t = dt, and

d(W_t^2) = W_t\,dW_t + W_t\,dW_t + d[W, W]_t = 2W_t\,dW_t + dt,

which is exactly the d(W_t^2) we got straight from Itô's lemma. The product rule and the single-variable lemma agree, as they must — the +\,dt is the covariation [W, W]_t = t showing up once more.

The extra term as an area mismatch

Integration by parts is the statement that the rectangle of area X_T Y_T is filled by two strips, \int X\,dY and \int Y\,dX. In ordinary calculus those two strips tile the rectangle exactly. For rough Itô paths they overlap by a thin staircase of cross-increments \sum \Delta X_i\,\Delta Y_i — and that staircase is precisely the covariation [X, Y]_T, the term the classical formula is missing. Refresh to redraw the partition.