I came across the following question:
If $ X $ is a continuous random variable $ (-\infty<X<\infty) $ having distribution function $ F(x) $, show that $$ E(X)=\int_{0}^{\infty}[1-F(x)-F(-x)]\,\mathrm{d}x, $$ provided $ x[1-F(x)-F(-x)]\to0 $ as $ x\to\infty $.
I went through a similar problem posted here, but cannot seem to generalise the result as required. Any hint will be appreciated.