I am not able to solve the following integration, $$\int_{0}^{\pi} \frac{1}{1+3^{\cos x}} dx.$$ I have tried in different ways but most good one I think,
\begin{align*} \int_{0}^{\pi} \frac{1}{1+3^{\cos x}} dx &= \int_{0}^{\pi} \frac{\sin x}{\sin x (1+3^{\cos x})} \\ &= \int_{-1}^{1} \frac{dz}{\sqrt{1-z^2} (1+3^{z})}.\end{align*} Now how could I proceed. Please help me.

- 1,933
-
See https://math.stackexchange.com/questions/439851/evaluate-the-integral-int-frac-pi2-0-frac-sin3x-sin3x-cos3x/439856#439856 – lab bhattacharjee Feb 05 '20 at 08:30
2 Answers
$$I=\int_{0}^{\pi} \frac{dx}{1+3^{\cos x}}$$ Use $$\int_{0}^{a} f(x) dx=\int_{0}^{a} f(a-x) dx.$$ $$I = \int_{0}^{\pi} \frac{dx}{1+3^{-\cos x}}.$$ Adding these two we get $$2I=\int_{0}^{\pi} 1 dx\implies I=\frac{\pi}{2}$$
Just for the fun of it.
Dr Zafar Ahmed DSc provided the good solution.
For the fun of it, I did consider the more general problem of $$\int_{a}^{\pi-a} \frac{dx}{1+k^{\cos x}} $$
Expanding the integrand as a Taylor series built around $x=\frac \pi 2$ we have $$\frac{1}{1+k^{\cos x}}=\frac{1}{2}+\frac{\log (k)}{4} \left(x-\frac{\pi }{2}\right) -\frac{\log (k) \left(\log ^2(k)+2\right)}{48} \left(x-\frac{\pi }{2}\right)^3 +\frac{\log(k)\left(\log ^4(k)+5 \log ^2(k)+1\right)}{480} \left(x-\frac{\pi }{2}\right)^5 +O\left(\left(x-\frac{\pi }{2}\right)^7\right)$$ which, as expected, shows only odd powers of $\left(x-\frac{\pi }{2}\right)$.
As a result $$\int_{a}^{\pi-a} \frac{dx}{1+k^{\cos x}}= \frac{\pi }{2}-a\qquad \forall k >0$$

- 260,315