Calculate $\int_0^\infty e^{-\frac{x}{2}}\frac{|\sin x-\cos x|}{\sqrt{\sin x}}\ dx$

calculusclosed-formimproper-integralsintegrationsolution-verification

How to prove that

$$\int_0^\infty e^{-\frac{x}{2}}\frac{|\sin x-\cos x|}{\sqrt{\sin x}}\ dx=\frac{2^{\frac74}e^{\frac{\large-\pi}{8}}}{1-e^{-\pi}}$$

This problem is proposed by a friend and no solution has been submitted yet.

The proposer gives a hint "Calculate the integral on D where D is the set of all values in the domain $(0, +\infty)$ where the integrand is defined."

There was some arguing over the closed form as some claims that it should involve an imaginary part.

I do not know how to start but I tried to determine the domain of the integrand and I could not.

My question is the closed form right? and if so, how to prove it? Thank you.

Best Answer

I would assume that the integral to be computed is $$I=\int_0^\infty e^{-\frac{x}{2}}\frac{|\sin x-\cos x|}{\sqrt{\color{red}|\sin x\color{red}|}}\ dx.$$

Obviously: $$ I=\frac1{1-e^{-\pi/2}}\int_0^\pi e^{-\frac{x}{2}}\frac{|\sin x-\cos x|}{\sqrt{|\sin x|}}\ dx $$ as the function $\frac{|\sin x-\cos x|}{\sqrt{|\sin x|}}$ is $\pi$-periodic.

Now: $$ \int_0^\pi e^{-\frac{x}{2}}\frac{|\sin x-\cos x|}{\sqrt{|\sin x|}}dx= \int_0^{\pi/4} e^{-\frac{x}{2}}\frac{\cos x-\sin x}{\sqrt{\sin x}}dx +\int_{\pi/4}^\pi e^{-\frac{x}{2}}\frac{\sin x-\cos x}{\sqrt{\sin x}}dx\\ =2\left[e^{-\frac{x}{2}}\sqrt{\sin x}\right]_0^{\pi/4} -2\left[e^{-\frac{x}{2}}\sqrt{\sin x}\right]_{\pi/4}^{\pi}=e^{-\pi/8}2^{7/4}, $$ where we used: $$\int e^{-\frac{x}{2}}\frac{\cos x-\sin x}{\sqrt{\sin x}}dx =2\int e^{-\frac{x}{2}}d\sqrt{\sin x}-\int e^{-\frac{x}{2}}\frac{\sin x}{\sqrt{\sin x}}dx\\ =2 e^{-\frac{x}{2}}\sqrt{\sin x}+\int e^{-\frac{x}{2}}\sqrt{\sin x}dx-\int e^{-\frac{x}{2}}\frac{\sin x}{\sqrt{\sin x}}dx\\ =2e^{-\frac{x}{2}}\sqrt{\sin x}. $$