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
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
sorry not the lim x->p/2 (tan(x-(p/2)))/(x-(p/2)-cos(x)) but
lim x->p/2 (tan(x-(p/2)))/(x-(p/2)+cos(x))