prove that secx - tanx = 1 -tan x/2 /1 + tan x/2

secx - tanx

= 1/cosx - sinx/cosx
= (1-sinx)/cosx
now use the double angle formulas to make that

1 - 2sin x/2 cos x/2
-------------------------
2 cos^2 x/2 - 1

divide by cos^2 x/2 to get

sec^2 x/2 - 2tan x/2
-----------------------------
2 - sec^2 x/2

1+tan^2 x/2 - 2tan x/2
---------------------------
2 - 1 - tan^2 x/2

(1-tan x/2)^2
------------------------
1 - tan^2 x/2

(1-tan x/2) / (1+tan x/2)