I am trying to solve the following problem from Oksendal textbook.
Let $M_t$ be a martingale defined in the following way $$M_t:=\mathbb{E}\left[e^{\sigma W_T}|\mathcal{F}_t\right]$$ By the martingale representation theorem, we have $$M_t=\mathbb{E}\left[M_0\right] + \int_0^t g\left(s,\omega\right)dW_s$$ for $g\left(s,\omega\right)$ such that the Ito integral be defined... Find said function !
I can derive (but maybe it is wrong) the following intermediate results $$M_t:=\mathbb{E}\left[e^{\sigma W_T}|\mathcal{F}_t\right]=e^{\frac{\sigma^2}{2}\left(T-t\right)+\sigma W_t}=\int_{0}^{t}e^{\frac{\sigma^2}{2}\left(T-s\right)+\sigma W_s}\sigma dW_s$$ $$\mathbb{E}\left[M_0\right]=e^{\frac{\sigma^2}{2}T} $$ This leads to $$\int _0^tg\left(s,\omega\right)dW_s=\int_0^te^{\frac{\sigma^2}{2}\left(T-s\right)+\sigma W_s}\sigma dW_s-e^{\frac{\sigma^2}{2}T}$$ then I am trapped since I do not see how to bring back the right most term under the ito integral.
Would appreciate any hints, thanks !
Following Saz advice
Taking $t\leftarrow T$, we have $$\int_0^T g\left(s,\omega\right)dW_s=e^{\sigma W_T}-e^{\frac{\sigma^2T}{2}}=e^{\frac{\sigma^2T}{2}}\left(e^{\sigma W_T-\frac{\sigma^2T}{2}}-1\right)$$ the parenthesis content is of the form $\left(X_T-X_0\right)$ in the equality $X_T = X_0 + \int_0^TdX_s$. Also $X_T$ is clearly an exponential martingale so that $dX_s=\sigma e^{-\frac{\sigma^2s}{2}+\sigma W_s}dW_s$. This leads to $$\int_0^T g\left(s,\omega\right)dW_s=e^{\frac{\sigma^2T}{2}}\int_0^T \sigma e^{-\frac{\sigma^2s}{2}+\sigma W_s}dW_s \Rightarrow g\left(s,\omega\right)\equiv \sigma e^{\frac{\sigma^2}{2}\left(T-s\right)+\sigma W_s}$$
Hints:
Remark: Suppose that $X$ is an $\mathcal{F}_T$-measurable random variable which is of the form $X = g(W_T)$ for some nice function $g$. In order to find the representation $(1)$, the standard approach is to find a deterministic function $f$ such that $f(t) g(W_t)$ is a martingale. Usually, Itô's formula is quite useful to determine $f$.