Is this equality ($\frac{2\tan\alpha}{1+\tan^{2}\alpha}=\sin2\alpha$) true? My book thinks that this equality $\frac{2\tan\alpha}{1+\tan^{2}\alpha}=\sin2\alpha$ is true. I beg to differ. I think that this is only true when $\cos\alpha\neq 0$.
I think this is my book's logic:
$$\frac{2\tan\alpha}{1+\tan^{2}\alpha}$$
$$=\frac{2\frac{\sin\alpha}{\cos\alpha}}{1+\frac{\sin^2\alpha}{\cos^2\alpha}}$$
$$=\frac{2\frac{\sin\alpha}{\cos\alpha}}{\frac{\cos^2\alpha+\sin^2\alpha}{\cos^2\alpha}}$$
$$=\frac{2\frac{\sin\alpha}{\cos\alpha}}{\frac{1}{\cos^2\alpha}}$$
$$=2\sin\alpha\cos\alpha$$
$$=\sin2\alpha$$
Now that I think about it, when $\cos\alpha=0$, $\tan\alpha$ itself won't be defined, let alone the equality. So, I think I'm correct.
Am I correct?
 A: Short answer: you are sort of correct.

Longer answer:
The equality is true for all values $\alpha$ for which both sides of the equation are defined.
This is a good case of when to be very very careful with mathematical language, both as the readers and writers.

In a sense, it is correct to write that the value $\frac{2\tan\alpha}{1+\tan^{2}\alpha}$ is always equal to the value $\sin(2\alpha)$, because implicitly, when we are talking about expressions, it is always assumed we are only talking about the ranges where those expressions are defined - and for all values where $\frac{2\tan\alpha}{1+\tan^{2}\alpha}$ is defined, that value is indeed equal to $\sin(2\alpha)$.
Note that this is a perfectly sensible way of expressing things in mathematics, just as it is perfectly valid to say things like "the square root of a value is nonnegative", even if the more completely correct sentence would be "the square root of a nonnegative value is nonnegative".

The interesting thing is that, at least to me, the equality would strike me as much more problematic if it was written the other way around, i.e.
$$\sin2\alpha=\frac{2\tan\alpha}{1+\tan^{2}\alpha}.$$
I suppose that implicitly, I always read equations as if the left hand side also defines the range which its variables can take.

Another interesting thing is that even if $\cos(\alpha_0)=0$, you can say the following:
$$\lim_{\alpha\to\alpha_0} \frac{2\tan\alpha}{1+\tan^{2}\alpha} = \sin2\alpha_0,$$
which means that the function $$x\mapsto \frac{2\tan\alpha}{1+\tan^{2}\alpha}$$ is a function that can be "continuously expanded" to the function $$x\mapsto \sin(2\alpha).$$
