Let us first workout derivative of #f(u)=arctanu#.
As #g(u)=arctanu#, #tang=u# and differentiating we have
#sec^2g*(dg)/(dx)=1# or #(dg)/(dx)=1/(sec^2g)=1/(1+tan^2g)=1/(1+u^2)#
Hence for #g(u)=arctanu#, we have #(dg)/(dx)=1/(1+u^2#....(A)
Now to differentiate #f(x)=arctan(x-sqrt(1+x^2))#, we will use (A) and chain rule.
Hence #(df)/(dx)=(1/(1+(x-sqrt(1+x^2))^2))*(1-1/(2sqrt(1+x^2))*2x)# or
#(df)/(dx)=(1/(1+(x-sqrt(1+x^2))^2))*(1-x/(sqrt(1+x^2)))#
If #x=tantheta#
#(df)/(dx)=(1/(1+(tantheta-sqrt(1+tan^2theta))^2))*(1-tantheta/(sqrt(1+tan^2theta)))# or
#(df)/(dx)=(1/(1+(tantheta-sectheta)^2))*(1-tantheta/sectheta)# or
#(df)/(dx)=(1/(1+tan^2theta+sec^2theta-2tanthetasectheta))*((sectheta-tantheta)/sectheta)# or
#(df)/(dx)=(1/(2sectheta(sectheta-tantheta)))*((sectheta-tantheta)/sectheta)# or
#(df)/(dx)=(1/(2sec^2theta))=1/(2(1+tan^2theta))=1/(2(1+x^2))#