Let $dX_t= \mu_t dt + \sigma_t d B_t$ be an Ito process and define its stochastic exponential by
$$\mathscr E X_t= e^{\int_0^t \mu_s ds + \int_0^t \sigma_s dB_s - \frac{1}{2} \int_0^t \sigma_s^2 ds} $$
Show that $\mathscr E X_t$ is a local martingale iff $X_t$ is a local martingale
I was able to show that $$d \mathscr E X_t = \mathscr E X_t d X_t$$ using Itos formula. For the first direction, if $X$ is a local martingale, then it has no drift and $$\mathscr E X_t=1+\int_0^t \sigma_s \mathscr E X_s d B_s$$ using almost sure continuity of $e^{x}$ gives us boudnedness on $[0,t]$ and we show easily that $$\int_0^t \sigma_s^2(\omega) \mathscr E X_s(\omega)^2 ds <\infty $$ for almost all $\omega$. But I have no idea how to show the other direction.
You showed $d\mathcal{E}(X)_t = \mathcal{E}(X)_tdX_t$, and since $X$ is an Ito process you have $d X_t = \mu_t dt + \sigma_t dB_t$ so substituting in we have $d\mathcal{E}(X)_t = \mathcal{E}(X)_t \mu_t dt + \mathcal{E}(X)_t \sigma_t dB_t$. An Ito process is a local martingale iff the drift term is $0$, so $\mathcal{E}(X)_t \mu_t =0$ for all $t$. Since $e^x \ne 0$ for all real $x$, $\mathcal{E}(X)_t \ne 0$ so $\mathcal{E}(X)_t \mu_t =0$ implies $\mu_t = 0$ and therefore $dX_t = \sigma_t dB_t$. Since we showed $dX_t$ has no drift term, we conclude $X_t$ is a local martingale.