Let f(x)=\(\frac{x}{1+tan\,x}\)
f'(x)=(1+tanx)\(\frac{d}{dx}\)(x)-x\(\frac{d}{dx}\)\(\frac{(1+tan\,x)}{(1+tan\,x)^2}\)
f'(x)=(1+tanx) -x.\(\frac{d}{dx}\)\(\frac{(1+tan\,x)}{(1+tan\,x)^2}\) ..(i)
Let g(x)=1+tan x. Accordingly, g(x+h)=1+tan (x + h).
By first principle
\(g'\)(x)=\(\lim_{h\rightarrow 0} \frac{g(x+h)-g(x)}{h}\)
=\(\lim_{h\rightarrow 0}\) [\(\frac{1+tan(x+h)-1-tan\,x}{h}\)]
=\(\lim_{h\rightarrow 0}\) \(\frac{1}{h}\)[\(\frac{sin(x+h)}{cos(x+h)}-\frac{sin\,x}{cos\,x}\)]
=\(\lim_{h\rightarrow 0}\) \(\frac{1}{h}\)[\(\frac{sin(x+h)cos\,x-sin\,xcos(x+h)}{cos(x+h)cos\,x}\)]
=\(\lim_{h\rightarrow 0}\) \(\frac{1}{h}\)[\(\frac{sin(x+h-x)}{cos(x+h)cos\,x}\)]
=\(\lim_{h\rightarrow 0}\) \(\frac{1}{h}\)[\(\frac{sin\,h}{cos(x+h)cos\,x}\)]
=(\(\lim_{h\rightarrow 0}\) \(\frac{sin\,h}{h}\)).(\(\lim_{h\rightarrow 0}\)\(\frac{1}{cos(x+h)cos\,x}\)
=1x\(\frac{1}{cos^2x}\) = sec2x
\(\Rightarrow\)(1+tanx) = sec2x ...(ii)
From (i) and (ii), we obtain
\(f'\)(x)=\(\frac{1+tan\,x-xsec^2x}{(1+tan\,x)^2}\)