Question:
$\frac{1}{\cos (x-a) \cos (x-b)}$
Solution:
$\frac{1}{\cos (x-a) \cos (x-b)}=\frac{1}{\sin (a-b)}\left[\frac{\sin (a-b)}{\cos (x-a) \cos (x-b)}\right]$
$=\frac{1}{\sin (a-b)}\left[\frac{\sin [(x-b)-(x-a)]}{\cos (x-a) \cos (x-b)}\right]$
$=\frac{1}{\sin (a-b)} \frac{[\sin (x-b) \cos (x-a)-\cos (x-b) \sin (x-a)]}{\cos (x-a) \cos (x-b)}$
$=\frac{1}{\sin (a-b)}[\tan (x-b)-\tan (x-a)]$
$\Rightarrow \int \frac{1}{\cos (x-a) \cos (x-b)} d x=\frac{1}{\sin (a-b)} \int[\tan (x-b)-\tan (x-a)] d x$
$=\frac{1}{\sin (a-b)}[-\log |\cos (x-b)|+\log |\cos (x-a)|]$
$=\frac{1}{\sin (a-b)}\left[\log \left|\frac{\cos (x-a)}{\cos (x-b)}\right|\right]+\mathrm{C}$