Proof that $E[X^2]$ = $\sum_{n=1}^\infty (2n-1) P(X\ge n)$

X is a random variable with values from $ \Bbb N\setminus{0}$

I am trying to show that $ E[X^2]$ = $ \sum_{n=1}^\infty (2n-1) P(X\ge n)$ iff $ E[X^2]$ < $ \infty$ .

I rewrote $ P(X \ge n)$ :

$ E[X^2]$ = $ \sum_{n=1}^\infty (2n-1)\sum_{x=1}^\infty 1_{x \ge n}P(X=x)$

Now I tried to rearrange the sums:

$ E[X^2]$ = $ \sum_{x=1}^\infty \sum_{n=1}^x (2n-1)P(X=x)$

But I think that I made a mistake. Could you give me some hints?

Relate exponential to normal distribution and find $E[X^2]$

The following question is absolutely killing me:

Let $ X$ be a continuous r.v. distributed according to the pdf $ ke^{-x^2-7x}$ . Find $ E[X^2]$ .

I can supposedly map this onto the Gaussian pdf and use the variance equation to get the answer (i.e., allegedly no integrals required), however, I tried a one-to-one mapping of this pdf onto the Gaussian and came up with an embarrassing mess of algebra. So, I’m not at all sure how the suggested solution is supposed to work. Anyone else understand how to solve this?

How do I find the surface area of this function $y = e^{-x^2}$ when it’s rotated around the x-axis?

So I have this question:

Set up an integral for the area of the surface obtained by rotating the curve about the i) y axis and ii) x axis.

Let’s start with the xaxis problem:

$ y = e^{-x^2}$ from $ -1 \leq x \leq 1$

So for i), I’m going to use the formula:

$ $ \int_{-1}^1 2 \pi e^{-x^2} \sqrt{1 + \frac{dy}{dx}^2} dx$ $

$ \frac{dy}{dx} = e^{-x^2} * -2x$ and so $ \frac{dy^2}{dx} = 4x^2e^{-2x^2}$

Is that right? Did I do the squaring right?

So surface area = $ $ \int_{-1}^1 2 \pi e^{-x^2} \sqrt{1 + 4x^2e^{-2x^2}}dx$ $

Now I am stuck…

$ $ 2 \pi \int_{-1}^1 e^{-x^2} \sqrt{1 + 4x^2e^{-2x^2}}dx$ $

Can I u-sub $ u = e^{-x^2}$

How to use $\mathbb E[(X-\mathbb E[X])^2]=\mathbb E[X^2]-\mathbb E[X]^2$ on $\operatorname{Var}(X)=0$

In our lecture, we have proven that $ \mathbb E[(X-\mathbb E[X])^2]=\mathbb E[X^2]-\mathbb E[X]^2$ (*)

then we go on say if $ \operatorname{Var}(X)=0$ it follows using (*) that:

$ \mathbb P((X-\mathbb E[X])^2=0)=1$ and therefore $ \mathbb P(X=\mathbb E[X])=1$

I have seen other proofs via contradiction to prove $ \mathbb P(X=\mathbb E[X])=1$ but all have been without the use of (*). As my professor makes direct reference to $ \mathbb E[(X-\mathbb E[X])^2]=\mathbb E[X^2]-\mathbb E[X]^2$ , I assume it should be somewhat easier. Nonetheless, I do not understand how it becomes simpler. Any help is greatly appreciated