Given $f \in L^2$, I am trying to simplify the following expression
$$E\left[ \exp \left( \int_0^t f(s)dB_s \right)^2 \right]$$
What I know is that $\int_0^t f(s)dB_s$ is a Wiener integral, so it has a Gaussian distribution of zero mean and variance $\int_0^t f(s)^2ds$. I am getting out of my comfort zone but here it goes.
$\int_0^t f(s)dB_s$ is Gaussian, so $\exp \left( \int_0^t f(s)dB_s \right)$ is log-normal. Let $\exp \left( \int_0^t f(s)dB_s \right)=Y_t$, so then $E[Y_t^2]$ is the second moment of the log-normal random variable. Using the moment generating function $E[X^n]=\exp(n\mu + n^2 \sigma^2/2)$ we have $$E[Y_t^2]=\exp\left(2\int_0^t f(s)^2ds \right)$$
The importance of this is that I would like it to be finite, which it is (if this derivation is correct) since $f \in L^2$. How does this look?
We have $ \int_0^t f(s)dB_s \sim N(0;\int_0^t f^2(s)ds)$.
Let's denote $a =\int_0^t f^2(s)ds$, then it suffices to calculate $E(e^{aX^2})$ with $X \sim N(0,1)$.
And $E(e^{aX^2})$ exists if and only if $a<\frac{1}{2}$. If this condition is satisfied, then $E(e^{aX^2}) = \frac{1}{\sqrt{1-2a}}$
Conclusion: if $\int_0^t f^2(s)ds < \frac{1}{2}$ then $$E\left[ \exp \left( \int_0^t f(s)dB_s \right)^2 \right] = \frac{1}{\sqrt{1-2\int_0^t f^2(s)ds}}$$
PS: the expectation $E\left[ \left( \exp \left( \int_0^t f(s)dB_s \right)\right)^2 \right]$ can be calculated as follows
\begin{align} E\left[ \left( \exp \left( \int_0^t f(s)dB_s \right)\right)^2 \right] &= E\left[ \exp \left( 2\int_0^t f(s)dB_s \right) \right] \\ &= E\left[ \exp \left( 2\sqrt{\int_0^t f^2(s)ds} *X \right) \right] \\ \end{align} We know that $E[e^{aX}] = e^{\frac{a^2}{2}}$, then $$E\left[ \left( \exp \left( \int_0^t f(s)dB_s \right)\right)^2 \right] = \exp \left( 2\int_0^t f^2(s)ds \right)$$