Simplify $f(x) = \arctan(2x) + \arctan(3x)$ 
Simplify $f(x) = \arctan(2x) + \arctan(3x)$

I had a go at it and this is what I got to :
We have: $-\pi<\arctan(2x)+\arctan(3x)<\pi$
Let $a=\arctan(2x)$ and $b=\arctan(3x)$
Then I cut it into different intervals : 
$-\pi<a+b<-\pi/2$
$-\pi/2<a+b<\pi/2$
$\pi/2<a+b<\pi$
In the Interval $(-\pi/2, \pi/2)$ :
I got : $$\tan(a+b) = \frac{a+b}{1-\tan(a)\tan(b)} = \frac{5x}{1-6x^2}$$
So: $$\arctan(\tan(a+b)) = \arctan\left(\frac{5x}{1-6x^2}\right)$$
$$\implies a+b = \arctan\left(\frac{5x}{1-6x^2}\right)$$
So that means that : $$\arctan(2x)+\arctan(3x) = \arctan\left(\frac{5x}{1-6x^2}\right) \in \ (-\pi/2, \pi/2)$$
And I get stuck here not knowing what to do. Can I please get some help on how I can simplify this better and/or the correct way?
 A: That's right, the function $\arctan$ returns an argument in range $[-\pi/2,\pi/2]$ radians, and the sum of two of them will be in a range twice larger.
We do have $$\tan(\arctan(2x) + \arctan(3x))=\frac{5x}{1-6x^2},$$
but that does not imply
$$\arctan(2x) + \arctan(3x)=\arctan\frac{5x}{1-6x^2}.$$
The discrepancy appears when the denominator $1-6x^2$ changes sign, and the single $\arctan$ formula has a $\pi$ jump.
The corrected function is
$$\begin{align}
x<-\frac1{\sqrt6}&\to \arctan\frac{5x}{1-6x^2}-\pi\\
-\frac1{\sqrt6}<x<\frac1{\sqrt6}&\to \arctan\frac{5x}{1-6x^2}\\
x>\frac1{\sqrt6}&\to \arctan\frac{5x}{1-6x^2}+\pi
\end{align}$$

A: Drawing 2 right triangles with common side of length 1 and having adjacent sides of lengths 2x and 3x, respectively, the Law of Cosines gives 
$25x^2=(1+4x^2)+(1+9x^2)-2\sqrt{1+4x^2}\sqrt{1+9x^2}\cos\theta\;\;\;$ where $\theta=\arctan 2x+\arctan 3x$,
so $\displaystyle\cos\theta=\frac{1-6x^2}{\sqrt{(1+4x^2)(1+9x^2)}}$.  $\hspace{.2 in}$Since $\arctan(-x)=-\arctan x$,
$\arctan 2x+\arctan 3x=\displaystyle\cos^{-1}\left(\frac{1-6x^2}{\sqrt{(1+4x^2)(1+9x^2)}}\right)\cdot\text{sgn}(x)$
