I saw a book where they calculate E(\tau 1_{\tau<\infty}) and $E(\tau)$ for some random variable $\tau$ (actually a stopping time of a process). They obtain different results. The problem is that for this variable; P(\tau<\infty)=1. Thus in my mind I would expect E(\tau 1_{\tau<\infty})=E(\tau).
Can you give an example of a random variable $\tau$ which satisfies both of the following properties?
1) P(\tau<\infty)=1.
2) E(\tau 1_{\tau<\infty})\neq E(\tau)