We use chain rule here. Let #g(x)=cosx/(1+sinx)# and #f(x)=tan^(-1)x#
then we can write #h(x)=tan^(-1)(cosx/(1+sinx))#
as #h(x)=f(g(x))#
and #d/(dx)tan^(-1)(cosx/(1+sinx))#
= #d/(dx)f(g(x))#
= #(df)/(dg)xx(dg)/(dx)#
Now as #f(x)=tan^(-1)x#, #(df)/(dx)=1/(1+x^2)#
and as #g(x)=cosx/(1+sinx)#, using quotient rule
#(dg)/(dx)=(-sinx(1+sinx)-cosx*cosx)/(1+sinx)^2#
= #(-sinx-sin^2x-cos^2x)/(1+sinx)^2=-1/(1+sinx)#
Hence #d/(dx)tan^(-1)(cosx/(1+sinx))#
= #1/(1+(g(x))^2)xx(-1/(1+sinx))#
= #-1/(1+(cosx/(1+sinx))^2)xx1/(1+sinx)#
= #-(1+sinx)/((1+sinx)^2+cos^2x)#
= #-(1+sinx)/(1+sin^2x+2sinx+cos^2x)#
= #-1/2#
Note: In case you are wondering why it turns out to be so simple answer, see the following.
#cosx/(1+sinx)=(cos^2(x/2)-sin^2(x/2))/(cos(x/2)+sin(x/2))^2#
= #(cos(x/2)-sin(x/2))/(cos(x/2)+sin(x/2))#
= #(1-tan(x/2))/(1+tan(x/2))=(tan(pi/4)-tan(x/2))/(1+tan(pi/4)tan(x/2))=tan(pi/4-x/2)#
hence #tan^(-1)(cosx/(1+sinx))=pi/4-x/2# and its derivative is #-1/2#