# Anti-derivative of a function containing a log and a sine.

Let $t\in (-1,1)$ and $\theta \in (0, 2\pi)$ be real numbers.

In Closed-form of $\int_0^1 \frac{\operatorname{Li}_2\left( x \right)}{\sqrt{1-x^2}} \,dx$ Vladimir Reshetnikov gave the following anti-derivative: \begin{eqnarray} I(t):=\int \log(1-t \cos(\theta)) d\theta = \theta \log(\frac{1+\sqrt{1-t^2}}{t})-2 Im [Li_2(\frac{1-\sqrt{1-t^2}}{t}\cdot e^{\imath \theta})] \end{eqnarray} See formula (3) in his answer.

Now, below we calculate the same anti-derivative as follows: \begin{eqnarray} I(t)&=&\int \theta^{'} \log(1-t \cos(\theta)) d\theta\\ &=&\theta \cdot \log(1-t \cos(\theta))-\int\theta \frac{t \sin(\theta)}{1-t \cos(\theta)} d\theta\\ &=& \theta \cdot \log(1-t \cos(\theta))+\frac{t}{\imath} \int \log(z) \cdot \underbrace{\frac{z^2-1}{2 z-t(z^2+1)}\cdot \frac{1}{z}}_{\frac{1}{t z} - \frac{2}{t} \frac{-1+t z}{t-2 z+t z^2}} dz\\ &=& -\imath \frac{\theta^2}{2} + \theta \cdot \log(-\frac{t}{2}) + \imath Li_2(\frac{1+\sqrt{1-t^2}}{t} \cdot e^{\imath \theta})+\imath Li_2(\frac{1-\sqrt{1-t^2}}{t} \cdot e^{\imath \theta}) \end{eqnarray} The first line above is obvious. In the second line we integrated by parts. In the third line we substituted for $z=\exp(\imath \theta)$ and then decomposed the integrand into partial fractions. Now it is clear that the integral will reduce to elementary functions plus di-logarithms. There are standard ways of doing such integrals so we just used Mathematica to produce the result. Having done that we spent some time simplifying it. Finally we differentiated our result to make sure there was no bug.

Now, clearly our result differs from that of Vladimir Reshetnikov. Therefore the question is to show that the two results differ only by a constant. How would you show that?