<s>[INST] How to find $\int_{0}^{\pi} \ln (b \cos x+c)$ without using Feynman’s integration technique? I shall find the integral by Feynman’s Technique Integration on a particular integral
$\displaystyle I(a)=\int_{0}^{\pi} \ln (a \cos x+1) d x,\tag*{} $
where $-1\leq a \leq 1.$
$\displaystyle \begin{aligned}I^{\prime}(a) &=\int_{0}^{\pi} \frac{\cos x}{a \cos x+1} d x, \\&=\frac{1}{a} \int_{0}^{\pi} \frac{(a \cos x+1)-1}{a \cos x+1} d x \\&=\frac{\pi}{a}-\frac{1}{a} \int_{0}^{\pi} \frac{d x}{a \cos x+1} \\&\stackrel{t=\tan \frac{x}{2}}{=} \frac{\pi}{a}-\frac{1}{a} \int_{0}^{\infty} \frac{1}{1+\frac{a\left(1-t^{2}\right)}{1+t^{2}}} \cdot \frac{2 d t}{1+t^{2}} \\&=\frac{\pi}{a}-\frac{2}{a} \int_{0}^{\infty} \frac{d t}{(1-a) t^{2}+(1+a)} \\&=\frac{\pi}{a}-\frac{2}{a \sqrt{1-a^{2}}} \tan^{-1}\left[\frac{\sqrt{1-a} t}{\sqrt{1+a}}\right]_{0}^{\infty} \\&=\frac{\pi}{a}-\frac{\pi}{a \sqrt{1-a^{2}}}\end{aligned}\tag*{} $
Integrating both sides w.r.t. $a$ yields
\begin{aligned}\int I^{\prime}(a) d a &=\pi\int\left(\frac{1}{a}-\frac{1}{a \sqrt{1-a^{2}}}\right) da \\& \stackrel{a=\sin \theta}{=} \pi\int\left(\frac{1}{\sin \theta}-\frac{1}{\sin \theta \cos \theta}\right) \cos \theta d \theta \\&=\pi\int \frac{\cos \theta-1}{\sin \theta} d \theta\\&I(a) =\pi \int \frac{-\sin ^{2} \theta}{\sin \theta(\cos \theta+1)} d \theta\\&=\pi \ln (1+\cos \theta) +C\end{aligned}
Putting $a=0$ gives $C=-\pi\ln 2$ and hence
$$
\boxed{\int_{0}^{\pi} \ln (a \cos x+1) d x =\pi \ln \left[1+\cos \left(\sin ^{-1} a\right)\right]= \pi \ln \left(\frac{1+\sqrt{1-a^{2}}}{2}  \right)}
$$
I now want to generalize it to
$$I(b,c)=\displaystyle \int_{0}^{\pi} \ln (b \cos x+c),\tag*{} $$
where $c\neq 0$ and $-1\leq \frac{b}{c} \leq 1.$
$$
\begin{aligned}
I(b,c)&=\int_{0}^{\pi} \ln (b \cos x+c) \\
&=\int_{0}^{\pi} \ln \left[c\left(\frac{b \cos x}{c}+1\right)\right] \\
&=\pi \ln c+\int_{0}^{\pi} \ln \left(\frac{b}{c} \cos x+1\right) d x \\
&=\pi \ln c+I\left(\frac{b}{c}\right)
\end{aligned}
$$
Putting $a=\frac{b}{c}$ yields
$$\boxed{\int_{0}^{\pi} \ln (b \cos x+c) = \pi\left[\ln c+\ln \left(1+\sqrt{1-\frac{b^{2}}{c^{2}}}\right)\right] = \pi \ln \left(\frac{c+\sqrt{c^{2}-b^{2}}}{2}\right)}
$$
For example,
$$
\int_{0}^{\pi} \ln (\cos x+1)=\pi \ln \left(\frac{1}{2}\right)=-\pi \ln 2;
$$
$$
\int_{0}^{\pi} \ln (\sqrt{3} \cos x+2) d x=\pi\ln \frac{3}{2} 
$$
Is there any  method other than Feynman’s integration technique?
 [/INST] Concerning the antiderivative
$$I=\int \log (b \cos (x)+c)\,dx=2\int \frac 1{t^2+1}\Big[\log[ (c-b)t^2+(b+c)]-\log(t^2+1)\Big]\,dt$$ But
$$\log[ (c-b)t^2+(b+c)]=\log(c-b)+\log \left(t-\sqrt{\frac{b+c}{b-c}}\right)+\log \left(t+\sqrt{\frac{b+c}{b-c}}\right)$$
Now, using
$$\frac 1{t^2+1}=\frac 1{(t+i)(t-i)}=\frac i2  \left(\frac{1}{t+i}-\frac{1}{t-i}\right)$$ we face four integrals
$$J(\alpha,\beta)=\int \frac {\log(t+\alpha)}{t+\beta}\,dt=\text{Li}_2\left(\frac{t+\alpha }{\alpha -\beta }\right)+\log (t+\alpha ) \log
   \left(\frac{\beta +t}{\beta -\alpha }\right)$$
</s>