Calculate $\mathbb{E}\left[e^{\int_t^TB_\tau dB_\tau}\right]$ I just learned basic stochastic calculus and found it extremely hard to calculate $\mathbb{E}\left[e^{\int_t^TB_\tau dB_\tau}\right]$, where $B_\tau$ is a standard Brownian motion.
I can do the calculation that $\int_t^TB_\tau dB_\tau=\frac{1}{2}(B_T^2-B_t^2)-\frac{1}{2}(T-t)$, but I don't know how to continue. I have tried Ito's lemma, but it seemed to make the calculation harder; I also tried Feynman-Kac Formula, but I cannot find any proper function form to solve the PDE...
Appreciate any help/hint!
 A: Writing $$B_T = (B_T-B_t)+B_t$$ we find that
$$\int_t^T B_s \, dB_s = \frac{1}{2} (B_T-B_t)^2+  (B_T-B_t)B_t - \frac{1}{2} (T-t).$$
By the independence of the increments of Brownian motion, we know that $B_t$ and $B_T-B_t$ are independent, and it follows that
\begin{align*} \mathbb{E}\exp\left( \int_t^T B_s \, dB_s \right) &= \exp \left(- \frac{1}{2}(T-t) \right) \mathbb{E}f(B_t) \tag{1} \end{align*}
where
$$f(x) := \mathbb{E}\exp \left( \frac{1}{2} (B_T-B_t)^2 + (B_T-B_t) x \right).$$
Using the scaling property,  $B_T-B_t \sim B_{T-t} \sim \sqrt{T-t} B_1$, we see that
$$f(x) = \mathbb{E}\exp \left( \frac{T-t}{2} B_1^2 + \sqrt{T-t} B_ 1 x \right).$$
To compute this function, we need to do some computations involving the Gaussian density. As $B_1 \sim N(0,1)$, we have
$$f(x) = \frac{1}{\sqrt{2\pi}} \int_{\mathbb{R}} \exp \left( \frac{T-t}{2} y^2 + \sqrt{T-t} yx \right) \exp \left(- \frac{1}{2} y^2 \right) \, dy.$$ In particular, we see that the integral on the right-hand side is infinite if $T-t \geq 1$, and therefore we will assume from now on that $T-t<1$. If we set $\sigma^2 := 1/(1+t-T)$, then
\begin{align*} f(x) &= \frac{1}{\sqrt{2\pi}} \int_{\mathbb{R}} \exp \left(- \frac{1}{2} \frac{y^2}{\sigma^2} + yx \sqrt{T-t} \right) \, dy \\ &= \sqrt{\sigma^2} \exp \left( \frac{1}{2} x^2 \sigma^2 (T-t) \right) \underbrace{\frac{1}{\sqrt{2\pi \sigma^2}} \int_{\mathbb{R}} \exp \left(- \frac{1}{2 \sigma^2} (y- x \sqrt{T-t} \sigma^2)^2 \right) \, dy}_{=1} \\ &= \frac{1}{\sqrt{1+t-T}} \exp \left( \frac{1}{2} \frac{T-t}{1+t-T} x^2 \right). \end{align*}
Plugging this into $(1)$, we obtain that
\begin{align*} \mathbb{E}\exp \left( \int_t^T B_s \, dB_s \right) &= \exp \left(-\frac{1}{2} (T-t) \right) \frac{1}{\sqrt{1+t-T}} \mathbb{E}\exp \left( \frac{1}{2} \frac{T-t}{1+t-T} B_t^2 \right)  \\ &= \exp \left(-\frac{1}{2} (T-t) \right) \frac{1}{\sqrt{1+t-T}} \mathbb{E}\exp \left( \frac{t}{2} \frac{T-t}{1+t-T} B_1^2 \right). \end{align*}
As $\mathbb{E}e^{rB_1^2} = 1/\sqrt{1-2r}$ for any $r<1$ (you can check this using the density of $B_1$), we conclude that
\begin{align*} \mathbb{E}\exp \left( \int_t^T B_s \, dB_s \right)&= \exp \left(-\frac{1}{2} (T-t) \right) \frac{1}{\sqrt{1+t-T}} \frac{1}{\sqrt{1- t \frac{T-t}{1+t-T}}} \\ &= \exp \left(-\frac{1}{2} (T-t) \right) \frac{1}{\sqrt{1+t-T-(T-t) t}}. \end{align*}
