I'm being asked to prove the following equality
$$\sin(\alpha)=\frac{\tan(\alpha)}{\sqrt{1+\tan^2(\alpha)}}$$
and I support the idea that they are not equal (the rest of my class seems to desagree with me which made me doubt a little).
The "proof" is simple: $$\frac{\tan(\alpha)}{\sqrt{1+\tan^2(\alpha)}}=\frac{\sin(\alpha)}{\cos(\alpha)}\cdot \frac{1}{\sqrt{\frac{\cos^2(\alpha)+\sin^2(\alpha)}{\cos^2(\alpha)}}}\\=\frac{\sin(\alpha)}{\cos(\alpha)}\cdot |\cos(\alpha)|=\sin(\alpha)\cdot\frac{|\cos(\alpha)|}{\cos(\alpha)}=\sin(\alpha)$$ Now, this doesn´t make sense to me since $\exists\alpha$ s.t. $\cos(\alpha)>0$ and also $\exists\alpha$ s.t. $\cos(\alpha)<0$.
Does the equality hold?
Not much context is given when it comes to frasing the problem, the first question of our first physics homework.
I'm aware that this is very simple but my classmates seem to disagree with me on the fact that the equality is just false, maybe they know something I don´t. Thanks in advance.

If the domain is $-\pi/2 < \alpha < \pi/2$, then the two functions are identical. However, if the domain contains any values for which $\cos(\alpha) < 0$, then as you've shown the functions differ by a factor of $-1$.
You can see it on this graph - the functions track together, then the second one suddenly flips, then flips back, and so on.