martingale and stochastic Integral Let ${W_t}$ be 1 dimension Brownian motion and
$X_t:=\exp(t/2)\cos W_t$ $t\in[0,T]$.
Show that $X_t$ is martingale.
I understood $df(t,W_t)=-\exp(t/2)\sin xdW_t$
, but I don't know why it become $X_t=1-\int_0^t \sin X_sdW_s$.
$f(0,X_0)=e^0 \sin X_0=1$? $X_0=?$
Please tell me.
 A: The statement that $\mathrm dX_t=A(t,X_t)\mathrm dW_t$ for some regular function $A$ is a shorthand for the fact that $$X_t=X_0+\int_0^tA(s,X_s)\mathrm dW_s$$ 
for every $t\geqslant0$ (or only locally in $t$, but I have a feeling these restrictions are out of this OP's scope).
Apply this to $A(t,x)=-\mathrm e^{t/2}\sin x$.
A: Let $f(t,x)$ be the function defined by $f(t,x) = e^{\frac{t}{2}} \cos x$. We observe that $\partial_t f(t,x) = \frac{1}{2} f(t,x)$ and $\partial_x^2 f(t,x) = - f(t,x)$. Hence we see that $$\partial_t f(t,x) = - \frac{1}{2} \partial_x^2 f(t,x).$$ This shows that $(X_t)_{t \geq 0}$ is a local martingale. To show that $(X_t)_{t \geq 0}$ is a full martingale, we need to show that for all $T >0$, that $$\mathbb{E} \left( \int_0^T \left| \partial_x f(t,x) \right|^2 dt \right) < \infty.$$ To this end, we observe that \begin{eqnarray*}
\mathbb{E} \left( \int_0^T \left| - e^{\frac{t}{2}} \sin x \right|^2 dt \right) &=& \int_0^T \int_{-\infty}^{\infty} \frac{1}{\sqrt{2\pi t}} \exp \left( - \frac{x^2}{2} \right) \exp (t) \sin^2 x dx dt \\
&=& \int_0^T \frac{e^t}{\sqrt{2\pi t}} \int_{-\infty}^{\infty} \sin^2 x \exp \left( - \frac{x^2}{2} \right) dx dt \\
&=& \int_0^T \frac{e^t}{\sqrt{2\pi t}} \left( \frac{e^2- 1}{e^2} \sqrt{\frac{\pi}{2}} \right) dt \\
& < & \infty.
\end{eqnarray*} So $(X_t)_{t \geq 0}$ is indeed a martingale. 
