Hitting times for Brownian motions Let $B$ be a standard Brownian motion and let $\alpha, \beta > 0$. Let 
\begin{align}
\tau = \inf\{t \geq 0 : B_t = \alpha \ \ \text{or}\ \ B_t=-\beta\}.
\end{align}
It can be shown by defining independent events $A_j = \{|B_{j+1}-B_{j}| \geq \alpha + \beta\}$ for integers $0 \leq j \leq n-1$ and $\epsilon = \mathbb{P}(A_j) = \mathbb{P}(A_0) $,  that there exists an $\epsilon \in (0,1)$ such that $\mathbb{P}(\tau \geq n) \leq (1-\epsilon)^{n}$.
My question is about showing that for all $p \geq 1$, $\mathbb{E}[\tau^p] < \infty$. 
I do not understand why
\begin{align}
\mathbb{E}[\tau^p] = \int_0^\infty p t^{p-1} \mathbb{P}(\tau \geq t ) dt.
\end{align}
And subsequently why is
\begin{align}
\int_0^\infty p t^{p-1} \mathbb{P}(\tau \geq t ) dt = \sum_{n=0}^\infty \int_n^{n+1} p t^{p-1} \mathbb{P}(\tau \geq t ) dt ?
\end{align}
 A: To derive the expression for $\mathbb{E}[\tau^p]$, note that by definition
$$\mathbb{E}[\tau^p] = \int_{0}^{\infty} t^p f_\tau(t)dt,$$
where $f_{\tau}$ is the density function of $\tau$. Applying integration by parts we obtain
\begin{align}
\mathbb{E}[\tau^p] &= \int_{0}^{\infty} -t^p d[1-F_{\tau}] \\
&= \underbrace{\left[-t^p (1-F_{\tau}(t))\right]_{0}^{\infty}}_{*} + \int_{0}^{\infty} pt^{p-1}[1-F_{\tau}(t)]dt,
\end{align}
where $F_{\tau}$ is the distribution function of $\tau$. Now, $[1-F_{\tau}(t)] = \mathbb{P}(\tau \geq t)$. Furthermore it can be shown that $1-F_{\tau}(t) \to 0$ if $t \to \infty$ (follows by Markov inequality). Hence the first term $*$ vanishes and you obtain the expression. 
A: Note that $P(\tau\geq t)=E(I_{\{\tau\geq t\}})$ and $$\int_{0}^{+\infty}pt^{p-1}P(\tau\geq t)dt=\int_{0}^{+\infty}pt^{p-1}E(I_{\{\tau\geq t\}})dt\overset{!}{=} E\bigg(\int_{0}^{+\infty}pt^{p-1}I_{\{\tau\geq t\}}dt\bigg)=E\bigg(\int_{0}^{\tau}pt^{p-1}dt\bigg)=E(\tau^p),$$
where in ! we used the Fubini - Tonelli theorem. For the second part just note that $$\displaystyle \int_{0}^{\infty}g(t)dt=\sum_{n=0}^{+\infty}\int_{n}^{n+1}g(t)dt$$ for an integrable function $g$ on 
$[0,+\infty)$ (in the generalized sense). 
EDIT. $$I_{\{\tau\geq t\}}=\left \{\begin {array}{ll}
1,~t\leq \tau\\
0,~t> \tau\\
\end{array}
\right. $$ and therefore  $$\int_{0}^{+\infty}pt^{p-1}I_{\{\tau\geq t\}}dt=\int_{0}^{\tau}pt^{p-1}~dt + \int_{\tau}^{+\infty}0~dt= \int_{0}^{\tau}pt^{p-1}dt.$$
