Find sum of lengths of intervals satisfying $|\cot(2x) - \tan(2x)| \ge \frac{2}{3}\sqrt{3}$ for $0 \le x \le 2\pi$.

Find sum of lengths of intervals satisfying $|\cot(2x) - \tan(2x)| \ge \frac{2}{3}\sqrt{3}$ for $0 \le x \le 2\pi$. WolframAlpha shows that the total length of intervals satisfying this equation is $\frac{4}{3} \pi$. I've tried to solve it using $\tan(2x) = \frac{2\tan(x)}{1 - \tan^2(x)}$, but it lead me to solving complicated rational functions inequalities which would be quite exhausting to solve. Do you know any way to solve this problem faster?

Hint: When does equality occur? The the solutions to the inequality are some of the intervals bounded by the equality cases (why?). Now all that's left is to figure out which intervals.

To solve the equality case, don't use the double angle formula. Instead, solve for $2x$ directly (or, if you prefer, substitute $y=2x$ and solve for $y$, and use that to solve for $x$.)

Hint:

$$\cot y-\tan y=2\cot2y=\dfrac2{\tan2y}$$

So, we need $-\sqrt3\le\tan4x\le\sqrt3$

$\implies m\pi-\dfrac\pi3\le4x\le m\pi+\dfrac\pi3$ where $m$ is any integer