Let $W_t$ be standard Brownian motion. It is well known that $W_t^2-t$ is a martingale. One way to show this is by applying Ito's lemma to calculate that $d(W_t^2-t)/dt = 2W_t dW_t$, which has no drift. Therefore $W_t^2-t$ is a martingale. I am a novice in stochastic process so I want to ask which theorems one use in this proof?
Probability – Show a Stochastic Process is a Martingale Using Ito’s Lemma
probabilitystochastic-processes
Related Solutions
Ok, so your idea was right - you should consider $$ \mathsf E \left[\cos{B_t}\mathrm e^{B_t}\right] $$ at $t = \sigma^2$ since $B_t\sim\mathcal N(0,t).$ What is Ito lemma about? Given a function $f\in C^2$ you know that $$ f(B_t) - f(B_0) = \frac12\int\limits_0^t f''(B_s)\,\mathrm d s+\int\limits_0^tf'(B_s)\mathrm dB_s, $$ so applying expectation to both sides you obtain $$ \mathsf E[f(B_t)] - f(0) = \frac12\int\limits_0^t\mathsf E[f''(B_s)]\mathrm ds \quad(\star) $$ which is a simple application of Dynkin's formula. It holds since $\mathsf E\int\limits_0^tf'(B_s)\mathrm dB_s = 0$ since the process under the expectation sign is Ito integral which is always a martingale starting from zero.
Let us focus now on $f(x) = \cos x\cdot\mathrm e^x$, so $f(0) = 1$ and $f''(x) = \sin x\cdot\mathrm e^x$. If you denote $m(t) = \mathsf E f(B_t)$ then from $(\star)$ we have $$ m(t) = 1-\int\limits_0^t \mathsf E[\sin B_s\cdot\mathrm e^{B_s}]\mathrm d s. $$ Denote $n(s) =E[\sin B_s\cdot\mathrm e^{B_s}] $, then $m(0) = 1$ and $$ m'(t) = -n(t). $$
Applying Ito formula to the function $\sin x\mathrm e^x$ we obtain another equation: $n(0) = 0$ and $$ n'(t) = m(t). $$
We can solve it by substitution: $m'' = -n' = -m$, so $m''+m = 0$ (do you know how to solve it?). The solution is $m(t) = \alpha \sin t+\beta\cos t$. Based on the initial condition, we find: $\beta = 1$ and $\alpha = 0$ so $$ m(t) = \cos t $$ and $$ \mathsf E[\cos X\mathrm e^X] = \cos \sigma^2. $$
I think it's also worth to say that here we have a textbook example in which just two steps were sufficient to calculate the expectation. If the function $f$ is arbitrary then you have to solve a PDE $$ m_t = \frac12 m_{xx} $$ with $m(0,x) = f(x)$, see e.g. here. However, the only way to give a solution to this PDE can be $$ m(t,x) = \int\limits_\mathbb R f(y)\frac1{\sqrt{2\pi t}}\mathrm e^{-y^2/2t^2}\mathrm d y $$ which is exactly just a usual formula for the expectation of the function of a Gaussian random variable.
If an Ito process has no drift, then we have a process of the type $I_t = \int_0^t H_u dW_u,$ (i.e the stochastic differential is $dI_u = H_u dW_u$). The previous integral is defined for integrand processes $H$ such that $H$ is $\{ \mathscr{F}_t \}$-adapted and $\int_0^t |H_u|^2 du < \infty $ a.s for every $t>0.$ But $I_t$ defined like that, is ("only") a local martingale. For $I_t$ to be a (true) martingale we have to check that $E \int_0^t |H_u|^2 du < \infty $ a.s for every $t>0.$
Best Answer
From Itô's lemma you have :
$Y_t=W_t^2 - t= \int_0^t W_sdW_s$
So what you have here is that $Y_t$ is a local martingale. To prove that it is indeed a martingale it suffices to show that :
$\forall t>0, E[\langle Y\rangle_t]<\infty$
as you can check in lemma 3 which is not too hard I think.
Best regards