We know that,
#color(red)((1)sin(pi/2-theta)=costheta and cos(pi/2-theta)=sintheta#
#color(blue)((2)sin2alpha=2sinalpha cosalpha and 1+cos2alpha=2cos^2alpha#
Using (1) we get
#y=tan^-1(cosx/(1+sinx))=tan^-1(color(red)(sin(pi/2-x))/(1+color(red)(cos(pi/2-x))))#
For simplicity we take , #color(violet)(pi/2-x=2alpha=>alpha=pi/4-x/2#
So, #y=tan^-1((sin2alpha)/(1+cos2alpha))...tocolor(blue)(Apply(2)#
#=>y=tan^-1((2sinalphacosalpha)/(2cos^2alpha))#
#=>y=tan^-1(sinalpha/cosalpha)#
#=>y=tan^-1(tanalpha) ,where ,color(violet)( alpha=pi/4-x/2#
#=>y=alpha#
#=>y=pi/4-x/2#
Diff.w.r.t. #x#
#(dy)/(dx)=0-1/2=-1/2#