Let $B_t$ be a Brownian motion, then
$X_t:=e^{\sigma B_t + \mu t}$ is a martingale iff $\mu = - \frac{\sigma^2}{2}$.
I already know how to compute this claim, but I am trying to solve it via Itô formula. Here I give the Itô formula:
$F : \mathbb{R} \to \mathbb{R}$ twice continuously differentiable and $X$ a continuous semimartingale. Then
$F(X_t) - F(X_0) = \int_0^t F'(X_s) dX_s + \frac{1}{2} \int_0^t F ''(X_s) d[X]_s$ a.s. for all $t \geq 1$.
How is it possible ? Thanks in advance !
Hint
Using Itô formula, if $f(x,t)=e^{\sigma x+\mu t}$ $$X_T=1+\int_0^T \left(\mu+\frac{1}{2}\sigma ^2\right)e^{\sigma B_t+\mu t}\,\mathrm d t+\int_0^T\sigma e^{\sigma B_t+\mu t}\,\mathrm d W_t.$$
So, $X_t$ is a martingale if $$ \int_0^T \left(\mu+\frac{1}{2}\sigma ^2\right)e^{\sigma B_t+\mu t}\,\mathrm d t=0\quad \text{and}\quad \sigma e^{\sigma B_{\cdot }+\mu .}\in L^2(\Omega \otimes [0,T]).$$
I let you conclude.