Could anyone help me with this exercise or show me similiar example? Any help appreciated.
Using the martingales $M_t^\lambda=\exp(\lambda W_t-\lambda^2t/2)$ and $N_t^\lambda=(M_t^\lambda+M_t^{-\lambda})/2$ prove that, for all $a,\lambda \ge 0$, $\Bbb{E}{e}^{-\lambda \tau_a}=(\cosh(a\sqrt{2\lambda}))^{-1}$, where $\tau_a=\inf\{t>0:|W_t|=a\}$ and $W_t$ is a one dimensional Wiener process.
Since $|N^\lambda_{\tau_a\wedge t}|\le e^{\lambda a}$, so the optional stopping theorem can be applied here:
$E(N^\lambda_{\tau_a}) = E(N^\lambda_{0})=1 $
so
$E(e^{\lambda a-\frac{1}{2}\lambda^2\tau_a} + e^{-\lambda a-\frac{1}{2}\lambda^2\tau_a})=1$
make a substitution: $\frac{1}{2}\lambda^2\to \lambda$ and solve the equation above to get the conclusion.