[Math] How to integrate $\tan(x) \tan(2x) \tan(3x)$

indefinite-integralsintegrationtrigonometry

We have to integrate the following

$$\int \tan x \tan 2x \tan 3x \,\mathrm dx$$

In this I tried as

First split it into sine and cosine terms

Then used $\sin 2x =2\sin x \cos x$

But after that got stuck

Best Answer

Since $$ \tan3x=\tan(x+2x)=\dfrac{\tan x+\tan2x}{1-\tan x\tan2x}, $$ we have $$ \tan3x-\tan x\tan2x\tan3x=\tan x+\tan2x, $$ i.e. $$ \tan x\tan 2x\tan3x=\tan 3x-\tan x-\tan 2x. $$ For $a\ne 0$ we have $$ \int\tan(ax)\,dx=-\dfrac{1}{a}\ln|\cos(ax)|+c, $$ and therefore \begin{eqnarray} \int \tan x\tan 2x\tan3x\,dx&=&\int(\tan 3x-\tan x-\tan 2x)\,dx\\ &=&\ln|\cos x|+\dfrac{1}{2}\ln|\cos2x|-\dfrac13\ln|\cos3x|+c \end{eqnarray}