Product-to-Sum for cot·cot$\cot A\cot B=\frac{\cos(A-B)+\cos(A+B)}{\cos(A-B)-\cos(A+B)}$. With $A=x-\pi/3$, $B=x+\pi/3$: $A-B=-2\pi/3$, $A+B=2x$. Then $\cos(-2\pi/3)=-1/2$.
Key Simplification$\cot(x-\pi/3)\cot(x+\pi/3)+1=\frac{2}{2\cos2x+1}$. Converting: $2\cos2x+1=3-4\sin^2x$. This is the core simplification that makes the integral tractable.
Weierstrass Substitution t=tan xDividing numerator and denominator by $\cos^2x$: $\frac{2\sec^2x}{3-\tan^2x}$. Setting $t=\tan x$, $dt=\sec^2x\,dx$ gives $\int 2dt/(3-t^2)$, a standard integral.
Standard Form ∫dt/(a²−t²)$\int\frac{dt}{a^2-t^2}=\frac{1}{2a}\ln\left|\frac{a+t}{a-t}\right|+C$. With $a=\sqrt{3}$: $\int\frac{2\,dt}{3-t^2}=\frac{1}{\sqrt{3}}\ln\left|\frac{\sqrt{3}+t}{\sqrt{3}-t}\right|+C$.