Prove $ X_{t}=e^{W_{t}}-\frac{1}{2} \int_{0}^{t} e^{W_{s}} \mathrm{d} s $ is a martingale 
$$
X_{t}=e^{W_{t}}-\frac{1}{2} \int_{0}^{t} e^{W_{s}} \mathrm{d} s
$$
  for every $t \geq 0 .$ Here $\left(W_{t}\right)_{t \geq 0}$ is a (1-dim) Brownian motion and we let $\mathcal{F}:=\left(\mathcal{F}_{t}\right)_{t \geq 0}$ be the filtration generated by it.

How would I go about proving that this is a Martingale; either using the definition of a martingale or using Ito. This is a revision question for a exam I have coming up but I've forgotten\don't understand how to deal with the exponential and integral. Any help would be appreciated.
 A: Let 
$$
X_t=e^{W_t}-\frac 12\int_0^te^{W_s} ds.$$
We have to check that 


*

*$X_t$ is integrable;

*$X_t$ is $\mathcal F_t$-measurable.

*$\mathbb E\left[X_t\mid\mathcal F_u\right]=X_u$ for all $u\leqslant t$.


The first part follows from the fact that $e^{W_t}$ is integrable and $\int_0^1\mathbb E\left[e^{W_s}\right]ds$ is finite.
The trickiest part is the third. Split the integral on $(0,t)$ into two part: on $(0,u)$ and on $(u,t)$; the first is $\mathcal F_u$-measurable; for the second part (and also for the first term), we have to compute $\mathbb E\left[e^{W_s}\mid\mathcal F_u\right]$ for $s\geqslant u$. This can be done by writing 
$e^{W_s}$ as $e^{W_s-W_u}e^{W_u}$.
A: Indeed, you can use either Ito or the definition.


*

*With the definition. You may want to recall the exponential martingale of the Brownian motion, namely $M_t = e^{W_t - t/2}$. Therefore, for $(\mathcal{F}_s)$ the natural filtration of $(W_s)$ and $s < t$,
$$
\mathbb{E} (e^{W_t} | \mathcal{F}_s) = e^{t/2} \mathbb{E} (e^{W_t-t/2} | \mathcal{F}_s) = e^{t/2} \mathbb{E} (M_t | \mathcal{F}_s) = e^{t/2} M_s = e^{W_s - s/2 + t/2}.
$$
As for the integral part, by Fubini-Tonelli,
\begin{align*}
\mathbb{E}\left ( \int_0^t e^{W_r} \: \mathrm{d}r \middle | \mathcal{F}_s \right ) & = \mathbb{E}\left ( \int_0^s e^{W_r} \: \mathrm{d}r \middle | \mathcal{F}_s \right ) + \mathbb{E}\left ( \int_s^t e^{W_r} \: \mathrm{d}r \middle | \mathcal{F}_s \right ) \\
& = \int_0^s e^{W_r} \: \mathrm{d}r + \int_s^t \mathbb{E}\left  (e^{W_r} \middle | \mathcal{F}_s \right ) \: \mathrm{d}r \\
& = \int_0^s e^{W_r} \: \mathrm{d}r + \int_s^t e^{W_s - s /2 + r/2} \: \mathrm{d}r.
\end{align*}
The second line uses that the stochastic integral up to time $s$ is $\mathcal{F}_s$-measurable. You can finish the computation of the integral and put the pieces together to see that it works.

*With Ito. Note that the integral is just a standard integral, and therefore, by Ito + fundamental theorem of calculus:
$$
\mathrm{d} X_t = \mathrm{d} (e^{W_t}) - \frac12 e^{W_t} = e^{W_t} \mathrm{d} W_t + \frac12 e^{W_t} \mathrm{d} t - \frac12 e^{W_t} = e^{W_t} \mathrm{d} W_t.
$$
Since there is no bounded variation term, this tells you that $(X_t)$ is a martingale.

