Small correction on my previous answer the derivative of cot is -csc^2, which means that the final answer for my previous solution will be

1/2

`lim_(x->Pi/2)(tan(x-Pi/2))/(x-Pi/2-cosx)=0/0 undetermined`

We can use l'hopital rule in this case. First though I would like to rewrite the numerator using one of the trig id as -tan(Pi/2-x)=-cotx.

Thus we get

`lim_(x->Pi/2)(-cotx)/(x-Pi/2-cosx)=`

`lim_(x->Pi/2)(-csc^2x)/(1+sinx)=`

`-1/2`