Why am I getting the correct value for $\sin\left(2\tan^{-1}\frac{4}{3}\right)$ even though the usage of the formula is incorrect? The expression:
$$\sin\left(2\tan^{-1}\left(\frac{4}{3}\right)\right)$$
Way 1:
If I punch the above expression in my calculator, I get $\frac{24}{25}$.
Way 2:
$$\sin\left(2\tan^{-1}\left(\frac{4}{3}\right)\right)$$
$$\sin\left(\sin^{-1}\left(\frac{2\times\frac{4}{3}}{1+(\frac{4}{3})^{2}}\right)\right)$$
$$[\text{Using $2\tan^{-1}x=\sin^{-1}\frac{2x}{1+x^2}$}]$$
$$\frac{2\times\frac{4}{3}}{1+(\frac{4}{3})^{2}}$$
$$\frac{24}{25}$$
My comments:
One of the conditions of $2\tan^{-1}x=\sin^{-1}\frac{2x}{1+x^2}$ is that $|x|\leq1$. In this case $|\frac{4}{3}|\nleq1$, but still I'm getting the correct answer using the formula. Why is that?
Related:

*

*Why am I getting a different value for $\sin\left(2\tan^{-1}\frac{4}{3}\right)$ than my calculator?

*Why does the equation with $2 \arctan(x)$ and other Inverse Trigonometric functions have weird conditions?

When $x > 1,$ as in this case, $\arctan x > \frac\pi4,$
and therefore $2 \arctan x > \frac\pi2.$
That is, $2 \arctan x$ is in the second quadrant.
But $\arcsin$ can only produce angles in the first and fourth quadrants.
There is a similar difficulty when $x < -1.$
That's why the formula $2\tan^{-1}x=\sin^{-1}\frac{2x}{1+x^2}$
is good only for $\lvert x\rvert \leq 1.$
But when $x > 1,$ you need a different formula. One correct formula is
$$2\tan^{-1}x = \pi - \sin^{-1}\frac{2x}{1+x^2}.$$
And $\sin(\pi - \theta) = \sin \theta,$ so you get the same result in the end.

Postscript:
The following is a kind of extended comment on the question. You could also view it as an answer to a question that was not literally asked.
Note that for any real number $x$ (without restriction) we have
\begin{align}
\sin\left(\tan^{-1} x\right) &= \frac{x}{\sqrt{1+x^2}}, \\
\cos\left(\tan^{-1} x\right) &= \frac{1}{\sqrt{1+x^2}}.
\end{align}
So if $\tan^{-1} x = \alpha$ then
\begin{align}
\sin\left(2\tan^{-1} x\right) = \sin(2\alpha)
&= 2\sin\alpha \cos\alpha \\
&= 2\left(\frac{x}{\sqrt{1+x^2}}\right)\left(\frac{1}{\sqrt{1+x^2}}\right)
\\[1ex]
&= \frac{2x}{1+x^2}.
\end{align}
So this is in fact a general formula that does not require any restrictions or special cases in order to deal with the quadrants in which the trig functions fall.
