A question regarding the hitting time formula in brownian motion Let $\tau_a=\inf\{t: B_t=a\}$, the hitting time of the standard Brownian motion to reach the boundary $a$.
This is easily derived
$$E(e^{-\lambda \tau_a})=e^{-|a|\sqrt{2\lambda}}$$
But I am having a problem of using this formula to get the moments of $\tau_a$ by matching the coefficients of terms for each power of $\lambda$, specifically, the LHS, if expanded, has all integer powers of $\lambda$; however, the RHS has the various terms of $\sqrt{\lambda}$. How to reconcile the difference here? Could somebody please help? Thanks.
 A: To add on @Did's answer, note that the PDF of $\tau_a$, for $a > 0$, is given by
$$
f_{\tau _a } (t) = \frac{a}{{\sqrt {2\pi } }}t^{ - 3/2} e^{ - a^2 /(2t)} ,\;\; t > 0.
$$
From this you immediately see that ${\rm E}(\tau_a) = \infty$.
EDIT: The distribution function of $\tau_a$ can be derived as follows (cf. p.1 here).
First note that, for any $t > 0$,
$$
{\rm P}(\tau _a  < t) = {\rm P}(\tau _a  < t,B_t  < a) + {\rm P}(\tau _a  < t,B_t  > a).
$$
The right-hand side is equal to $2{\rm P}(\tau _a  < t,B_t  > a)$, hence to $2{\rm P}(B_t  > a)$.
Thus, 
$$
{\rm P}(\tau _a  < t) = 2 {\rm P}(B_t  > a) = \frac{2}{{\sqrt {2\pi t} }}\int_a^\infty  {e^{ - \frac{{y^2 }}{{2t}}} \,{\rm d}u}  = \frac{2}{{\sqrt \pi  }}\int_{\frac{a}{{\sqrt {2t} }}}^\infty  {e^{ - y^2 } \,{\rm d}y}.
$$
Differentiating with respect to $t$ gives the above formula for $f_{\tau _a } (t)$. (For arbitrary $a \in \mathbb{R}$, just put $|a|$ instead of $a$ in that formula.)
A: Well, in fact $E(\tau_a)$ is infinite...
A classic argument to see that $\tau_a$ does not have finite mean is to consider $\tau_{2a}$. On the one hand, to hit $2a$, one has to hit $a$ and then, starting from $a$, to hit $2a$. By the strong Markov property, this second duration is independent of $\tau_a$ and, by invariance by translations, distributed like $\tau_a$. On the other hand, by the scale invariance of Brownian motion, $(2B_t)$ is distributed like $(B_{4t})$, hence $\tau_{2a}$ is distributed like $4\tau_a$. Finally, $\tau_a$ solves a distribution equality: the distribution of $T+T'$ and the distribution of $4T$ coincide, where $T$ and $T'$ are independent copies of $\tau_a$. This is enough to prove that $\tau_a$ is not integrable (and almost enough to deduce its Laplace transform, for that matter).
