<s>[INST] Finding $\int_{0}^{\frac{\pi}{2}}\frac{1}{\cos (x-\frac{\pi}{3}).\cos (x-\frac{\pi}{6})}\mathrm{d}x$ How can I find $$\int_{0}^{\frac{\pi}{2}}\frac{1}{\cos (x-\frac{\pi}{3}).\cos (x-\frac{\pi}{6})}\mathrm{d}x$$ ? I suspect this has something simple to do with the basic definite integral properties; but can't find a way through.
 [/INST] Let $$\displaystyle y = \frac{x-\frac{\pi}{3}+x-\frac{\pi}{6}}{2} = x-\frac{\pi}{4}\Rightarrow x= \left(y+\frac{\pi}{4}\right)$$ and $dx = dy$ and changing limit
Put into $$\displaystyle I = \int_{0}^{\frac{\pi}{2}}\frac{1}{\cos \left(x-\frac{\pi}{3}\right)\cdot \cos \left(x-\frac{\pi}{6}\right)}dx = \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}}\frac{1}{\cos \left(y-\frac{\pi}{12}\right)\cdot \cos \left(y+\frac{\pi}{12}\right)}dy$$
Now Using the formula $$\bullet \; \cos(A+B)\cdot \cos(A-B) = \cos^2A-\sin^2 B.$$
So Integral $$\displaystyle I = \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}}\frac{1}{\cos^2 y-\sin^2 \left(\frac{\pi}{12}\right)}dy = 2\int_{0}^{\frac{\pi}{4}}\frac{1}{\cos^2 y -a^2}dy = 2\int_{0}^{\frac{\pi}{4}}\frac{\sec^2 y}{1 -a^2(1+\tan^2 y)}dy$$
Where $\displaystyle a= \sin \frac{\pi}{12}$
Now Let $\tan y = t\;,$ Then $\sec^2 ydy = dt$ and Changing Limit, We get
$$\displaystyle I = 2\int_{0}^{1}\frac{1}{1-a^2(1+t^2)}dt = \frac{1}{a^2}\int_{0}^{1}\frac{1}{\left(\frac{\sqrt{1-a^2}}{a}\right)^2-t^2}dt = \frac{2}{a^2}\cdot \frac{a}{2\sqrt{1-a^2}}\ln\left|\frac{\sqrt{1-a^2}+at}{\sqrt{1-a^2}-at}\right|_{0}^{1}$$
So $$\displaystyle I = \frac{1}{a\sqrt{1-a^2}}\ln \left|\frac{\sqrt{1-a^2}+a}{\sqrt{1-a^2}-a}\right| = 2\cdot \ln \left|\frac{\cos \frac{\pi}{12}+\sin \frac{\pi}{12}}{\cos \frac{\pi}{12}-\sin \frac{\pi}{12}}\right|^2=2\ln (3)$$
</s>