<s>[INST] Indefinite integration of $\int\frac{1}{\cos(x-1)\cos(x-2)\cos(x-3)}\,\textrm dx$ 
Integrate $$\int\dfrac{1}{\cos(x-1)\cos(x-2)\cos(x-3)}\,\textrm dx$$

My Attempt:
Using, $$\tan A-\tan B=\dfrac{\sin(A-B)}{\cos A\cdot \cos B}$$
The given integral can be transformed as
$$\int\dfrac{\tan(x-1)}{\cos(x-2)}\,\textrm dx - \int\dfrac{\tan(x-3)}{\cos(x-3)}\,\textrm dx$$
The right most integral can be calculated easily by writing $\tan(x-3)$ as $\frac{\sin(x-3)}{\cos(x-3)}$ and then by a substituiton $\cos(x-3)$ as $t$. But I have no clue for the left most integral. How to evaluate that?
 [/INST] Hint:
I found the expression $$=\dfrac{\sin(x-1)}{\cos(x-1)\cos(x-3)}-\dfrac{\sin(x-2)}{\cos(x-2)\cos(x-3)}$$
Now,
$$\dfrac{\sin(x-1)}{\cos(x-1)\cos(x-3)}$$
$$=\dfrac{\sin(x-1)}{\sin2}\cdot\dfrac{\sin(x-1-(x-3))}{\cos(x-1)\cos(x-3)}$$
$$=\dfrac{1-\cos^2(x-1)}{\sin2\cos(x-1)}-\dfrac{\sin(x-1)\sin(x-3)}{\sin2\cos(x-3)}$$
The first part can be managed easily.
For the second part,
$$\dfrac{\sin(x-1)\sin(x-3)}{\cos(x-3)}=\dfrac{\sin(x-3+2)\sin(x-3)}{\cos(x-3)}=\dfrac{\cos2\sin^2(x-3)}{\cos(x-3)}-\sin2\sin(x-3)$$
Can you take it home from here?
</s>