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?
$$\tan(2\theta) = \frac{b}{a-c}$$ So we have a right triangle where the legs of the right triangle are of lengths $b$ and $a-c$, which means the hypotenuse should be $\sqrt{b^2 + (a-c)^2}$. We can, thus, compute the sine and cosine of the concerned angle using $\frac{\text{adj.}}{\text{hyp.}}$ and $\frac{\text{opp.}}{\text{hyp.}}$