Originally Posted by

**Random Variable** $\displaystyle \int_{0}^{\frac{\pi}{2}} \frac{\ln(1+ a \cos x)}{\cos x} \ dx \ \ a>0$

I wrote the integral as $\displaystyle \int_{0}^{\frac{\pi}{2}} \int_{0}^{a} \frac{1}{1+t \cos x} \ dt \ dx $.

Then I switched the order of integration and used Weierstrass substitution to get $\displaystyle 2 \int_{0}^{a} \frac{1}{\sqrt{1-t^{2}}} \arctan \sqrt{\frac{1-t}{1+t}} \ dt $.

Finally I let $\displaystyle t= \cos 2z $ and got $\displaystyle \frac{1}{2} \Big(\frac{\pi^{2}}{4} - \arccos^{2}(a) \Big) = \frac{1}{2} \arcsin (a) \Big(\pi - \arcsin (a) \Big) $

Sometimes Wolfram Alpha returns $\displaystyle \frac{1}{2a} \arcsin (a) \Big(\pi \sqrt{a^{2}} - a\arcsin (a) \Big) $ which reduces to my solution if $\displaystyle a $ is real and positive.

But other times it returns $\displaystyle \frac{\pi \sqrt{a^{2}}}{2a} \arcsin(a) $ which reduces to $\displaystyle \frac{\pi}{2} \arcsin (a) $ if $\displaystyle a$ is real and positive. On another forum this was stated as the solution. But this cannot be the solution for when $\displaystyle a >1 $ and it's not even the solution for when $\displaystyle a= 1 $. Is it the solution for $\displaystyle 0<a<1$?

EDIT: It's not the solution for $\displaystyle a= \frac{1}{2} $ either.