I am trying to evaluate this integral, where $a<1$ $$\int_{0}^{\pi\over 2}{\mathrm dx\over \cos(x)+\cos^2(x)}\ln\left({1+a\cos(x)\over 1-a\cos(x)}\right)$$
It is look obvious to enforce a substitution of $u=cos(x)$ because of it commonly appeared in the integral.
$\sin(x)=\sqrt{1-u^2}$
$\mathrm du=-\sin(x)\mathrm dx=-\sqrt{1-u^2}\mathrm dx$
which lead to
$$\int_{0}^{1}{\mathrm du\over (u+u^2)\sqrt{1-u^2}}\ln\left({1+au\over 1-au}\right)$$
This part $\ln\left({1+au\over 1-au}\right)$ still not simplify, so we make a substitution of $v=\ln\left({1+au\over 1-au}\right)$
which lead to after a very long process of simplification
$$\int_{0}^{k}ve^{v\over 2}\cdot{e^v+1\over e^v-1}\cdot{\mathrm dv\over a(e^v+1)+e^v-1}$$ where $k=\ln\left({1+a\over 1-a}\right)$
This is now involving hyperbolic functions, but I don't how to use it. Where
$\tanh\left(v\over 2\right)={e^v-1\over e^v+1}$
$2e^v\sinh(v)=e^v-1$
$2e^v\cosh(v)=e^v+1$
This is how far I got to, unfortunately I can't continued. Can anyone please point me in the right direction to complete the calculation or help to evalaute the integral. Thank.
Let $I(a) = \int_0^{\pi/2} \frac{1}{\cos x(1+\cos x)}\ln(\frac{1+a\cos x}{1-a \cos x})dx$. Then $I'(a) = \int_0^{\pi/2} \frac{1}{1+\cos x}[\frac{1}{1+a\cos x}+\frac{1}{1-a\cos x}]dx$. Let $J(a) = \int_0^{\pi/2} \frac{1}{1+\cos x}\frac{1}{1+a\cos x}dx$. Then $\theta = \tan(\frac{x}{2})$ gives $J(a) = \int_0^1 \frac{1+\theta^2}{1+\theta^2+a(1-\theta^2)}d\theta$. Note $J(a) = \frac{1}{1-a}-\frac{2a\arctan(\sqrt{\frac{1-a}{1+a}})}{(1-a)\sqrt{1-a^2}}$ (the indefinite integral is the same thing but with an $\theta$ replacing the top "1" in the first term, and a $\theta$ in the arctan in the second term). So, $I'(a) = J(a)+J(-a)$ is determined. I have to go now, but this should be enough.