# Evaluating integrals with infinity as boundary

1. Aug 20, 2008

### Niles

1. The problem statement, all variables and given/known data
Hi all.

Please take a look at this:

$$\int_{ - \infty }^\infty {x \cdot \exp } \left( { - \left| x \right|} \right){\rm{d}}x = \left. {\left( { - \exp \left( { - \left| x \right|} \right) \cdot x} \right)} \right|_{ - \infty }^\infty + \int_{ - \infty }^\infty {\exp \left( { - \left| x \right|} \right){\rm{d}}x}$$

When evaluating with infinity, does the first time equal zero or infinity? I mean does the exponential function "win" (and then the terms goes to zero) or does x win (and the term the n goes to infinity)?

The integral is supposed to equal zero.

Last edited: Aug 20, 2008
2. Aug 20, 2008

### Dick

I would split it into two integrals -infinity to zero (where the integrand is x*exp(x)) and zero to +infinity (where the integrand is x*exp(-x)) just to get rid of the absolute value. Its very tricky to handle otherwise as your failed attempt shows. But you don't really even have to do that. f(x)=x*exp(-|x|) is an odd function (i.e. f(-x)=-f(x)). The integral of an odd function over a symmetric interval around the origin is always zero (if it exists). The plus part cancels the minus part.

3. Aug 20, 2008

### Niles

I actually laughed when reading that - you wrote it in a funny way

The argument with the function being odd is good - but just so I have it in my "toolbox" for later, what would I do when I have to evaluate limits like that? What function "wins"?

Thanks.

4. Aug 20, 2008

### Dick

The antiderivative for positive x is F(x)=(-x-1)e^(-x). So for the positive part do F(infinity)-F(0)=0-(-1)=1. (For the infinity part you'll need to take a limit as x -> infinity (-x-1)/e^x, use l'Hopital, you'll find the exponential 'wins' - is that what you mean?). For negative x the antiderivative is F(x)=(x-1)e^(x). F(0)-F(-infinity)=-1-0=-1. Plus and minus parts cancel. Does that help?

5. Aug 20, 2008

### Niles

Ahh, l'Hopital [The Hospital Rule, as my teacher used to say] - I had totally forgotten it.

I solved it - thanks!

6. Aug 20, 2008

You could also try this.

$$\int_{-\infty}^\infty x e^{-|x|} \, dx = \int_{-\infty}^0 x e^{-|x|} \,dx +\int_0^\infty x e^{-|x|} \, dx$$

Since $$x$$ is always positive in the second integral, it is simply

$$\int_0^\infty x e^{-x} \, dx$$

In the first integral, since $$x$$ is always negative,

$$\int_{-\infty}^0 x e^{-|x|} \, dx = \int_{-\infty}^0 x e^x \,dx$$

Set u = -x; the second integral becomes

$$\int_{\infty}^0 (-u) e^{-u} \, (-du) = \int_{-\infty}^0 u e^{-u} \, du = -\int_0^\infty u e^{-u} \, du$$

The original integral is the sum of these two integrals, and since they are negatives of each other, their sum is zero.
This is a long use of the fact that the integrand is an odd function of $$x$$, but the idea of splitting a single integral at zero can be used in other problems.