Expansion of $\log|x-y|$ in Chebyshev polynomials

I have come across the following identity $$-\log|x-y|=\log 2+\sum_{n\geq 1}\frac{2}{n}T_n(x)T_n(y)\qquad -1\leq x,y\leq 1$$ where $T_n(x)$ are Chebyshev polynomials. The identity seems to hold numerically, but I am at a loss on how to prove it, or whether there is a standard reference where I could look it up. Any help is appreciated!

• Did you read it somewhere or did you stumble upon it after some random computation ? (Do you already have a reference, even without a proof ?) – charmd Jun 5 '18 at 9:00
• @charMD I have read it somewhere - and got rather stunned by it! - but I cannot retrieve the reference...from what I remember, the paper I found it in did not contain a proof anyway... – Pierpaolo Vivo Jun 5 '18 at 9:22

The identity follows easily from $T_n(x)=\cos(n\,\arccos(x)).$ Letting $X=\arccos(x)$ and $Y=\arccos(y)$, use the logarithmic power series with a complex argument, and subsequent simplification will yield
$$\sum_{n=1}^\infty \frac{\cos(nX)\cos(nY)}{n} = \frac{-1}{4} \Big( \log(2-2\cos(X+Y)) +\log(2-2\cos(X-Y)) \Big) ,$$
$$\sum_{n=1}^\infty \frac{T_n(x) \, T_n(y)}{n} + \frac{\log2}{2}= \frac{-1}{4} \Big( \log(1-\cos(\arccos(x)+\arccos(y))) + \\\log(1-\cos(\arccos(x)-\arccos(y))) \Big) .$$
Use $\cos(\arccos(x) \pm \arccos(y))= xy\, \mp \sqrt{1-x^2}\,\sqrt{1-y^2}.$ With the domain for your $x$ and $y$, the two logarithms can be combined and algebra will complete the proof.