# Integral $\int_{-\pi/2}^{\pi/2} \frac{e^{|\sin x|}\cos x}{1+e^{\tan x}}$

This question was given in an eBook. I was checking out recently and I can't really find the answer to this question. Let me tell you that I am a bit of a novice on this topic of integration right now so I would request you to answer this accordingly.

$$\int_{-\pi/2}^{\pi/2} \frac{e^{|\sin x|}\cos x}{1+e^{\tan x}}$$

So I first tried it using $$\int_{b}^a f(x)dx=\int_{b}^a f(a+b-x)dx$$ after splitting the integration in the limits $$0\to\frac{\pi}{2}$$ and $$\,-\frac{\pi}{2} \to0$$ because of the mod. Then I scratched it and tried integration by parts. But it seems everything just goes way outside the league of the question.

Well I hope you are able to solve it and help me. Cheers.

with $x=-t$ $$I=\int_{-\pi/2}^{\pi/2} \frac{e^{|\sin t|}\cos t}{1+e^{-\tan t}}\mathrm dt$$ sum this with the initial integral and notice that $e^{|\sin x|}\cos x$ is an even function, therefore: $$I=2\frac12\int_{0}^{\pi/2} e^{\sin x} \cos x \mathrm dx$$ because $\sin x$ is positive for $x\in [0,\frac{\pi}{2}],$now just substitute $\sin x= u$ to get: $$I=\int_0^1 e^u du=e-1$$

Hint:

Here $a+b=0$

$I=\displaystyle\int_{\pi/2}^{-\pi/2}\dfrac{e^{|\sin x|}\cos x}{1+e^{\tan x}}$

$=\displaystyle\int_{\pi/2}^{-\pi/2}\dfrac{e^{|\sin(- x)|}\cos(-x)}{1+e^{\tan(-x)}}=\int_{\pi/2}^{-\pi/2}\dfrac{e^{\tan x}e^{|\sin x|}\cos x}{1+e^{\tan x}}$

$$I+I=\int_{\pi/2}^{-\pi/2}e^{|\sin x|}\cos x\ dx$$

Now split from $-\pi/2,0$ and $0,\pi/2$