Quotient rule for derivative of tan x | Product and quotient rules | Khan Academy
You can cancel it out with the cos^2x, but you won't end up with just sin^2x, because what you actually have is: cos^2x/cos^2x + sin^2x/cos^2x. Which ends up being 1 + sin^2x/cos^2x or 1+tan^2x = sec^2x. •...