<s>[INST] How do I evaluate this integral $\int_0^\pi{\frac{{{x^2}}}{{\sqrt 5-2\cos x}}}\operatorname d\!x$? 
Show that $$\int\limits_0^\pi{\frac{{{x^2}}}{{\sqrt 5-2\cos x}}}\operatorname d\!x =\frac{{{\pi^3}}}{{15}}+2\pi \ln^2 \left({\frac{{1+\sqrt 5 }}{2}}\right).$$

I don't have any idea how to start, but maybe I could use the Polylogarithm.
 [/INST] Using the identity $$ \sum_{k=0}^{\infty} a^{k} \cos(kx) = \frac{1- a \cos x}{1-2a \cos x + a^{2}} \ \  ( |a| <1) ,$$
one finds that  $$ 1 + 2 \sum_{k=1}^{\infty} a^{k} \cos(kx) = \frac{1-a^{2}}{1-2a \cos x +a^{2}}.$$
Therefore
$$ \begin{align} \int_{0}^{\pi} \frac{x^{2}}{1-2a \cos x+a^{2}} \ dx &= \frac{1}{1-a^{2}} \Big( \int_{0}^{\pi} x^{2} \ dx + 2 \int_{0}^{\pi}x^{2} \sum_{k=1}^{\pi} a^{k} \cos (kx) \ dx \Big) \\ &= \frac{1}{1-a^{2}} \Big(\frac{\pi^{3}}{3} + 2 \sum_{k=1}^{\infty} a^{k} \int_{0}^{\pi} x^{2} \cos(kx) \ dx \Big) \\ &=\frac{1}{1-a^{2}} \Big( \frac{\pi^{3}}{3} + 2 \sum_{k=1}^{\infty}a^{k} \frac{2 \pi (-1)^{k}}{k^{2}} \Big) \\ &= \frac{1}{1-a^{2}} \Big( \frac{\pi^{3}}{3} +4 \pi \sum_{k=1}^{\infty}\frac{(-a)^{k}}{k^{2}} \Big) \\ &= \frac{1}{1-a^{2}} \Big(\frac{\pi^{3}}{3} + 4 \pi \ \text{Li}_{2}(-a) \Big) . \end{align}$$
Now express the integral as $$  \frac{1}{1+a^{2}} \int_{0}^{\pi} \frac{x^{2}}{1- \frac{2a}{1+a^{2}} \cos x} \ dx$$
and let  $ \displaystyle a = \frac{1}{\varphi}$ where $\varphi$ is the golden ratio.
Then we have$$ \begin{align} \frac{1}{1+\varphi^{-2}} \int_{0}^{\pi} \frac{x^{2}}{1-\frac{2 \varphi^{-1}}{1+\varphi^{-2}} \cos x} \ dx &= \frac{1}{1+\varphi^{-2}} \int_{0}^{\pi} \frac{x^{2}}{1-\frac{2}{\sqrt{5}} \cos x} \ dx \\ &=\frac{\sqrt{5}}{1+\varphi^{-2}} \int_{0}^{\pi} \frac{x^{2}}{\sqrt{5}-2 \cos x} \ dx \\ &= \frac{1}{1-\varphi^{-2}} \Big(\frac{\pi^{3}}{3} + 4 \pi \ \text{Li}_{2} (- \frac{1}{\varphi}) \Big) \\ &= \frac{1}{1-\varphi^{-2}} \Big(\frac{\pi^{3}}{15} + 2 \pi \ln^{2} (\varphi) \Big) \end{align} $$ 
which implies $$ \begin{align} \int_{0}^{\pi} \frac{x^{2}}{\sqrt{5}-2 \cos x} \ dx &= \frac{1}{\sqrt{5}} \frac{1+\varphi^{-2}}{1- \varphi^{-2}} \Big(\frac{\pi^{3}}{15} + 2 \pi \ln^{2} (\varphi) \Big) \\ & = \frac{1}{\sqrt{5}} \sqrt{5}\Big(\frac{\pi^{3}}{15} + 2 \pi \ln^{2} (\varphi) \Big) \\ &= \frac{\pi^{3}}{15} + 2 \pi \ln^{2} (\varphi) . \end{align} $$
</s>