Find the derivative of tan x.

When in doubt, rewrite the function.

Now the function looks like a quotient, and we know how to find its derivative.

Since we started with a trig function, we'd like the derivative to be written in terms of trig functions also. Since

we find