Trigo sin cos tan sec csc cot

The equation says, sin2x=2sinxcosx
=2tanx/1+tan^2x
... How did they get 2tanx/1+tan^2x?

$\sin 2x = 2 \sin x \cos x$

      $= \dfrac{2 \sin x \cos x}{\cos x \sec^2 x} \cdot \cos x \sec^2 x$

      $= 2 \cdot \dfrac{\sin x}{\cos x} \cdot \dfrac{1}{\sec^2 x} \cdot \cos x \cdot \cos x \sec^2 x$

      $= 2 \cdot \tan x \cdot \dfrac{1}{\sec^2 x} \cdot \cos^2 x \sec^2 x$

      $= 2 \cdot \tan x \cdot \dfrac{1}{1 + \tan^2 x} \cdot \cos^2 x \cdot \dfrac{1}{\cos^2 x}$