1. ## evaluation of an integral

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

I wrote the integral as $\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 $2 \int_{0}^{a} \frac{1}{\sqrt{1-t^{2}}} \arctan \sqrt{\frac{1-t}{1+t}} \ dt$.

Finally I let $t= \cos 2z$ and got $\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 $\frac{1}{2a} \arcsin (a) \Big(\pi \sqrt{a^{2}} - a\arcsin (a) \Big)$ which reduces to my solution if $a$ is real and positive.

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

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

2. ## Re: evaluation of an integral

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

I wrote the integral as $\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 $2 \int_{0}^{a} \frac{1}{\sqrt{1-t^{2}}} \arctan \sqrt{\frac{1-t}{1+t}} \ dt$.

Finally I let $t= \cos 2z$ and got $\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 $\frac{1}{2a} \arcsin (a) \Big(\pi \sqrt{a^{2}} - a\arcsin (a) \Big)$ which reduces to my solution if $a$ is real and positive.

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

EDIT: It's not the solution for $a= \frac{1}{2}$ either.
If its any help here is a plot of the numerical integral

3. ## Re: evaluation of an integral

I don't see how $\frac{\pi}{2} \arcsin (a)$ can ever be the solution (except for a=0). Perhaps Wolfram Alpha sometimes makes an incorrect simplification.

4. ## Re: evaluation of an integral

Originally Posted by Random Variable
I don't see how $\frac{\pi}{2} \arcsin (a)$ can ever be the solution (except for a=0). Perhaps Wolfram Alpha sometimes makes an incorrect simplification.
When faced with difficulties of the kind we have with this integral I always ask myself why do I need to know? There may be ways of approximating this that meet your needs without having a closed form expression for the integral itself.

For instance for small $a$ we may expand the log as a power series and we end up with a simpler integrals.

CB