If $\tan2\theta=\frac{b}{a-c}$, then $\cos 2\theta=\frac{a-c}{\sqrt{b^2+(a-c)^2}}$ and $\sin2\theta=\frac{b}{\sqrt{b^2+(a-c)^2}}$ I am studying general equation of the second degree. While studying that chapter I came across 
$$\tan2\theta=\frac{b}{a-c}   \tag{1}$$
Now from (1), the author computed 
$$\cos2\theta=\frac{a-c}{\sqrt{b^2+(a-c)^2}} \quad\text{and}\quad \sin2\theta=\frac{b}{\sqrt{b^2+(a-c)^2}} \tag{2}$$ 
I don't understand how did the author compute these terms? 
If any member knows the correct answer may reply to this question? 

From
$$\sin^2\alpha+\cos^2\alpha=1,$$
draw
$$\tan^2\alpha+1=\frac1{\cos^2\alpha}$$
and
$$\cos\alpha=\pm\frac1{\sqrt{\tan^2\alpha+1}}.$$
Then
$$\sin\alpha=\tan\alpha\cos\alpha=\pm\frac{\tan\alpha}{\sqrt{\tan^2\alpha+1}}.$$
