Is my process of proving this problem correct when $2x$ & $3x$ are not acute angles? Problem:

Prove $$\cot^{-1}(\tan 2x)+\cot^{-1}(-\tan 3x)=x$$

My proof:
$$\begin{align}\text{L.H.S}&=\cot^{-1}(\tan 2x)+\cot^{-1}(-\tan3x) \\
&=\cot^{-1}(\cot (\frac{\pi}{2}-2x))-\cot^{-1}(\cot(\frac{\pi}{2}-3x))\\
&=3x-2x\\
&=x\\
&=\text{R.H.S(proved)}\end{align}$$
Will my proof still be valid if $2x$ or $3x$ is in any quadrant other than the 1st quadrant? What will be the correct proof that will hold true for any quadrant? Is this identity only true when 2x & 3x are in the first quadrant?
 A: Good question about whether your proof applies when $2x$ is outside the first quadrant.
In fact, your proof applies only when you define $\mathrm{arccot}$'s principal range as $\left(-\frac{\pi}2,0\right)\cup\left(0\frac{\pi}2\right]$ and both $\left(\frac\pi2-2x\right)$ and  $\left(\frac\pi2-3x\right)$ are within this range.
Furthermore, the given statement is actually not identically true, whichever of the two contrasting definitions of $\mathrm{arccot}$ we choose.

*

*Let us define $\textrm{arccot}$'s principal range to be $(0,\pi).$
Then $$\text{LHS}=\mathrm{arccot}(\tan
2x)+\mathrm{arccot}(-\tan3x)\\
=\frac {\pi}2-\arctan(\tan 2x)+\left(\frac {\pi}2-\arctan(-\tan 3x)\right)\\
=\pi+\arctan(\tan 3x)-\arctan(\tan 2x)\\
=\pi+(3x+m\pi)-(2x+n\pi)\quad\text{for some }m,n \\
=x+k\pi\quad\text{for some }k.$$

For example, $$x=0.7\implies\text{LHS}=0.7=x=\text{RHS},$$ but
$$x=0.2\implies\text{LHS}=0.2+\pi\neq x=\text{RHS}.$$


*On the other hand, if we define $\textrm{arccot}$'s principal range
to be $\left(-\frac{\pi}2,0\right)\cup\left(0\frac{\pi}2\right],$
LHS still doesn't identically equal $x:$

