We have, #(color(red)(1)+color(blue)(sinx))/color(brown)cosx#,
#={color(red)(cos^2(x/2)+sin^2(x/2))+color(blue)(2cos(x/2)sin(x/2))}/{color(brown)(cos^2(x/2)-sin^2(x/2))}#,
#={cos(x/2)+sin(x/2)}^cancel(2)/[cancel({cos(x/2)+sin(x/2)}){cos(x/2)-sin(x/2)}]#.
# rArr (1+sinx)/cosx={cos(x/2)+sin(x/2)}/{cos(x/2)-sin(x/2)}.#
By dividendo-componendo
#{(1+sinx)-cosx}/{(1+sinx)+cosx}#,
#=[{cos(x/2)+sin(x/2)}-{cos(x/2)-sin(x/2)}]/[{cos(x/2)+sin(x/2)}+{cos(x/2)-sin(x/2)}]#,
#=sin(x/2)/(cos(x/2))#
#=tan(x/2),# as Respected dk_ch has readily obtained!
Enjoy Maths.!