Problem:
Let $F_X(x)$ be the CDF of a continuous random variable $X$. Show that:
$$E[X]= \int_0^\infty(1-F_X(x)) \, dx -\int_{-\infty}^0F_X(x) \, dx.$$
Attempt:
A comprehensible explanation of the intuition regarding the expectation $E[X]$ and CDF for a non-negative random is found here: Intuition behind using complementary CDF to compute expectation for nonnegative random variables.
However, I am still at a loss about how to show the general case when $-\infty < x < \infty$.
I am again solving this as an exercise in my probability course and any help is greatly appreciated!