# Wierd Integral

1. Apr 8, 2008

### Feldoh

Why does this work?

Or maybe a better question is how do you evaluate this integral? Integrate a piecewise function? I tried that an got 0

2. Apr 8, 2008

### TMM

You subtracted when you should've added. It's definitely 2.

3. Apr 8, 2008

### Feldoh

I get $$-e^{-x}, x> 0 -- e^x, x<0$$ But I'm unsure as how to go about solving that.

I evaluated it like this:

$$-e^{-x}|_{x=inf} - e^{x}|_{x=-inf}$$ but that's clearly wrong XD

Last edited: Apr 8, 2008
4. Apr 8, 2008

### therector24

an Improper integral

you have to Divide the integral in to two
the first is from -∞ to 0 & the second is from 0 till ∞ and
HINT: this is an improper integral, consider taking the limit
for example limC goes to -∞ (of your integral)
lim D goes to ∞ (of your integral).
and continue.

5. Apr 8, 2008

### sutupidmath

$$\int_{-\infty}^{\infty}e^{-|t|}dt=\lim_{a\rightarrow -\infty}\int_{a}^{c}e^{-|t|}dt+\lim_{b\rightarrow \infty}\int_{c}^{b}e^{-|t|}dt$$

Now,

$$e^{-|t|}=e^{-t}, t>0$$ and $$e^{t},t<0$$
YOu can choose c to be any point between negative infinity and positive infinity. Let c=0 so

$$\int_{-\infty}^{\infty}e^{-|t|}dt=\lim_{a\rightarrow -\infty}\int_{a}^{0}e^{t}dt+\lim_{b\rightarrow \infty}\int_{0}^{b}e^{-t}dt$$

6. Apr 8, 2008

### Feldoh

Yeah I figured it out earlier today. You can do that method or since the function is even throw out the absolute value and evaluate the integral from 0 to infinity and multiply by 2.