# An integral of a cosine multiplied by a log of a cosine

My integration is rather rusty these days so I am keen to get any available help. I would like to find a general expression for the following integral (preferably in closed form, but a series representation would also be helpful) $$I_{l,m}=\int_0^{2π}{\rm d}x\left(\int_0^{2π}{\rm d}y\ln(1-\cos(x-y))\cos\left(\frac{lx+my}{2}\right)\right)$$ where $$l$$ and $$m$$ are both integers and $$\ln$$ is the natural logarithm. Mathematica will evaluate the integral for individual pairs of integers $$(l,m)$$ but not the general integral.

A few observations:

• When $$l$$ and $$m$$ are both odd, $$I_{l,m}$$ appears to take the form $$Q+Q\ln2$$, where $$Q$$ is a rational number, but I don’t have expressions for these in terms of $$l$$ and $$m$$.

• When $$l+m=0$$ with $$l$$ even and non-zero, $$I_{l,m}$$ appears to take the form $$(-8π^2)/|l|$$, although I haven’t proven this. When $$l=m=0$$

• Otherwise $$I_{l,m}$$ appears to vanish.

Therefore it’s really the case when $$l$$ and $$m$$ are both odd that I’m interested in. The weakness of the log singularity when $$x=y$$ means that the integral is well-defined (I believe), but I don’t think you can use the Taylor expansion for $$\ln(1+x)$$ because the resulting summation doesn’t commute with the integrals (I don’t think the dominated convergence theorem is valid here). Thanks in advance for any help.

Using the identity $$1-\cos a=2\sin^2a/2$$, \begin{align} I_{l,m}&=\int_0^{2\pi}{\rm d}x\left(\int_0^{2\pi}{\rm d}y\ln(1-\cos(x-y))\cos\left(\frac{lx+my}{2}\right)\right)\\ &=\ln 2\int_0^{2\pi}\int_0^{2\pi}\cos\left(\frac{lx+my}{2}\right)\,dxdy+\int_0^{2\pi}\int_0^{2\pi}\ln\left(\sin^2\left( \frac{x-y}{2} \right)\right)\cos\left(\frac{lx+my}{2}\right)\,dxdy\\ &=4\ln 2\int_0^{\pi}\int_0^{\pi}\cos\left(lu+mv\right)\,dudv+4\int_0^{\pi}\int_0^{\pi}\ln\left(\sin^2(u-v)\right)\cos\left(lu+mv\right)\,dudv \end{align} The first integral is evaluated using the identity $$\cos\left(lu+mv\right)=\cos lu\cos mv-\sin lu\sin mv$$: \begin{align} J_{l,m}&= \int_0^{\pi}\int_0^{\pi}\cos\left(lu+mv\right)\,dudv\\ &=-\frac{4}{l m} \end{align} if $$l$$ and $$m$$ are both odd integers. To evaluate the second integral we remark that \begin{align} K_{l,m}&=\int_0^{\pi}\int_0^{\pi}\ln\left(\sin^2(u-v)\right)\cos\left(lu+mv\right)\,dudv\\ &=2\int_0^{\pi}\int_0^{\pi}\ln\left(\sin\left|u-v\right|\right)\cos\left(lu+mv\right)\,dudv \end{align} From the Fourier expansion of $$\ln\sin x$$, $$$$\log(\sin x)=-\ln 2-\sum_{n\ge 1}\frac{\cos(2nx)}{n}$$$$ valid for $$0, we have \begin{align} K_{l,m}=-2\ln 2 &\int_0^{\pi}\int_0^{\pi}\cos\left(lu+mv\right)\,dudv\\& -2\sum_{n\ge1}\frac{1}{n}\int_0^{\pi}\int_0^{\pi}\cos2n(u-v)\cos\left(lu+mv\right)\,dudv\\ &=-2\ln 2 J_{l,m}-8\sum_{n\ge1}\frac{1}{n}\frac{4n^2-lm}{\left( 4n^2-l^2 \right)\left( 4n^2-m^2 \right)} \end{align} Here again, $$l$$ and $$m$$ are both supposed to be odd integers. Then, $$$$I_{l,m}=16\frac{\ln 2}{lm}-32\sum_{n\ge1}\frac{1}{n}\frac{4n^2-lm}{\left( 4n^2-l^2 \right)\left( 4n^2-m^2 \right)}$$$$ Decomposing the terms of the summation as $$$$\frac{1}{n}\frac{4n^2-lm}{\left( 4n^2-l^2 \right)\left( 4n^2-m^2 \right)}=\frac{1}{l+m}\left[\frac{1}{n\left( 4n^2-l^2 \right)}+\frac{1}{n\left( 4n^2-m^2 \right)}\right]$$$$ and, introducing the Psi function, we find \begin{align} \sum_{n\ge1}\frac{1}{n\left( 4n^2-l^2 \right)}&=\sum_{n\ge1}\frac{1}{2l}\left[\frac{1}{n-l/2}-\frac{1}{n}+\frac{1}{n+l/2}-\frac{1}{n}\right]\\ &=-\frac{1}{2l}\left[\psi\left( \frac{l}{2}+1 \right)+\psi\left( -\frac{l}{2}+1 \right)-2\gamma\right] \end{align} and a similar expression for $$m$$. Now, the recurrence identities and some simplifications finally give $$$$I_{l,m}=16\frac{\ln 2}{lm}+\frac{32}{l+m}\left[\frac{1}{l}\psi\left( \frac{l}{2} \right)+\frac{1}{m}\psi\left( \frac{m}{2} \right)+\frac{\gamma l+1}{l^2}+\frac{\gamma m+1}{m^2}\right]$$$$