Question about probability density function and some notational confusion In an instruction question (so not homework) I am asked to prove the following:

Let $X$ be a non-negative random variable with finite second moment. I then have to show that:
  $$ E(X^2)= \int^\infty_0 2t \mathbb P(X>t)dt$$

Where I believe $\mathbb P(X>t)=\int_t^\infty f_X(x) dx$
It seems to me that some symmetry result was applied here and a step of integration by parts. I am familiar with the following interpretation of the expected value:
$$ E(X^2)=\int_{-\infty}^\infty t^2 f_X(t) dt$$
Now if one would use a single step of integration by parts we would get something involving $2t$. I think this specifically would give us:
$$ E(X^2)=[t^2 \int f_X(t) dt]_{-\infty} ^\infty - \int_{-\infty}^\infty 2t (\int f_X(t) dt) dt $$
But I am having some trouble getting a precise form for the quantities as you can tell. This means I have trouble writing it in the form that is desirable.
Any tips?

Let $S(t)=P(X>t)=1-P(X\leq t)$. Then $-S'(t)=f(t)$
Note that
$$
\int_0^\infty t^2f(t)\, dt=-t^2S(t)]_{0}^\infty+\int_{0}^\infty2tS(t)\, dt
$$
Now observe that $\lim_{t\to \infty}t^2S(t)=0$ whence
$$
\int_0^\infty t^2f(t)\, dt=\int_{0}^\infty2tS(t)\, dt
$$
as desired. To justify $\lim_{t\to \infty}t^2S(t)=0$ we can proceed as follows. Since
$X^2I(X>t)\geq t^2I(X>t)$ we have that
$$
0\leq t^2P(X>t)\leq EX^2I(X>t)\to0
$$ 
as $t\to\infty$ by the dominated convergence theorem.
