# Integrate the function$\int\frac{1}{\cos(x+a)\cos(x+b)}$

Toolbox:
• (i)$\sin (A+B)=\sin A\cos B+\cos A\sin B$
• (ii)$\cos (A+B)=\cos A\cos B-\sin A\sin B$
• (iii)$\tan x dx=-log |\cos x|+c$
Given $\int\frac{dx}{\cos(x+a)\cos(x+b)}$

Multiply and divide by, $\sin (a-b)$

$I=\int\frac{\sin (a-b)\;dx}{\cos(x+a)\cos(x+b)(\sin (a-b))}$

Let $a-b=(x+a)-(x+b)$

$I=\large\frac{1}{\sin (a-b)}\int\frac{\sin[(x+a)-(x+b)]}{\cos(x+a)\cos(x+b)}dx$

But we know $\sin (A-B)=\sin A\cos B-\cos A\sin B$.

$\sin[(x+a)-(x+b)]$ is of the form $\sin(A-B),$ hence

$I=\large\frac{1}{\sin (a-b)}\int\frac{\sin(x+a)-\cos (x+b)-\cos (x+a)\sin (x+b)}{\cos(x+a)\cos(x+b)}dx$

Seperating the terms:

$=\large\frac{1}{\sin (a-b)}\int\frac{\sin(x+a)-\cos(x+b)}{\cos(x+a)\cos(x+b)}-\frac{\cos (x+a)\sin (x+b)}{\cos(x+a)\cos(x+b)}dx$

On simplifying we get,

$\large\frac{1}{\sin (a-b)}\bigg[\int\frac{\sin(x+a)}{\cos(x+a)}-{\sin (x+b)}{\cos(x+b)}dx\bigg]$

But $\large\frac{\sin(x+a)}{\cos(x+a)}\;and \;\frac{\sin (x+b)}{\cos(x+b)}=\tan{x+a}$

and $\tan (x+b)$ respectively

But $\frac{1}{\sin(a-b)}[-log|\cos(x+a)|+log|\cos(x+b)|+c]$

But we know $log a-log b=log \frac{a}{b}$

Therefore$\int \frac{1}{\cos(x+a)\cos(x+b)}=\frac{1}{\sin(a-b)} log\bigg|\frac{\cos (x+b)}{\cos (x+a)}\bigg|+c$