Solve: $\int_{\infty}^{-\infty} x e^{-x^2}dx$ $$
\begin{align}
& \phantom{={}} \int_{-\infty}^{\infty} x e^{-x^2} \, dx \\[6pt]
& =\int_{0}^{\infty} x e^{-x^2} \, dx+\int_{-\infty}^{0} x e^{-x^2} \, dx \\[6pt]  
& =-\frac{1}{2} \int_{0}^{-\infty} e^t \, dt-\frac{1}{2}\int_{-\infty}^{0} e^t \, dt \\[6pt]
& =\frac{1}{2} \int_{-\infty}^0 e^t \, dt-\frac{1}{2}\int_{-\infty}^{0} e^t \, dt \\[6pt] 
& =0
\end{align}
$$
I can't understand the third line.
It means that we substitute $x^2=t$ and $dx=dt/2x$? But I think it doesn't make sense...
 A: Define the variable $z= x\sqrt2$. Then $x = \frac{z}{\sqrt2}$ and $dx = \frac{dz}{\sqrt2}$.
Insert into the integral:
$$\int_{-\infty}^{\infty} x e^{-x^2}dx = \int_{-\infty}^{\infty} z\frac {1}{\sqrt2} e^{-\frac 12z^2}\frac{dz}{\sqrt2} = \sqrt{\frac{\pi}{2}}\int_{-\infty}^{\infty} \frac {1}{\sqrt{2\pi}}ze^{-\frac 12z^2}dz$$
The integral now represents the expected value of the standard normal distribution, which is zero.
From a amthematical point of view, one could show the initial intergal is zero by 
$$I=\int_{-\infty}^{\infty} x e^{-x^2}dx = \int_{-\infty}^{0} x e^{-x^2}dx + \int_{0}^{\infty} x e^{-x^2}dx$$
Swap the limits of integration in the first integral and obtain a minus sign
$$I =  - \int_{0}^{-\infty} x e^{-x^2}dx + \int_{0}^{\infty} x e^{-x^2}dx$$
We have by the properties of the integral
$$- \int_{0}^{-\infty} x e^{-x^2}dx = \int_{(-1)\cdot 0}^{(-1)\cdot -\infty} (-x) e^{-(-x)^2}dx = -\int_{0}^{\infty} xe^{-x^2}dx $$
Substitute into $I$
$$I =  -\int_{0}^{\infty} xe^{-x^2}dx  + \int_{0}^{\infty} x e^{-x^2}dx =0$$
...which is the "odd function" property mentioned by others.
A: In fact you do not need to evaluate the integral. It equals to zero, since the integrand

$$ f(x)=xe^{-x^2} $$

is an odd function.
Note: 

The integral of an odd function on the interval $[-a,a]$ is $0$.

