I have to show that the following two processes are martingales
- $M_t=g(t)B_t-\int_0^tg'(s)B_sds$
- $X_t=\exp\left(e^tB_t-\int^t_0e^sB_sds-\frac{e^{2t}}{4}+\frac{1}{4}\right)$
Where $g(t)$ is a real valued continuously differentiable function and $B_t$ is a brownian motion.
I tried the first part straight forward but without success. I guess I can not simply use Fubini here to switch expectation and integration. So I believe it has something to do with Ito. But i really don't know how to apply it here to show that 1. is a martingale.
For the second process: I know that the first two terms in the exponent are 1. with $g(t)=e^t$ so this is a martingale. I assume I also have to apply Ito here aswell, but like in 1., I'm not sure how.