I have a book where are shown steps to derivate $\tan(x)$ incompletely:
$D(\dfrac{\sin x}{\cos x})$
$= \dfrac{\cos x D(\sin x) - \sin x D(\cos x)}{\cos^2 x}$
$= \dfrac{\cos x \cos x + \sin x \sin x}{\cos^2 x}$
$= \dfrac {1}{\cos^2 x} = \sec^2 x$
Can you explain me how to get to step 2?