On hitting time of Brownian motion and Ito's lemma I have two possibly related questions. Let $\tau:=\min\{t\geq0:B_t=1\}$, where $B_t$ is a standard Brownian motion.


*

*I am supposed to derive the fact that $\mathbf{E}\tau=\infty$ by applying some properties of stochastic integrals to $\int^{\infty}_0\mathbf{1}_{[0,\tau]}(t)dB_t$.
I have tried this: 
$$\mathbf{E}\tau=\mathbf{E}\int^{\tau}_0dt=\mathbf{E}\int^{\infty}_0\mathbf{1}_{[0,\tau]}(t)dt=\mathbf{E}\left(\int^{\infty}_0\mathbf{1}_{[0,\tau]}(t)dB_t\right)^2$$
And I'm stuck (not even sure if going the right way).

*Is Ito's lemma false with stopping times as upper limits of the integrals? For example, is $\int^{\tau}_0dB_t=B_{\tau}$ false? How can I see that?
EDIT: A discussion on possible proofs of $\mathbf{E}\tau=\infty$ is presented in the answers here. I am just curious about the particular suggestion.
And the stochastic integral with a hitting time as an upper limit is defined as follows 
$$\int^{\tau}_0dB_t:=\int^\infty_0\mathbf{1}_{[0,\tau]}(t)dB_t:=L^2-\lim_{N\to\infty}\int^N_0\mathbf{1}_{[0,\tau]}(t)dB_t$$
Then I guess the question 2. would be equivalent to asking if Ito's lemma is true for integrals with infinite upper limit.
 A: Here is a solution to (1).  Not sure if it strictly falls under the requirements of the problem, but it doesn't use anything too fancy.
Let $\tau_r$ be the first time Brownian motion hits either $1$ or $-r$ and $f(x)=x^2$.  Since the infinitesimal generator of Brownian motion (restricted to smooth functions) is $1/2 \Delta$, we have by Dynkin's formula that
$$\mathbf{E}[f(B_{\tau_r})]=\mathbf{E}[B_{\tau_r}^2]=f(0)+\mathbf{E}\left[ \int_0^{\tau_r} 1 ds \right]=\mathbf{E}[\tau_r] .$$
Using the Gambler's ruin estimate, we have
$$\mathbf{E}[B_{\tau_r}^2]=\frac{r^2}{r+1}+\frac{r}{r+1}.$$
Letting $r \rightarrow \infty$, we see that $\mathbf{E}[\tau_r] \rightarrow \infty$ as $r \rightarrow \infty$.  It follows that $\mathbf{E}[\tau]=\infty$.
A: To answer your second question first, you should be careful to determine exactly how you define a stochastic integral with a stopping time in the limit.  But any reasonable definition should result in $\int_0^\tau dB_t = B_\tau$.
Edit: I take it back.  Using your definition, $\int_0^\tau dB_t$ does not exist when $\tau = \inf\{t \ge 0 : B_t = 1\}$.  For we have $\int_0^N 1_{[0, \tau]} dB_t = B_{\tau \wedge N}$, and this does not converge in $L^2$ as $N \to \infty$ (if it did, it would also converge in $L^1$, but we have $E[B_{\tau \wedge N}]=0$ while $E[B_\tau] = 1$).  Of course, it does converge almost surely.
For your main question, here's an argument possibly in the spirit of your question, though it seems too complicated still.  
Let $\tau_k = \inf\{t \ge 0 : B_t = k\}$ be the hitting time of $k$.  Note that,  $0 = \tau_0 \le \tau_1 \le \tau_2 \le \dots$ by continuity of Brownian motion, and by recurrence $\tau_k < \infty$.  Let $\sigma_k = \tau_k - \tau_{k-1}$ be the time needed to get from $k-1$ to $k$.  By the strong Markov property and translation invariance, the $\sigma_k$ are iid.  Thus we have $$E[\tau_k] = E[\sigma_1 + \dots + \sigma_k] = k E[\sigma_1].\quad(1)$$
Now for any $k,n$, we have $E \int_0^\infty |1_{[0, \tau_k \wedge n]}(t)|^2\,dt = E[\tau_k \wedge n] \le n < \infty$, so the Itô isometry gives
$$E[\tau_k \wedge n] = E\left[\left(\int_0^\infty 1_{[0, \tau_k \wedge n]}(t)\,dB_t\right)^2\right] = E[B_{\tau_k \wedge n}^2]\quad(2)$$
as in your argument.  (Another way to get this identity is to note that $X_t = B_t^2 - t$ is a martingale, hence so is $X_{\tau_k \wedge t}$.)  By monotone convergence, $E[\tau_k \wedge n] \uparrow E[\tau_k]$ as $n \to \infty$.  And by Fatou's lemma, $\liminf_{n \to \infty} E[B_{\tau_k \wedge n}^2] \ge E[B_{\tau_k}^2] = k^2$.  So passing to the limit, we have $$E[\tau_k] \ge k^2.\quad(3)$$
Combining (1) and (3), we see $E[\sigma_1] \ge k$.  Since $k$ was arbitrary, we must have $E[\sigma_1] = \infty$, which completes the proof.
Note the essential observation here is that the strong Markov property suggests that $E[\tau_k]$ scales linearly with $k$, as in (1), while (2) suggests quadratic scaling.  The only way out of this paradox is to have $E[\tau_k] = \infty$.
A: Hi a direct and analytic proof consists in using the density of $\tau$ and to calclulate $E[\tau]$ directly. $\tau$'s density is given by :  
$f(t)_\tau=\frac{1}{\sqrt{2\pi.t^3}}e^{-\frac{1}{2.t}}$ (many books give this e.g. Karlin Taylor, "A First course in Stochastic Processes")
From this you can show your assertion.
Anyway, I think that the solution given by ShawnD is more in the spirit of your problem, and essentially is an application of Doob's Optimal Sampling Theorem for martingales.
Best regards
