The Linear Equation and Its Integrating Factor
For an ordinary differential equation, variation of constants divides out a solution of the homogeneous equation, leaving an equation for the remaining factor. The same strategy works for a linear equation driven by a continuous semimartingale, but integration by parts contributes a covariation term. That term matters even when the forcing includes a stochastic integral: omitting it generally gives the wrong solution.
Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a Brownian motion \(B_t\). Let \(X\) be a continuous semimartingale, decomposed as \(X=X_0+M+V\), where \(M\) is a continuous local martingale and \(V\) is a continuous finite-variation process. Its quadratic variation is \([X]=[M]\). All stochastic integrals below are Ito semimartingale integrals. A progressively measurable integrand \(H\) can be integrated against \(X\) locally when, for example, \(\int_0^T |H_s|\,d|V|_s\) and \(\int_0^T H_s^2\,d[M]_s\) are finite almost surely after localization. This is the general semimartingale integrability condition used here; for an integral against Brownian motion, the usual square-integrable class is \(\mathcal{L}^2\), consisting of progressively measurable \(H\) with \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\).
Fix constants \(a,b\in\mathbb{R}\), an \(\mathcal{F}_0\)-measurable initial value \(Y_0=y_0\), and progressively measurable forcing processes \(f,g\). Assume \(\int_0^T|f_s|\,ds<\infty\) almost surely and that \(g\) is integrable against \(X\) locally. For the formula below, assume also that the displayed integrands involving the stochastic exponential are locally integrable against \(X\). These conditions are satisfied, for example, when the coefficients are locally bounded and the equation is considered up to suitable stopping times. The equation is interpreted in the Ito sense:
Here \(aY_t+f_t\) is the drift relative to \(dt\), while \(bY_t+g_t\) is the coefficient integrated against \(X\); if \(X\) itself has both martingale and finite-variation parts, its integral contributes to both parts of the semimartingale dynamics. The Ito and Stratonovich conventions are not interchangeable: the equation above uses Ito integration, and converting a Stratonovich equation would require its own covariation correction.
The term \(-\tfrac12b^2[X]_t\) comes from the Ito correction. In differential notation, the multiplication rules are \(dX_t\,dX_t=d[X]_t\), \(dX_t\,dt=0\), and \(dt\,dt=0\). These rules concern covariation, not ordinary products of finite increments.
Variation of Constants: Formula and Proof
Proof. First apply Ito's formula to \(Z_t=\exp(at+b(X_t-X_0)-\tfrac12b^2[X]_t)\). Its exponent has differential \(a\,dt+b\,dX_t-\tfrac12b^2d[X]_t\), and its continuous martingale part is \(b\,dM_t\), with quadratic variation \(b^2d[X]_t\). The exponential Ito correction is therefore \(\tfrac12b^2Z_t\,d[X]_t\), which cancels the term \(-\tfrac12b^2Z_t\,d[X]_t\) from the exponent. Thus \(dZ_t=aZ_t\,dt+bZ_t\,dX_t\). Applying Ito's formula to \(R_t=Z_t^{-1}\), or differentiating the reciprocal with its second derivative correction, gives $$ dR_t=R_t\bigl(-a\,dt-b\,dX_t+b^2\,d[X]_t\bigr). $$ For any solution \(Y\), the continuous semimartingale product rule gives \(d(RY)=R\,dY+Y\,dR+d[R,Y]\). The martingale parts relative to \(M\) are \(-bR\,dM\) for \(R\) and \((bY+g)\,dM\) for \(Y\). Hence \(d[R,Y]=-bR(bY+g)\,d[X]\). Substituting the equation for \(dY\) and the formula for \(dR\), the \(aRY\,dt\) terms cancel, the \(bRY\,dX\) terms cancel, and the terms \(b^2RY\,d[X]\) cancel. What remains is $$ d(R_tY_t)=R_tf_t\,dt+R_tg_t\,dX_t-bR_tg_t\,d[X]_t. $$ Integrating from \(0\) to \(t\), and using \(R_0=1\), yields the expression in parentheses in the theorem. Multiplication by \(Z_t\) proves the asserted formula and existence. For uniqueness, let \(Y^{(1)}\) and \(Y^{(2)}\) be two solutions with the same initial value and forcing. Their difference \(D=Y^{(1)}-Y^{(2)}\) satisfies the homogeneous equation and \(D_0=0\). The same product calculation with \(g=f=0\) gives \(d(RD)=0\); therefore \(R_tD_t=0\) for every \(t\), up to indistinguishability. Since \(R_t>0\), \(D_t=0\) for every \(t\), proving uniqueness. \(\square\)
The covariation term in the formula has a specific origin: it compensates for the covariation between the inverse homogeneous factor and the \(g\,dX\) part of the forcing. If \(g=0\), that correction vanishes. If \(b=0\), the equation is additive in its \(dX\) forcing, and again there is no correction.
Worked Solutions
Worked Example: A Homogeneous Brownian-Driven Equation
Let \(X_t=B_t\), \(a=\tfrac12\), \(b=2\), and \(Y_0=3\), with \(f=g=0\). Since \([B]_t=t\), the integrating factor is $$ Z_t=\exp\!\left(\tfrac12t+2B_t-\tfrac12\cdot4t\right) =\exp(2B_t-\tfrac32t). $$ The formula gives \(Y_t=3\exp(2B_t-\tfrac32t)\).
Check by Ito's formula with \(h(t,x)=3e^{2x-3t/2}\). The derivatives are \(h_t=-\tfrac32h\), \(h_x=2h\), and \(h_{xx}=4h\). Since \(d[B]_t=dt\), Ito's formula gives $$ dh(t,B_t)=\left(h_t+\tfrac12h_{xx}\right)dt+h_x\,dB_t =\left(-\tfrac32h+2h\right)dt+2h\,dB_t =\tfrac12Y_t\,dt+2Y_t\,dB_t. $$ This is the required equation, and \(Y_0=3e^0=3\). As an independent check, the Brownian exponential \(e^{2B_t-2t}\) has expectation \(1\), so \(\mathbb{E}[Y_t]=3e^{t/2}\); this also follows directly from the displayed solution and the normal moment generating function.
Worked Example: Forcing Through the Semimartingale Term
Take \(X_t=B_t\), \(a=0\), \(b=1\), \(Y_0=0\), \(f=0\), and \(g_t=1\). The equation is \(dY_t=Y_t\,dB_t+dB_t\). Here \(Z_t=e^{B_t-t/2}\) and \(R_t=e^{-B_t+t/2}\). The formula gives $$ Y_t=Z_t\left(\int_0^t R_s\,dB_s-\int_0^t R_s\,ds\right). $$ To evaluate the bracket, Ito's formula applied to \(R_s=e^{-B_s+s/2}\) gives \(dR_s=-R_s\,dB_s+R_s\,ds\): its exponent contributes \(-R_s\,dB_s+\tfrac12R_s\,ds\), and the second-derivative correction contributes another \(\tfrac12R_s\,ds\). Thus \(R_s\,dB_s-R_s\,ds=-dR_s\). Integrating, the bracket equals \(R_0-R_t=1-R_t\), and consequently \(Y_t=Z_t(1-R_t)=Z_t-1\).
Check by substitution: \(Y=Z-1\), and \(dZ=Z\,dB\) by the homogeneous exponential equation. Therefore \(dY=Z\,dB=(Y+1)\,dB=Y\,dB+dB\), as required. Also \(Y_0=Z_0-1=0\). This calculation shows concretely why the covariation correction in the general formula cannot simply be dropped.
Worked Example: A Time-Dependent Drift Forcing
Let \(X_t=B_t\), \(a=0\), \(b=1\), and \(Y_0=2\). Choose the forcing \(f_t=Z_t=e^{B_t-t/2}\) and \(g_t=0\). The integrating factor is \(Z_t=e^{B_t-t/2}\), so \(R_tf_t=1\) at every time. The variation-of-constants formula is therefore $$ Y_t=Z_t\left(2+\int_0^t1\,ds\right)=(2+t)e^{B_t-t/2}. $$ For a direct check, set \(h(t,x)=(2+t)e^{x-t/2}\). Its derivatives are \(h_t=e^{x-t/2}\bigl(1-\tfrac12(2+t)\bigr)\), \(h_x=h\), and \(h_{xx}=h\). The Ito drift is \(h_t+\tfrac12h_{xx}=e^{x-t/2}\), while the diffusion term is \(h\,dB_t\). Hence \(dY_t=Z_t\,dt+Y_t\,dB_t=f_t\,dt+Y_t\,dB_t\), exactly the stated equation.
Check the initial value: \(Y_0=(2+0)e^0=2\). The independent expectation check uses \(\mathbb{E}[e^{B_t-t/2}]=1\), so \(\mathbb{E}[Y_t]=2+t\). Taking expectations in the verified differential equation gives the same result because the Brownian integral has mean zero here: its integrand \(Y\) is square-integrable on each bounded time interval, as follows from the finite second moment of \((2+t)e^{B_t-t/2}\).
Why the Correction Matters
A common mistake is to treat \(R\) as though it were an ordinary differentiable integrating factor and to write \(d(RY)=R\,dY+Y\,dR\), omitting \(d[R,Y]\). For the second example, this would miss the term \(-R\,d[B]\) in \(d(RY)\). The incorrect formula would give \(Y=Z\int_0^tR_s\,dB_s\), instead of \(Y=Z(\int_0^tR_s\,dB_s-\int_0^tR_s\,ds)\). The discrepancy is not a matter of notation: since \(d[B]_s=ds\), the omitted correction is an actual time integral. The check \(Y=Z\int R\,dB\) by substitution does not satisfy \(dY=Y\,dB+dB\).
The method is useful because it separates the multiplicative dynamics from the forcing. The homogeneous coefficient determines \(Z\); the remaining terms are integrals against \(dt\), \(X\), and \([X]\). It also makes the relevant assumptions visible: \(X\) must be a continuous semimartingale for the product and Ito calculations used here, and the displayed integrals must exist locally. A local martingale arising in an intermediate stochastic integral need not be a true martingale without additional integrability; no such martingale claim is needed for the pathwise semimartingale identity proved above.
| Equation feature | Contribution to the transformed equation |
|---|---|
| Drift forcing \(f_t\,dt\) | \(R_tf_t\,dt\) |
| Semimartingale forcing \(g_t\,dX_t\) | \(R_tg_t\,dX_t\) |
| Covariation of the inverse factor with forcing | \(-bR_tg_t\,d[X]_t\) |
Check Your Understanding
Use the formula and the product rule, paying particular attention to the covariation term.
- For \(dY_t=3Y_t\,dt+2Y_t\,dB_t\), \(Y_0=1\), compute the explicit homogeneous solution and verify its Ito drift.
- In the general formula, explain why the correction disappears when \(b=0\), even if \(g\) is not zero.
- For \(X=B\), \(a=0\), \(b=1\), \(f=0\), and \(g=1\), derive \(dR_t=-R_t\,dB_t+R_t\,dt\) and use it to evaluate the transformed forcing.
- State the local integrability requirements for \(\int Rg\,dX\) when \(X=X_0+M+V\).
- Explain which product-rule term is lost in the incorrect ordinary integrating-factor calculation, and identify its value when \(X=B\).