$\int\limits^\infty_{-\infty} xe^{-|(x-u)|} dx = ?$

49 Views Asked by At

I'm trying to solve this integral with absolute values. Wolframalpha shows that $\int\limits^\infty_{-\infty} xe^{-|(x-u)|} dx = 2u$, but when I break the absolute value into two integrals I don't get 2u $$\int\limits^\infty_{-\infty} xe^{-|(x-u)|} dx = \\ \int\limits^0_{-\infty} xe^{(x-u)} dx + \int\limits^\infty_0 xe^{-(x-u)} dx = (e^u-e^{-u})$$

I solve the individual integrals with wolframalpha, am I doing anything wrong here?

2

There are 2 best solutions below

0
On BEST ANSWER

To remove the absolute value in the argument of the exponential, you need that argument to be of constant sign. So you need $x-u \geq 0$ or $x-u\leq 0$. Therefore you should break the integral at $u$, not $0$. In other words $$\int_{-\infty}^{+\infty}=\int_{-\infty}^{u}+\int_{u}^{+\infty}$$

0
On

An easy way to do this is to change coordinates to $y = x - u$ this will transform your integral into: $$\int_{-\infty}^{\infty}(y+u)e^{-\vert y \vert}dy$$

Split it apart:

$$\int_{-\infty}^{\infty}ye^{-\vert y \vert}dy + \int_{-\infty}^{\infty}ue^{-\vert y \vert}dy$$

The first integral is an even function multiplied by an odd, so it's integral is zero.

The second is an even function and can be rewritten again:

$$2u\int_{0}^{\infty} e^{-y}dy = 2u$$