Let $f$ be the function from $\mathbb { R }$ to $\mathbb { R }$ defined by $f ( x ) = \int _ { 0 } ^ { \pi } \ln \left( x ^ { 2 } - 2 x \cos \theta + 1 \right) \mathrm { d } \theta$.
Show that $f$ is differentiable on $\mathbb { R } \backslash \{ - 1,1 \}$ and that $$\forall x \in \mathbb { R } \backslash \{ - 1,1 \} \quad f ^ { \prime } ( x ) = \int _ { 0 } ^ { \pi } \frac { 2 x - 2 \cos \theta } { x ^ { 2 } - 2 x \cos \theta + 1 } \mathrm { ~d} \theta$$
Let $f$ be the function from $\mathbb { R }$ to $\mathbb { R }$ defined by $f ( x ) = \int _ { 0 } ^ { \pi } \ln \left( x ^ { 2 } - 2 x \cos \theta + 1 \right) \mathrm { d } \theta$.

Show that $f$ is differentiable on $\mathbb { R } \backslash \{ - 1,1 \}$ and that
$$\forall x \in \mathbb { R } \backslash \{ - 1,1 \} \quad f ^ { \prime } ( x ) = \int _ { 0 } ^ { \pi } \frac { 2 x - 2 \cos \theta } { x ^ { 2 } - 2 x \cos \theta + 1 } \mathrm { ~d} \theta$$