Find the sum of roots of the equation. Could anyone check if it is correct? $\cos(12x)=5\sin(3x)+9\tan^2(x)+\frac 1 {\tan^2(x)},0\le x\le 2\pi$

Find the sum of roots of the above equation.

The answer is $\frac 7 6 \pi+\frac {11} 6\pi =3\pi$ given by WolframAlpha.

My attempt

I decomposed $\cos(12x)$ into $1-8\sin^2(3x)+8\sin^4(3x)$ but it didn't work.

Thanks for any help.


EDIT

I found a plausible solution. Could anyone check if it is correct?


Rewrite the equation as

$\cos(12x)-5\sin(3x)=9\tan^2(x)+\frac 1 {\tan^2(x)},0\le x\le 2\pi$.


1. Since R.H.S.$=9t+\frac 1 t\ge2\sqrt{9t \cdot \frac 1 t}=6$, where $t=\tan^2x$.

$\therefore \min(\text{R.H.S.})=6$.


2. And L.H.S.$=\cos(12x)-5\sin(3x)\le1-5(-1)=6.$

$\therefore \max(\text{L.H.S.})=6$.


$\therefore \text{L.H.S.}=6=\text{R.H.S.}$.


Solve R.H.S.$=6$, $x=\frac 7 6 \pi$ or $\frac {11} 6\pi$, reject  $x=\frac 1 6 \pi$ or $\frac 5 6\pi.$

$\therefore$ The final solution is $3\pi$.

Thanks.
In the image i have done most of the part and i reduced the expression by applying the AM &gt;= GM
In the image i have done most of the part and i reduced the expression by applying the AM &gt;= GM