Given the function: #f(x) = (cosx)^(cosx)# consider:
#g(x) = ln (f (x)) = ln ((cosx)^(cosx)) = cosx ln cosx#
substitute #y= cosx# so that:
#lim_(x->pi/2) cosx ln cosx = lim_(y->0) ylny#
This limit is in the form #0 xx -oo#, but we can transform it in the form #oo/oo# and then apply l'Hospital's rule:
#lim_(y->0) ylny = lim_(y->0) lny/(1/y) = lim_(y->0) (d/dy lny)/(d/dy 1/y) = lim_(y->0) (1/y)/(-1/y^2) = lim_(y->0) -y = 0#
Then we know that:
#lim_(x->pi/2) g(x) = 0#
As #e^x# is a continuous function for all #x in RR# we also have that:
#lim_(x->pi/2) e^(g(x)) = e^(lim_(x->pi/2) g(x) ) =e^0=1#
But #e^(g(x)) = e^(ln(f(x))) = f(x)# so we can conclude that:
#lim_(x->pi/2) (cosx)^(cosx) = 1#