I am asked to solve this problem.
Let $B$ be a BM and $t>0$ a real number. What is the value of : $$ \mathbb{E}\left(\int_0^t e^{B_s}ds\right) \text{ ?}$$
I have tried to use Ito formula to have a simpler integral but it didn't work. Do you have any idea ?
Thank you!
As suggested in the comment section, Fubini's theorem permits to write $$ \mathbb{E}\left[\int_0^t e^{B_s} \mathrm{d}s\right] = \int_0^t \mathbb{E}[e^{B_s}] \mathrm{d}s. $$ Then, since $e^{B_s}$ is a log-normal random variable, we have $\mathbb{E}[e^{B_s}] = e^{s/2}$, hence $$ \mathbb{E}\left[\int_0^t e^{B_s} \mathrm{d}s\right] = \int_0^t e^{s/2} \,\mathrm{d}s = 2(e^{t/2}-1). $$
Alternatively, if you really want to use Itô's lemma, you may start from $\mathrm{d}(e^{B_t}) = \frac{1}{2}e^{B_t}\mathrm{d}t + e^{B_t}\mathrm{d}B_t$. Next, integrate and you will get $$ \frac{1}{2} \int_0^t e^{B_s} \mathrm{d}s = \int_0^t \mathrm{d}(e^{B_s}) - \int_0^t e^{B_s} \mathrm{d}B_s = e^{B_t} - 1 - \int_0^t e^{B_s} \mathrm{d}B_s, $$ since $B_0 = 0$, and finally $$ \mathbb{E}\left[\int_0^t e^{B_s} \mathrm{d}s\right] = 2(\mathbb{E}[e^{B_t}]-1) = 2(e^{t/2}-1), $$ because $\int_0^t e^{B_s} \mathrm{d}B_s$ is a martingale.