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?

Here is the outline of a solution using complex analysis.
For $a > 1$, the integral $J_a = \int_0^{\pi} \ln(1 + 2a\cos t + a^2) \, dt$ has the value $2\pi \ln a$, and this integral essentially reduces to yours for an appropriate choice of $a$, but with an extra constant term.
To calculate the value of $J_a$, you can show that it is really $\int_\gamma \ln(a + z)/iz \, dz$ where $\gamma$ is the unit circle, described counterclockwise. To do this, break the integral into the top and bottom semicircle, parametrizing both from $0$ to $\pi$, going from right to left on each semicircle. Then subtract the bottom integral from the top one to obtain $J_a$.
By the residue theorem, the integral is $2\pi i$ times the residue at $0$, which is $(\ln a)/i$.  
An alternative way to compute $J_a$ is to calculate the exact value, using trigonometry, of a Riemann sum with $n$ equally spaced points. This turns out to be: $$2\pi \ln a + \frac{\pi}{n} \ln \left[ \frac{1 + a}{1 - a}(a^{-2n} - 1) \right]$$ which tends to $2 \pi \ln a$. This last calculation is carried out in full in Cours de mathématiques spéciales (1991) by Ramis, Volume 3, p. 207.
Here is an idea for a third solution, though I haven't carried out the details. Integrating under the integral sign gives
$$f'(\lambda) = \int_0^{\pi} \frac{\cos x}{1 + \lambda \cos x} \, dx.$$
Now compute the integral on the right (easier said than done), integrate the resulting function of $\lambda$, and use $f(0) = 0$ to find $f(\lambda)$.
