Evaluate $\int_{0}^{\infty} (-1)^{\lfloor x\rfloor}\cdot e^{-x} dx $

230 Views Asked by At

I'm having trouble integrating the following:

$$\int_{0}^{\infty} (-1)^{\lfloor x \rfloor}\cdot e^{-x} \, \mathrm{d}x $$

where $\lfloor x \rfloor$ denotes the floor of $x$.

Can you help please?

4

There are 4 best solutions below

2
On

Hint:

First try to calculate $$A_n = \int_{n}^{n+1} (-1)^{[x]} e^{-x} dx$$ where $n$ is an integer.

Then your final result is $A_0 + A_1 + \dots$

2
On

This could work if I didn't make some mistake

$$\int_0^\infty (-1)^{[x]}e^{-x}dx=\sum_{n=0}^\infty\int_n^{n+1}(-1)^ne^{-x}dx=\sum_{n=0}^\infty(-1)^n\left(-e^{-n-1}+e^{-n}\right)=$$

$$=-\frac1e\sum_{n=0}^\infty(-e^{-1})^n+\sum_{n=0}^\infty\left(-e^{-1}\right)^n=\left(1-\frac1e\right)\sum_{n=0}^\infty\left(-e^{-1}\right)^n=$$

$$\frac{e-1}e\cdot\frac1{1+e^{-1}}=\frac{e-1}{e+1}$$

0
On

Observe that in the interval [2k, 2k+1] the integral will be $ \int _{2k} ^{2k+1} e^{-x} dx$, while in [2k+1, 2k+2] it will be $ -\int _{2k+1} ^{2k+2} e^{-x} dx$. Thus your integral can be written as $ \sum _{k=0} ^\infty [\int _{2k} ^{2k+1} e^{-x} -\int _{2k+1} ^{2k+2} e^{-x}] dx$. Evaluate the integrals then sum the resulting geometric series.

0
On

$$ \begin{align} \int_0^N (-1)^{[x]}e^{-x}dx&=\int_0^1 e^{-x}dx-\int_1^2 e^{-x}dx+\cdots\\ &=-e^{-1}+1+e^{-2}-e^{-1}-e^{-3}+e^{-2}+\cdots\\ &=1-2e^{-1}+2e^{-2}-2e^{-3}+\cdots\\ &=\cdots \end{align} $$ Then, you can pass the result to the limit.