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?
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?
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}$$
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.
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$