By definition:
#d/dx tan(x/2) = lim_(h->0) (tan((x+h)/2)-tan(x/2))/h#
Using the trigonometric formula:
#tan(a+b) = (tan a +tan b)/(1-tan a tan b)#
we get:
#d/dx tan(x/2) = lim_(h->0) ((tan(x/2) + tan (h/2))/(1-tan(x/2)tan (h/2))-tan(x/2))/h#
#d/dx tan(x/2) = lim_(h->0) 1/h ((tan(x/2) + tan (h/2) -tan(x/2)(1-tan(x/2)tan (h/2)) )/(1-tan(x/2)tan (h/2)))#
#d/dx tan(x/2) = lim_(h->0) 1/h ((cancel ( tan(x/2) )+ tan (h/2) - cancel ( tan(x/2))+tan^2(x/2)tan (h/2))/(1-tan(x/2)tan (h/2)))#
#d/dx tan(x/2) = lim_(h->0) (tan(h/2)/h) ((1 +tan^2(x/2))/(1-tan(x/2)tan (h/2)))#
As:
#lim_(h->0) tan( h/2) = 0#
#lim_(h->0) (tan (h/2))/h = 1/2 lim_(h->0) (tan (h/2))/(h/2) = 1/2#
#d/dx tan(x/2) = 1/2(1 +tan^2(x/2)) = 1/2(1+sin^2(x/2)/cos^2(x/2)) = 1/2(cos^2(x/2) + sin^2(x/2))/cos^2(x/2) = 1/(2cos^2(x/2)) = 1/2sec^2(x/2)#