How to compute integral $\int_0^\infty |\sin x|e^{-x}dx$ When I plug 
$$\int_0^\infty |\sin x|e^{-x}dx$$
into symbolab, it tells me the first step is to find the equivalent expression for the integrand at $0\leq x \leq \infty$. It says this expression is $\sin (x) e^{-x}dx$.
I don't understand this because on $0\leq x \leq \infty$, $\sin x$ is not just zero or a positive number. It can be negative so you can't just remove the absolute value bars.
 A: Note,
$$I=\int_0^\infty e^{- x}|\sin x| \ dx$$
$$=\int_0^\pi e^{- x}|\sin x| \ dx + \int_\pi^{2\pi} e^{-x}|\sin x| \ dx+\int_{2\pi}^{3\pi} e^{- x}|\sin x| \ dx+\cdots $$
For each integral $\int_{n\pi}^{n\pi+\pi} e^{- x}|\sin x| \ dx$, make the variable change $x=n\pi+t$ to obtain,
$$I=\left(1 + e^{-\pi} + e^{-2\pi} + e^{-3\pi}+\cdots\right)\int_0^{\pi} e^{- t}\sin t \ dt$$
$$=\frac1{1-e^{-\pi}}\frac{1+e^{-\pi}}2=\frac12\coth\frac\pi2$$
A: HINT
$\int_0^{\infty}|\sin{x}|e^{-x}dx=\sum_{n=0}^{\infty}\int_{n \pi}^{(n+1)\pi}|\sin{x}|e^{-x}dx=\sum_{n=0}^{\infty}(-1)^n\int_{n \pi}^{(n+1)\pi}\sin{x}e^{-x}dx$
A: Notice that, for any $n \in \mathbb{N}$, you get that:
$$\int_{(n-1)\pi}^{n\pi} \sin(x) e^{-x} dx = -\frac{1}{2}(-1)^ne^{-n\pi}\left(e^{\pi} + 1\right).$$
Notice that:
$$\int_{(n-1)\pi}^{n\pi} |\sin(x)| e^{-x} dx = 
+\frac{1}{2}e^{-n\pi}\left(e^{\pi} + 1\right).$$
Therefore:
$$\int_{0}^{+\infty} |\sin(x)| e^{-x} dx = \sum_{n=1}^{+\infty}\int_{(n-1)\pi}^{n\pi} |\sin(x)| e^{-x} dx = \\ =\sum_{n=1}^{+\infty} \frac{1}{2}e^{-n\pi}\left(e^{\pi} + 1\right) =
\frac{1}{2}\left(e^{\pi} + 1\right)\sum_{n=1}^{+\infty} e^{-n\pi} = \\
= \frac{1}{2}\left(e^{\pi} + 1\right)\sum_{n=1}^{+\infty} \left(e^{-\pi}\right)^{n} = \frac{1}{2}\left(e^{\pi} + 1\right) \frac{e^{-\pi}}{1-e^{-\pi}}= \frac{1}{2}\frac{e^{\pi} + 1}{e^{\pi}-1}.$$
Remark
Notice that the integral can be split into an infinite number of integrals since: 
$$[0, +\infty)  = [0, \pi) \cup [\pi, 2\pi) \cup \ldots = \bigcup_{n=1}^{+\infty}[(n-1)\pi, n\pi).$$
More specifically, the set $[0, +\infty)$ can be expressed as the infinite union of several finite disjoint sets.
