#f(x) = cos x/(1 - sin x) - 1/cos x = [cos ^2 x - (1 - sin x)]/(cos x*(1 - sin x)#
In the numerator of #f(x),# replace
#cos^2 x = 1 - sin^2 x#
Numerator #= 1 - sin^2 x - 1 + sin x =#
#sin x*(1 - sin x)#
#f(x) = (sin x*(1 - sin x))/(cos x*(1 - sin x))= sin x/cos x = tan x.#