We have,
∫1cos(x−a)cos(x−b)dx
Divide and multiply by sin(a−b)
Then,
∫sin(a−b)sin(a−b)×1cos(x−a)cos(x−b)dx
=1sin(a−b)∫sin(a−b)cos(x−a)cos(x−b)dx
=1sin(a−b)∫sin(a−b+x−x)cos(x−a)cos(x−b)dx
=1sin(a−b)∫sin(x−b+a−x)cos(x−a)cos(x−b)dx
=1sin(a−b)∫sin[(x−b)+(a−x)]cos(x−a)cos(x−b)dx
Using formula sin(A−B)=sinAcosB−cosAsinB
So,
1sin(a−b)∫sin(x−b)cos(x−a)−cos(x−b)sin(x−a)cos(x−a)cos(x−b)dx
=1sin(a−b)[∫sin(x−b)cos(x−a)cos(x−a)cos(x−b)dx−∫cos(x−b)sin(x−a)cos(x−a)cos(x−b)dx]
=1sin(a−b)[∫sin(x−b)cos(x−b)dx−∫sin(x−a)cos(x−a)dx]
=1sin(a−b)[∫tan(x−b)dx−∫tan(x−a)dx]
=1sin(a−b)[−log|cos(x−b)|+log|cos(x−a)|]
=1sin(a−b)[log|cos(x−a)|−log|cos(x−b)|]
=1sin(a−b)[log|cos(x−a)||cos(x−b)|]
Hence, this is the answer.