I think that I have almost convinced the readers about the
scalar r = sqrt ( x^2 + y^2 ) >= 0.
Of course, sooner or later #theta#, used in measuring clockwise or
anticlockwise time-oriented Natural rotations and revolutions, and
serving as a #pi#-oriented location-marker, in the marker couple
#( r, theta )#, would be declared as non-negative.
And now, I assume that #theta >= 0#.
For this problem, if #0 <= theta in Q_4, theta/2 in Q-2#.
Accordingly, #cos (theta/2) and tan (theta/2) <=0.#
#f ( theta ) = +-sqrt(( 1 - cos theta )/( 1 + cos theta )#
#+ sqrt2 sqrt(1/( 1 +- cos (theta/2)))- 1/sqrt2 sqrt( 1 - cos (theta/2) )#
#= +-sqrt(( 1 - cos theta )/( 1 + cos theta )#
#+ sqrt2 sqrt(1/( 1 +- 1/sqrt2 sqrt( 1 + cos theta ))#
#- 1/sqrt2 sqrt( 1 +- 1/sqrt2 sqrt ( 1 + cos theta ))#
Sign Disambiguation:
If #theta notin Q_4#, choose + for 1st and 2nd terms
and #-# for the 3rd. Otherwise. they are opposites.