Differentiation Calculus: $\tan^{-1} \text{Problem}$ Well, Today at Math Revision exam I have to answer for $\frac{dy}{dx}$
Question:$$ y= \arctan\frac{{2x}}{{1+x^2}}$$
I got the answer $$ \frac{2}{1+(\frac{2x}{1+x})^2}\frac{cos(2\tan^{-1}x)}{1+x^2}$$
i think this not correct.
I have to know the right solution with steps.

Say $x=\tan \theta$ since both $\tan \theta$ and $x \in \mathbb{R}$.
Also we have that $\frac{dx}{d\theta}=\sec^2 \theta$
Then we get that $\frac{2x}{1+x^2}=\frac{2\tan \theta}{1+\tan^2 \theta}=\sin 2\theta$
So we get that $\arctan \frac{2x}{1+x^2}=\arctan (\sin 2\theta)$
Hence, the problem reduces to:
$$\frac{d}{dx}\left(\arctan \frac{2x}{1+x^2}\right)$$
$$=\frac{d}{d\theta}\left[\arctan (\sin 2\theta)\right]\cdot \frac{d\theta}{dx}$$
$$=\frac{1}{1+\sin^2 \theta}\cdot \frac{d}{d\theta}\left(\sin 2\theta\right)\cdot \frac{1}{\sec^2 \theta}$$
$$=\frac{2\cos 2\theta}{1+\sin^2 \theta}\cdot \cos^2 \theta$$
$$=\frac{2\cdot \left(\frac{1-\tan^2 \theta}{1+\tan^2 \theta}\right)}{\sec^2 \theta+\tan^2 \theta}$$
$$=\frac{2\cdot \left(\frac{1-x^2}{1+x^2}\right)}{1+2x^2}$$
$$=2\cdot\frac{1-x^2}{(1+x^2)(1+2x^2)}$$
Hope this helps.
