A company has two electric generators. The time until failure for each generator follows an exponential distribution with mean $10$. The company will begin using the second generator immediately after the first one fails. What is the variance of the total time that the generators produce electricity?
My attempt:
Let $S$ be the time until the first generator fails and $T$ be the time until the second generator fails. Let $X=S+T$. Then $Var(X) = E[X^2]- (E[X])^2$.
Finding the pdf of $X$ using the convolution formula:
$$f_X(x) = \int_0^x \frac{1}{10}e^{-s/10} \cdot \frac{1}{10}e^{(s-x)/10} \; ds = \frac{x\cdot e^{-x/10}}{100}$$
Now, utilizing the Gamma function: $$E[X^2] = \int_0^\infty \frac{x^3e^{-x/10}}{100} = \frac{10^4 \times \Gamma(4)}{100} = 600$$
$$E[X] = \int_0^\infty \frac{x^2e^{-x/10}}{100} = \frac{10^2 \times \Gamma(2)}{100} = 1$$
So, $Var(X) = 599$, which is not even close to the correct answer. Where have I gone wrong?
Edit: The mean is supposed to be $20$, as pointed out in the comments, but the issue is that my current calculations are not leading to that.
Method 1. Linearity.
If $X = S+T$ where $S$, $T$ are the random lifetimes of each generator, respectively, then $$\operatorname{Var}[X] \overset{\text{ind}}{=} \operatorname{Var}[S] + \operatorname{Var}[T],$$ where 'ind' over the equality sign indicates that the equality holds under the condition that $S$ and $T$ are independent random variables. Since the variance of an exponentially distributed random variable with mean $\operatorname{E}[S] = \operatorname{E}[T] = \mu$ is $\operatorname{Var}[S] = \operatorname{Var}[T] = \mu^2$, it follows that $\operatorname{Var}[X] = 2\mu^2 = 200.$
Method 2. Gamma distribution as a sum of iid exponential distributions.
Since $S, T$ are iid exponential with mean $\mu = 10$, then $X = S + T$ is Gamma with shape $n = 2$ and scale $\theta = \mu = 10$. Specifically, $$f_X(x) = \frac{x^{n-1} e^{-x/\theta}}{\theta^n \Gamma(n)} = \frac{x e^{-x/10}}{100}, \quad x > 0.$$ Then the $k^{\rm th}$ raw moment of $X$ is $$\begin{align} \operatorname{E}[X^k] &= \int_{x=0}^\infty x^k f_X(x) \, dx \\ &= \int_{x=0}^\infty \frac{x^{k+1} e^{-x/10}}{10^2} \, dx \\ &= 10^k \Gamma(k+2) \int_{x=0}^\infty \frac{x^{(k+2) - 1} e^{-x/10}}{10^{k+2} \Gamma(k+2)} \, dx \\ &= 10^k \Gamma(k+2), \end{align}$$ where in the last equality, we observe that the integrand corresponds to the density of a gamma distribution with shape $k+2$ and scale $10$, thus integrates to $1$. Consequently, $$\operatorname{E}[X^2] = 6 (10^2), \quad \operatorname{E}[X]^2 = (2(10))^2,$$ and $$\operatorname{Var}[X] = 600 - 400 = 200.$$