TITLE: Evaluating $\int_0^L\int_0^L \cos^{-1}\left(\frac{x^2+y^2-a^2}{2xy}\right)xy~dx~dy$
QUESTION [9 upvotes]: I have the following integral to evaluate.

$$\displaystyle\int\int_{x,y\in\Omega}\cos^{-1}\left(\frac{x^2+y^2-a^2}{2xy}\right)xy~dx~dy,$$
  where $0\le a\le L$ and $\Omega=\{(x,y)\in (0,L]\times(0,L]: |x-y|<a, 
(x+y)>a\}$.

I used the transformation of variable as below: $$\begin{align}x&=\frac{a\sin(\theta+\phi)}{\sin \theta},\\
\\
y&=\frac{a\sin\phi}{\sin \theta}.\end{align}$$ It seems that the integral can be evaluated by this technique but I'm not sure because the calculations are getting quite messy. I was wondering is there any better method to find it? Thanks in advance.

REPLY [4 votes]: The integration domain is separated in four parts (figure below). The analytical result is obtained for parts (1) and (2) where the calculus is more difficult : result fonction of two paraleters $(a, L)$. The parts 3 and 4 are simpler : one parameter only $(a)$. It is solved with the same method.