Ex 10.2.1 in Klenke's Probability Theory textbook Have been puzzled by this innocent-looking exercise from the book by Klenke. Would really appreciate any hint/comment/solution.
Here it is...

And here are some related (basic) concepts...

 A: Hints: Without loss of generality, we assume $X_0 := 0$; otherwise replace $X$ by $X-X_0$.


*

*Recall that $M_n := X_n^2- \langle X \rangle_n$ is a martingale.

*Show that for any square-integrable martingale $(Y_n,\mathcal{F}_n)_{n \in \mathbb{N}}$ it holds that $$\mathbb{E}((Y_n-Y_m)^2) = \mathbb{E}(Y_n^2)-\mathbb{E}(Y_m^2) \quad \text{for all $m \leq n$}.$$ Hint: Use the tower property on the left-hand side to condition on $\mathcal{F}_m$ and use the martingale property.

*By the optional stopping theorem, $(X_{n \wedge \tau})_{n \geq 1}$ is a martingale. Conclude from Step 1 and 2 that $$\mathbb{E}((X_{n \wedge \tau}-X_{m \wedge \tau})^2) = \mathbb{E}(\langle X \rangle_{n \wedge \tau}) - \mathbb{E}(\langle X \rangle_{m \wedge \tau}). \tag{1}$$

*Since $\langle X \rangle$ is a non-decreasing process, we have $|\langle X \rangle_{n \wedge \tau}| \leq \langle X \rangle_{\tau}$ for all $n \geq 1$. Conclude from $(1)$ and the dominated convergence theorem that $(X_{n \wedge \tau})_{n \geq 1}$ is a Cauchy sequence in $L^2$ (and hence convergent in $L^2$).

*As $X_{n \wedge \tau} \to X_{\tau}$ almost surely it follows from Step 4 that $X_{n \wedge \tau} \to X_{\tau}$ in $L^2$. Choose $m=0$ in (1) and let $n \to \infty$ to get $$\mathbb{E}(X_{\tau}^2) = \mathbb{E}\langle X \rangle_{\tau}.$$

*Since $L^2$-convergence implies $L^1$-convergence we also have $X_{\tau \wedge n} \to X_{\tau}$ in $L^1$. Use the fact that $(X_{n \wedge \tau})_{n \geq 1}$ is a martingale to show that $\mathbb{E}(X_{n \wedge \tau}) = 0$ and let $n \to \infty$.

*For part (ii): Consider a simple random walk $(X_n)_{n \in \mathbb{N}}$ started at $X_0=0$ and the stopping time $$\tau := \inf\{n \in \mathbb{N}; X_n=1\}.$$

