Show that $E[\log (1+S)] =\int_0^\infty \Pr[S > x]\,dx/(1+x)$ Finding the expected value of the function of random variable.
$$E[\log (1+S)]
\stackrel{(a)}{=} \int_0^\infty \log(1+x) f_S(x) \, dx
\stackrel{(b)}{=} \int_0^\infty \frac{\Pr[S > x]}{1+x} \, dx
$$
I understand  step (a) but not (b) any help much appreciated.
 A: \begin{align}
& \int_0^a \underbrace{\log(1+x)}_u \  \underbrace{f_S(x) \, dx}_{dv} = \overbrace{\int u\,dv = uv - \int v\,du}^\text{integration by parts} \\[10pt]
= {} & \left[ \log(1+x) F_S(x) \vphantom{\frac\sum\sum} \right]_0^a - \int_0^a \underbrace{F_S(x)}_v \  \underbrace{\frac 1 {1+x} \, dx}_{du} \\[10pt]
= & {} \left[ \vphantom{\frac\sum\sum}\log(1+x)(1-\Pr(S>x)) \right]_0^a - \int_0^a \frac{1-\Pr(S>x)}{1+x} \, dx \\[10pt]
= {} & \left[ \vphantom{\frac\sum\sum}\log(1+x)(1-\Pr(S>x)) \right]_0^a - \int_0^a \frac{1-\Pr(S>x)}{1+x} \, dx \\[10pt]
= {} & \log(1+a) - \log(1+a)(1-\Pr(S>a)) - \int_0^a \frac{1-\Pr(S>x)}{1+x} \, dx \\[10pt]
= {} & \log(1+a) - \log(1+a) F_S(a) - \int_0^a \frac{1-\Pr(S>x)}{1+x} \, dx \\[10pt]
= {} & \log(1+a) F_S(a) - \int_0^a \frac{dx}{1+x} + \int_0^a \frac{\Pr(S>x)}{1+x} \, dx \\[10pt]
= {} & \log(1+a) F_S(a) - \log(a+a) + \int_0^a \frac{\Pr(S>x)}{1+x} \, dx \\[10pt]
= {} & \underbrace{-\log(1+a)\Pr(S > a)}_\text{Does this approach $0$ as $a\to\infty$?} + \int_0^a \frac{\Pr(S>x)}{1+x} \, dx 
\end{align}
"Does this approach $0$ as $a\to\infty$?"  The answer depends on the distribution of $S$, about which we have no information. "Did" points out in comments below that the assumption that $\operatorname{E}(\log(1+S))$ exists implies that $-\log(1+a)\Pr(S>a)\to0$ as $a\to\infty$.
A: Hint: what is the relation between $f_s$ and $P(s>x)$ ?
And what is the relation between $\log(1+x)$ and $\frac{1}{1+x}$ ?
A: Assuming $f(x)$ is the pdf and $F(x)$ is the cdf, we can write $E(X) = \int xf(x)dx = \int (1-F(x))dx$ where $F^\prime(x) = f(x)$. Think along the lines of changing the way of integrating.
