#cos x = cos(x/2 + x/2) = cos^2 (x/2) -sin^2 (x/2) =2 cos^2 (x/2) -1#
#cos x = 2 cos^2 (x/2) -1#
#cos x + 1 = 2 cos^2 (x/2)#
#(1 + cos x)/2 = cos^2 (x/2)#
#+- sqrt((1 + cos x)/2) = cos (x/2)-># proved for all #x#.
To find their value when #x =pi/2#
A . #cos (x/2) = cos (pi/4) = 1/sqrt 2#
B. #+- sqrt((1 + cos x)/2) = +- sqrt((1 + cos (pi/2))/2)#
#= +- sqrt((1 + 0)/2) = +- sqrt(1/2) = +- sqrt1/sqrt 2 = +- 1/sqrt 2#
since #x# in quadrant I, #sqrt((1 + cos x)/2) = 1/sqrt 2#