Artificial intelligent assistant

Show that $E(X)=\int_{0}^{\infty}P(X\ge x)\,dx$ for non-negative random variable $X$ > Show that for a non-negative random variable $X$, > $$\mathbb E(X)=\int_0^\infty \mathbb P(X\ge x) \, dx.$$ I started with $$\mathbb E(X)=\int_0^\infty x \, dF(x)=\int_0^\infty \int_0^x dt\,dF(x).$$ This is my try.

Integrate the LHS and the RHS of the pointwise identity $$ X=\int_0^X\mathrm dx=\int_0^\infty\mathbf 1_{X\geqslant x}\,\mathrm dx. $$ This shows that the desired formula for $E[X]$ holds irrespectively of the hypothesis that $X$ is discrete or continuous or neither discrete nor continuous, as soon as $X\geqslant0$ almost surely, and that two formulas are available, namely, $$ E[X]=\int_0^\infty P[X\geqslant x]\,\mathrm dx=\int_0^\infty P[X\gt x]\,\mathrm dx.$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7a690a2af664e1522f8c52c072bbe6c9