Write the function as:
#((2x)/pi +cosx)^(1/cosx) = ( e^ ln((2x)/pi +cosx))^(1/cosx) = e^ (ln((2x)/pi +cosx)/cosx) #
Consider now the limit:
#lim_(x->pi/2) ln((2x)/pi +cosx)/cosx#
which is in the indeterminate form #0/0# and apply l'Hospital's rule:
#lim_(x->pi/2) ln((2x)/pi +cosx)/cosx = lim_(x->pi/2) (d/dx ln((2x)/pi +cosx))/(d/dx cosx)#
#lim_(x->pi/2) ln((2x)/pi +cosx)/cosx = lim_(x->pi/2) -1/sinx (2/pi -sinx)/((2x)/pi+cosx) #
#lim_(x->pi/2) ln((2x)/pi +cosx)/cosx = (-1) (2/pi-1)/(1+0) = 1-2/pi#
As the exponential function is continuous for every #x in RR#, then:
#lim_(x->pi/2) e^ (ln((2x)/pi +cosx)/cosx) = e^( (lim_(x->pi/2) ln((2x)/pi +cosx)/cosx )) = e^(1-2/pi)#