# Math Help - Integrating by parts ?

1. ## Integrating by parts ?

$\int_{-\infty}^{\infty} \frac{x}{e^x dx}$

The e^x should be e^ modulus x , but i can't seemed to key out the modulus thingy.

Ok, I tried the by parts method. Letting u = 1/e^mod x , and dv = x dx

but once i done it , i need to do by parts again. And it goes on and on...
never ending...

What did i do to do it uncorrectly ?

Thanks

2. I'm not quite sure what you're doing.

$\int x \cdot e^{-x}\;dx\;=\;\int x\;d\left(-e^{-x}\right)\;=\;-x \cdot e^{-x}\;+\;\int e^{-x}\;dx$

Just one application. You're almost done, except that you will have some trouble with convergence on the negative side.

3. You have a bit of a problem here.

Let us just consider this integral on the half-line $(-\infty,0)=\mathbb{R}^-$

Then a simple substitution leads us to $\int_{\mathbb{R}^-}\frac{x}{e^{-x}}dx=-\int_{\mathbb{R}^+}e^z\cdot z dz$ which obviously tends to negative infinity.

and since clearly $\int_{\mathbb{R}^+}\frac{x}{e^x}\le\int_{\mathbb{R }^+}\frac{dx}{x^2}$ converges we see that

$\int_{\mathbb{R}}\frac{x}{e^{-x}}dx=\int_{\mathbb{R}^-}\frac{x}{e^{-x}}dx+\int_{\mathbb{R}+}\frac{x}{e^x}dx$ diverges.

EDIT: Sorry, a little late.

4. Originally Posted by Drexel28
You have a bit of a problem here.

Let us just consider this integral on the half-line $(-\infty,0)=\mathbb{R}^-$

Then a simple substitution leads us to $\int_{\mathbb{R}^-}\frac{x}{e^{-x}}dx=-\int_{\mathbb{R}^+}e^z\cdot z dz$ which obviously tends to negative infinity.

and since clearly $\int_{\mathbb{R}^+}\frac{x}{e^x}\le\int_{\mathbb{R }^+}\frac{dx}{x^2}$ converges we see that

$\int_{\mathbb{R}}\frac{x}{e^{-x}}dx=\int_{\mathbb{R}^-}\frac{x}{e^{-x}}dx+\int_{\mathbb{R}+}\frac{x}{e^x}dx$ diverges.

EDIT: Sorry, a little late.
However, the answer provided by my lecturer was , it converges to 0. He did not gave us the solution so i have no idea how he did it. All he said was to try integrate by parts.

5. Originally Posted by xcluded
However, the answer provided by my lecturer was , it converges to 0. He did not gave us the solution so i have no idea how he did it. All he said was to try integrate by parts.
- Wolfram|Alpha sweet sweet validation.

6. Originally Posted by Drexel28
- Wolfram|Alpha sweet sweet validation.
Okay. Thanks
Btw what does the modulus X means to the question ?
Does it matter to the question if the modulus exist or don't exist?

7. Originally Posted by xcluded
Okay. Thanks
Btw what does the modulus X means to the question ?
Does it matter to the question if the modulus exist or don't exist?

I'm sorry. What absolute value?

8. Originally Posted by Drexel28
I'm sorry. What absolute value?
- Wolfram|Alpha

Because i am wondering what is their difference if the question was changed to this instead.

9. Originally Posted by xcluded
- Wolfram|Alpha

Because i am wondering what is their difference if the question was changed to this instead.
Aha! I see what you are saying.

Once again make note that $\int_{\mathbb{R}}=\int_{\mathbb{R}^-}\frac{x}{e^{|x|}}dx+\int_{\mathbb{R}^+}\frac{x}{e ^{|x|}}dx=I_1+I_2$. And we can make a neat observation. In $I_1$ let $x=-z$ to obtain $I_1=-\int_{\infty}^0\frac{-z}{e^{|-z|}}dz=\int_0^{\infty}\frac{-z}{e^{|z|}}dz=-\int_{\mathbb{R}^+}\frac{z}{e^{|z|}}dz=-I_2$. So $\int_{\mathbb{R}}\frac{x}{e^{|x|}}dx=I_1+I_2=-I_2+I_2=0$

Remark: And if you're really inquisitive $\int_{-\infty}^{\infty}\frac{|x|}{e^{|x|}}dx$ has another similar trick. If we make the same substituiont in $I_1$ as the previous one we get $I_1=I_2$ so $\int_{\mathbb{R}}\frac{|x|}{e^{|x|}}dx=2\int_{\mat hbb{R}^+}\frac{|x|}{e^{|x|}}dx=2\int_{\mathbb{R}^+ }\frac{x}{e^x}dx$

10. Thank you drexel28 !