[Math] Improper integral of $\exp(-x)|\sin(x)|$

improper-integrals

I encountered the following improper integral: $I=\int\limits_0^\infty {{e^{ – x}}\left| {\sin x} \right|dx}$. I solved the problem as follows:
$I=\int\limits_0^\pi {{e^{ – x}}\sin xdx} – \int\limits_\pi ^{2\pi } {{e^{ – x}}\sin xdx} + \int\limits_{2\pi }^{3\pi } {{e^{ – x}}\sin xdx} + … + {\left( { – 1} \right)^n}\int\limits_{n\pi }^{\left( {n + 1} \right)\pi } {{e^{ – x}}\sin xdx} + …$
Because: $\int {{e^{ – x}}\sin xdx} = \frac{{ – {e^{ – x}}\left( {\sin x + \cos x} \right)}}{2}$ then we have:
$I = \left. {\frac{{ – {e^{ – x}}\left( {\sin x + \cos x} \right)}}{2}} \right|_0^\pi – \left. {\frac{{ – {e^{ – x}}\left( {\sin x + \cos x} \right)}}{2}} \right|_\pi ^{2\pi } + … + {\left( { – 1} \right)^n}\left. {\frac{{ – {e^{ – x}}\left( {\sin x + \cos x} \right)}}{2}} \right|_{n\pi }^{\left( {n + 1} \right)\pi } + …$
or:
$I = 0.5 + 1\left( {{e^{ – \pi }} + {e^{ – 2\pi }} + {e^{ – 3\pi }} + …} \right)= 0.5 + \frac{1}{{{e^\pi } – 1}}$
My question is: Is there any better and more general method to solve this problem, that I can apply in some other similar problems?

Best Answer

Shifting the argument of the integrand by $\pi$ amounts to multiplying by $-e^{-\pi}$.

Assume you know that

$$J=\int_0^\infty e^{-x}\sin x\, dx=\frac12,$$ which is easily established with $e^{-x}\sin x=\Im{e^{(-1+i)x}}\to J=-\Im(-1+i)^{-1}$.

Then

$$K=J+Je^{-\pi}=\frac12(1+e^{-\pi})$$ is the integral of the first arch (i.e. from $0$ to $\pi$), by cancellation of the other arches. And by summing on all rectified arches (that form a geometric series), the requested integral is

$$I=\frac K{1-e^{-\pi}}=\frac12\frac{1+e^{-\pi}}{1-e^{-\pi}}=\frac12\coth\frac\pi2.$$

enter image description here

Related Question