Solution (source code)

= Solution

The nonnegative series in part (b) has independent squared-standard-normal terms. If $G$ is standard normal, direct Gaussian integration gives $\mathbb E e^{-aG^2}=(1+2a)^{-1/2}$ for $a\geq0$. Consequently, by independence and <dominated convergence> applied to the exponentials of increasing partial sums,
$$
\mathbb E\exp\left(-\lambda\int_0^1W_t^2\,dt\right)
=\prod_{n=1}^\infty\left(1+\frac{2\lambda}{(n-\tfrac12)^2\pi^2}\right)^{-1/2}.
$$
Use the permitted product identity with $x=\sqrt{2\lambda}$. The answer is
$$
\boxed{\mathbb E\exp\left(-\lambda\int_0^1W_t^2\,dt\right)=\frac1{\sqrt{\cosh\sqrt{2\lambda}}}\qquad(\lambda\geq0).}
$$
This <Laplace transform of the integrated square of Brownian motion> equals $1$ at zero. Its first derivative there gives mean $1/2$, in agreement with $\int_0^1\mathbb EW_t^2\,dt$.