∫1cos(x−a)cos(x−b)dx
=∫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)−(x−a))cos(x−a)cos(x−b)dx
Using sin(A−B)=sinAcosB−cosAsinB
Replace A by (x−b), & B by (x−a)
∴ sin((x−b)−sin(x−a))=sin(x−b)cos(x−a)−cos(x−b)sin(x−a)
∴ 1sin(a−b)∫sin(x−b)−(x−a)cos(x−a)cos(x−b)dx
=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)−cos(x−b)sin(x−a)cos(x−a)cos(x−b))dx
=1sin(a−b)[∫sin(x−b)cos(x−b)−sin(x−a)cos(x−a)dx]
=1sin(a−b)[∫tan(x−b)−tan(x−a)dx]
=1sin(a−b)[∫tan(x−b)dx−∫tan(x−a)dx]
[Note : ∫tanxdx=−log|cosx|+C]
=1sin(a−b)[−log|cos(x−b)|+log|cos(x−a)|]+C
=1sin(a−b)[log|cos(x−a)|−log|cos(x−b)|]+C
=1sin(a−b)log∣∣∣cos(x−a)cos(x−b)∣∣∣+C