Evaluate using differentiation under the sign of integration: $\int_{0}^{\pi} \frac {\ln (1+a\cos (x))}{\cos (x)} dx$ Evaluate by using the rule of differentiation under the sign of integration $\int_{0}^{\pi} \dfrac {\ln (1+a\cos (x))}{\cos (x)} \textrm {dx}$.
My Attempt:
Given integral is $\int_{0}^{\pi} \dfrac {\ln(1+a\cos (x))}{\cos (x)}$. Here $a$ is the parameter so let
$$F(a)=\int_{0}^{\pi} \dfrac {\ln (1+a\cos (x))}{\cos (x)} \textrm {dx}$$
Differentiating both sides w.r.t $a$
$$\dfrac {dF(a)}{da} = \dfrac {d}{da} \int_{0}^{\pi} \dfrac {\ln (1+a\cos (x))}{\cos (x)} \textrm {dx}$$
By Leibnitz Theorem:
$$\dfrac {dF(a)}{da} = \int_{0}^{\pi} \dfrac {1}{1+a\cos (x)} \times \dfrac {1}{\cos (x)} \times \cos (x) 
 \textrm {dx}$$
$$\dfrac {dF(a)}{da}=\int_{0}^{\pi} \dfrac {dx}{1+a\cos (x)} \textrm {dx}$$
Now writing $\cos (x)= \dfrac {1-\tan^{2} (\dfrac {x}{2})}{1+\tan^2 (\dfrac {x}{2})}$ and proceeding with integration becomes quite cumbersome to carry on. Is there any way to simplify with some easy steps?

Integrating further is not actually cumbersome, let $tan(\frac{x}{2})=t\\\implies dx=\frac{2dt}{1+t^2}$
The above follows from basic trig identities..
Thus, on changing the limits, we have $$\frac{dF(a)}{da}=\int_0^{\infty}\frac{2dt}{(1-a)t^2+(a+1)}$$
The antiderivative is given by (this is a pretty standard integral..)
$$\frac{2}{\sqrt{1-a^2}}\arctan\bigg(\frac{t\sqrt{1-a}}{\sqrt{1+a}}\bigg)+C$$
Evaluating the limits, we have
$$\frac{dF(a)}{da}=\frac{\pi}{\sqrt{1-a^2}}$$
Now this is again a standard integral in the variable $a$, evaluating this, finally we have,
$$F(a)=\pi\arcsin(a)+C$$
Since when a=0, the integral is 0, we have C=0
$$F(a)=\pi\arcsin(a)$$
