Does this integral have a closed form? I was working with this problem in an exam:
Given $\lambda\in(-1,1)\subset\Bbb R$, find 
$$f
   (\lambda)=\int_{0}^{\pi}\ln\left(1+\lambda \cos x\right)\mathrm{d}x
$$
My try: put $\delta\in (0,1)$ such that $\lambda\in(-\delta,\delta)$. Using the power series of $\ln(1+x)$ and uniform convergence to take $\sum_{n=0}^\infty$ outside $\int_{0}^{\pi}$, finally, I got this:
$$f(\lambda)=-\sum_{k=1}^\infty{(2k-1)!!\over (2k)!!}{\lambda^{2k-1}\over 2k}$$
But I still wonder if there is a closed form for $f(\lambda)?$ And is my solution above right or wrong?

Cool question, with some nice answers.
Let's look at using the method suggested at the end of user117487's post, the Feynman trick of differentiating under the integral sign, which happens to be my favourite technique for integration. Note that
$$f'(\lambda) = \int_0^{\pi} \frac{\cos x}{1 + \lambda \cos x} \, \mathrm{d}x,$$
upon which adding and subtracting a certain integral becomes
$$
\lambda \, f'(\lambda) = \pi - \int_0^{\pi} \frac{1}{1 + \lambda \cos x} \, \mathrm{d}x.
$$
Let's evaluate the remaining integral, using the Weierstrass substitution 
\begin{align}
t & = \tan \frac{x}{2}, \\
\cos x & = \frac{1 - t^2}{1 + t^2}, \\
\mathrm{d}x & = \frac{2 \,\mathrm{d}t}{1 + t^2}.
\end{align}
Then the integral is 
$$
\int_0^{\infty} \! \frac{2 \ \mathrm{d}t}{1+\lambda+(1-\lambda)t^2}
$$
Let $$t=\sqrt{\frac{1+\lambda}{1-\lambda}}\ u,$$
then we have
$$
2\sqrt{\frac{1}{1-\lambda^2}} \int_0^{\infty} \! \frac{ \mathrm{d}u}{1+u^2} = \frac{\pi}{\sqrt{1-\lambda^2}}.
$$
From previously, 
$$
f(\lambda) = \pi \log \lambda - \pi \int \frac{\mathrm{d} \lambda}{\lambda\sqrt{1-\lambda^2}}.
$$
The remaining integral is fairly standard, so we obtain
$$
f(\lambda) = \pi \log \left( 1 + \sqrt{1-\lambda^2} \right) + c.
$$
Using the fact that $f(0) = 0$ gives $c=-\pi\log 2$, and we arrive at the same result given by the other posters.
