Q:

Variance of a random variable $X$ as a function of the survival function $S(x)$

Suppose $X$ is a nonnegative and continuous random variable with a
  survival function $S(x)$.  Show that
$$\mathsf{Var}(X)=2\int_0^\infty tS(t) \, dt-\left( \int_0^\infty S(t) \, dt\right)^2$$

Using the fact that
$$f(x) =−\frac{dS(x)}{dx}$$
we have that
$$\begin{align*}
\mathsf{Var}(X)
&=\mathsf{E}(X^2)-\mathsf{E}(X)^2\\\\
&=\int_0^\infty t^2 f(t)\,dt-\left(\int_0^ \infty tf(t) \, dt \right)^2 \\\\
&=-\int_0^\infty t^2 \, dS(t)-\left(\int_0^\infty t \, dS(t) \right)^2 \\\\
&=-\left(t^2 S(t)\bigg\rvert_0^\infty-\int_0^\infty 2tS(t) \, dt \right) - \left(tS(t)\bigg\rvert_0^\infty-\int_0^\infty S(t) \, dt \right)^2
\end{align*}$$
I could get the desired result by showing
$$t^2 S(t) \bigg\rvert_0^\infty = tS(t) \bigg\rvert_0^\infty = 0 $$
but how do we know if $t$ and $t^2$ go to $\infty$ slower than $S(t)$?

A:

Your attempt to prove this using integration-by-parts is the wrong approach, and that is what is leading you to require unnecessary conditions.  The simpler approach is to express the moments using double-integration, and then use interchange of integrals to get the survival function.  For any non-negative continuous random variable $X$ you can use the interchange of integrals to write the $k$th raw moment as:
$$\begin{equation} \begin{aligned}
\mathbb{E}(X^k) 
= \int \limits_0^\infty t^k f(t) \ dt
&= \int \limits_0^\infty \Bigg[ r^k f(t) \Bigg]_{r=0}^{r=t} \ dt \\[6pt]
&= \int \limits_0^\infty \int \limits_0^t k r^{k-1} f(t) \ dr \ dt \\[6pt]
&= k \int \limits_0^\infty r^{k-1} \int \limits_r^\infty f(t) \ dt \ dr \\[6pt]
&= k \int \limits_0^\infty r^{k-1} S(r) \ dr. \\[6pt]
\end{aligned} \end{equation}$$
Substitution of this general result will give you the required expressions for the first and second moments, which then gives you the desired variance expression.

