Skip to content

Applying Itô’s Lemma to a Function of Time and Brownian Motion

Original question

How do I apply Itô's lemma to a function that depends on both time and a Brownian motion?

Compute the partial derivatives in time and space separately, then use

df(t,Wt)=(ft(t,Wt)+12fxx(t,Wt))dt+fx(t,Wt) dWt.df(t,W_t)=\left(f_t(t,W_t)+\tfrac12 f_{xx}(t,W_t)\right)dt+f_x(t,W_t)\,dW_t.

The explicit time derivative and the second spatial derivative both affect drift. The first spatial derivative determines the instantaneous exposure to the Brownian shock.

Find the two drift terms and check the cancellation

There are three derivatives to put on the page. The time derivative accounts for the growth of the exponential prefactor at a fixed spatial point. The first spatial derivative is the coefficient of the Brownian move. The second spatial derivative is multiplied by one half because the Taylor term is quadratic, and by dtdt because [W]t=t[W]_t=t. Here differentiating sine twice gives minus sine. The last observation is what makes the time and curvature terms cancel, even though the function explicitly depends on time.

For an original practice exercise, let Yt=et/2sin⁡(Wt)Y_t=e^{t/2}\sin(W_t) and compute its SDE. Then determine whether it is a martingale over a finite horizon. Here f(t,x)=et/2sin⁡xf(t,x)=e^{t/2}\sin x, so
ft=12et/2sin⁡x,fx=et/2cos⁡x,fxx=−et/2sin⁡x.f_t=\tfrac12e^{t/2}\sin x,\qquad f_x=e^{t/2}\cos x,\qquad f_{xx}=-e^{t/2}\sin x.

In the time derivative, hold xx fixed. In both spatial derivatives, hold tt fixed. Substitution gives

dYt=et/2cos⁡(Wt) dWt.dY_t=e^{t/2}\cos(W_t)\,dW_t.

The drift terms cancel exactly. Since the integrand is adapted and

E∫0Tescos⁡2(Ws) ds≤eT−1<∞,\mathbb E\int_0^T e^s\cos^2(W_s)\,ds\le e^T-1<\infty,

the stochastic integral is a true martingale on [0,T][0,T]. The bound matters because the zero-drift calculation alone supplies a local martingale when the stochastic integral is only locally square integrable.

Verify the result by conditioning on a Brownian increment

Suppose at time s=1s=1 the observed Brownian value is Ws=π/6W_s=\pi/6. Then Ys=e1/2/2≈0.824Y_s=e^{1/2}/2\approx0.824. At time t=2t=2 the sine is applied to π/6+Z\pi/6+Z, where ZZ is independent standard normal. The sine addition identity and symmetry give E[sin⁡Z]=0\mathbb E[\sin Z]=0, while the Gaussian characteristic function gives E[cos⁡Z]=e−1/2\mathbb E[\cos Z]=e^{-1/2}. Hence the conditional mean of Y2Y_2 is e⋅12e−1/2=e1/2/2e\cdot\tfrac12e^{-1/2}=e^{1/2}/2, confirming the SDE argument.
As a check on the time derivative, replace et/2e^{t/2} by ete^t. The new drift becomes 12etsin⁡(Wt) dt\tfrac12 e^t\sin(W_t)\,dt and the cancellation disappears. Its unconditional expectation is still zero by symmetry. The drift or conditional mean is needed to distinguish the two cases.

More generally, take Yt=eatsin⁡(kWt)Y_t=e^{a t}\sin(kW_t) for constants aa and k≠0k\ne 0. The second spatial derivative multiplies the original function by −k2-k^2. The time derivative multiplies it by aa. You can therefore choose a=k2/2a=k^2/2 to build a family of martingales and confirm the cancellation without computing any conditional density.

References and next steps