I was working on the following definite integral:
$\displaystyle\int^{\infty}_{-\infty}{xe^{-x^{2}}}dx$
I decided to use $u$-substitution to make the integral simpler, by letting $u = -x^{2} \Rightarrow du = - 2x\hspace{1 mm}dx$.
The lower bound then becomes $-(-\infty)^{2}=-\infty$, while the upper bound becomes $-\infty^{2} = -\infty$.
So the overall definite integral is then:
$= -\dfrac{1}{2}\displaystyle\int^{-\infty}_{\infty}{e^{u}}du$
Which evaluates to:
$= -\dfrac{1}{2} \bigg(e^{-\infty} - e^{-\infty}\bigg)$
$= -\dfrac{1}{2} \times 0$
$= 0$
Is this a legitimate way of doing this problem? Or were there any errors made?
Thank you.
Your answer is correct but the method is sloppy.
Note that $$ \displaystyle\int^{\infty}_{-\infty}{xe^{-x^{2}}}dx$$ is defined as $$ \displaystyle\int^{0}_{-\infty}{xe^{-x^{2}}}dx +\displaystyle\int^{\infty}_{0}{xe^{-x^{2}}}dx $$
Now you apply your substitution and get the same result.