Evaluate $\int \frac{1}{\cot \frac{x}{2}\cdot\cot\frac{x}{3}\cdot\cot\frac{x}{6}}\text{d}x$ $$\int \dfrac{1}{\cot \dfrac{x}{2}\cdot\cot\dfrac{x}{3}\cdot\cot\dfrac{x}{6}}dx$$
My multiple attempts are as follows:-
Attempt $1$:
$$\int \tan\dfrac{x}{2}\cdot\tan\dfrac{x}{3}\cdot\tan\dfrac{x}{6}dx$$
$$\int \tan\dfrac{x}{2}\cdot\tan\dfrac{x}{3}\cdot\tan\left(\dfrac{x}{2}-\dfrac{x}{3}\right)dx$$
$$\int \tan\dfrac{x}{2}\cdot\tan\dfrac{x}{3}\cdot\dfrac{\tan\dfrac{x}{2}-\dfrac{x}{3}}{1+\tan\dfrac{x}{2}\cdot\tan\dfrac{x}{3}}dx$$
$$\int \dfrac{\tan^2\dfrac{x}{2}\cdot\tan\dfrac{x}{3}\cdot\cos\dfrac{x}{2}\cdot\cos\dfrac{x}{3}}{\cos\dfrac{x}{6}}-\dfrac{\tan\dfrac{x}{2}\cdot\tan^2\dfrac{x}{3}\cdot\cos\dfrac{x}{2}\cdot\cos\dfrac{x}{3}}{\cos\dfrac{x}{6}}dx$$
$$\int \dfrac{\sin^2\dfrac{x}{2}\cdot\sin\dfrac{x}{3}}{\cos\dfrac{x}{2}\cdot\cos\dfrac{x}{6}}-\dfrac{\sin\dfrac{x}{2}\cdot\sin^2\dfrac{x}{3}}{\cos\dfrac{x}{3}\cos\dfrac{x}{6}}dx$$
$$2\left(\int \dfrac{\sin^2\dfrac{x}{2}\cdot\sin\dfrac{x}{6}}{\cos\dfrac{x}{2}}-\dfrac{2\sin\dfrac{x}{2}\cdot\sin^2\dfrac{x}{6}\cos\dfrac{x}{6}}{\cos\dfrac{x}{3}}\right)dx$$
This doesn't seem to be going anywhere.
Attempt $2$:
$$\int \dfrac{\sin\dfrac{x}{2}\cdot\sin\dfrac{x}{3}\cdot\sin\dfrac{x}{6}}{\cos\dfrac{x}{2}\cdot\cos\dfrac{x}{3}\cdot\cos\dfrac{x}{6}}dx$$
$$\int \dfrac{\cos\dfrac{x}{6}\cdot\sin\dfrac{x}{6}-\cos\dfrac{5x}{6}\cdot\sin\dfrac{x}{6}}{\cos^2\dfrac{x}{6}+\cos\dfrac{x}{6}\cdot\cos\dfrac{5x}{6}}dx$$
$$\int \dfrac{\sin\dfrac{x}{3}-\sin x+\sin\dfrac{2x}{3}}{1+\cos\dfrac{x}{3}+\cos x+\cos \dfrac{2x}{3}}dx$$
As we know $\cos \alpha+\cos(\alpha+\beta)+\cos(\alpha+2\beta)+\cdots+\cos(\alpha+(n-1)\beta)=\dfrac{\sin\dfrac{n\beta}{2}}{\sin\dfrac{\beta}{2}}\cos\left(\dfrac{\alpha+\alpha+(n-1)\beta}{2}\right)$
$$\int \dfrac{\sin\dfrac{x}{3}-\sin x+\sin\dfrac{2x}{3}}{\cos(0)+\cos\left(0+\dfrac{x}{3}\right)+\cos\left(0+\dfrac{2x}{3}\right)+\cos\left(0+\dfrac{3x}{3}\right)}dx$$
$$\int \dfrac{\sin\dfrac{x}{3}-\sin x+\sin\dfrac{2x}{3}}{\dfrac{\sin\dfrac{4x}{6}}{\sin\dfrac{x}{6}}\cdot\cos\dfrac{x}{2}}dx$$
$$\int \dfrac{\sin\dfrac{x}{3}+\sin x+\sin\dfrac{2x}{3}-2\sin x}{\dfrac{\sin\dfrac{4x}{6}}{\sin\dfrac{x}{6}}\cdot\cos\dfrac{x}{2}}dx$$
$$\int \dfrac{\dfrac{\sin\left(\dfrac{3x}{6}\right)}{\sin\dfrac{x}{6}}\cdot\sin\dfrac{2x}{3}-2\sin x}{\dfrac{\sin\dfrac{4x}{6}}{\sin\dfrac{x}{6}}\cdot\cos\dfrac{x}{2}}dx$$
$$\int \tan\dfrac{x}{2}dx-\int \dfrac{4\sin\dfrac{x}{2}\sin\dfrac{x}{6}}{\sin\dfrac{2x}{3}}dx$$
$$\int \tan\dfrac{x}{2}dx-2\int \dfrac{\cos\dfrac{x}{3}-\cos\dfrac{2x}{3}}{\sin\dfrac{2x}{3}}dx$$
$$\int \tan\dfrac{x}{2}dx-\int \mathrm{cosec}\dfrac{x}{3}dx+2\int \cot\dfrac{2x}{3}dx$$
$$2\ln\left|\sec \dfrac{x}{2}\right|-3\ln\left|\mathrm{cosec}\dfrac{x}{3}-\cot\dfrac{x}{3}\right|+3\ln\left|\sin\dfrac{2x}{3}\right|+C$$
But this got too long,any short and better approach.
 A: If $A+B+C=m\pi,$  for some integer $m$
$\tan(B+C)=\tan(m\pi-A)=-\tan A$
$\implies\tan A+\tan B+\tan C=\tan A\tan B\tan C$
Set $A=\dfrac x3, B=\dfrac x6, C=-\dfrac x2\implies m=0$
$$\tan\dfrac x3+\tan\dfrac x6+\tan\left(-\dfrac x2\right)=\tan\dfrac x3\tan\dfrac x6\tan\left(-\dfrac x2\right)$$
As $\tan(-y)=-\tan y,$
$$\tan\dfrac x3+\tan\dfrac x6-\tan\dfrac x2=-\tan\dfrac x3\tan\dfrac x6\tan\dfrac x2$$
A: I think your first substitution was on the right track, but instead note that since
$$\tan\left(\frac{x}{6}\right) = \frac{\tan\left(\frac{x}{2}\right) - \tan\left(\frac{x}{3}\right)}{1+\tan\left(\frac{x}{2}\right)\tan\left(\frac{x}{3}\right)} \implies \tan\left(\frac{x}{2}\right)\tan\left(\frac{x}{3}\right) = \frac{\tan\left(\frac{x}{2}\right) - \tan\left(\frac{x}{3}\right)}{\tan\left(\frac{x}{6}\right)} - 1$$
so the integral becomes 
$$\int \tan\left(\frac{x}{2}\right) - \tan\left(\frac{x}{3}\right) - \tan\left(\frac{x}{6}\right) \: dx$$
$$ = 2\log\left(\sec\left(\frac{x}{2}\right)\right) - 3\log\left(\sec\left(\frac{x}{3}\right)\right) - 6 \log\left(\sec\left(\frac{x}{6}\right)\right) + C$$
A: Here is the step-by-step solution:








