Find the derivative

\(arctan\left(\frac{(1-x)}{(1+x)}\right) \)           Method 1: Substitution

\begin{align}Let \quad y & = arctan\left( \frac{1-x}{1+x} \right)\\ Let \quad u & = \frac{(1-x)}{(1+x)}\ \\ then \quad \frac{du}{dx} & = \frac{-1(1+x)-(1-x)(1)}{(1+x)^2} \\ & = -\frac{2}{(1+x)^2}\\ Using\, \, a \,standard\, & result \, for \, arctan \\ \frac{dy}{du} & = \frac{1}{1+u^2} \\ And \, we \, know \quad \frac{dy}{dx} & = \frac{dy}{du} \times \frac{du}{dx} \\ So \quad \frac{dy}{dx} & = \frac{1}{1+u^2} \times \left( -\frac{2}{(1+x)^2} \right) \\ & = \frac{1}{1+ \left(\frac{(1-x)}{(1+x)}\right)^2 }\times \left( -\frac{2}{(1+x)^2} \right) \\ & = -\frac{2}{(1+x)^2+(1-x)^2} \\ & = -\frac{2}{1+2x+x^2+1-2x+x^2}\\ & = - \frac{2}{2x^2+2} \\ & = - \frac{1}{x^2+1} \end{align}

\( arctan\left(\frac{(1-x)}{(1+x)}\right) \)           Method 2: Implicit differentiation

\begin{align}Let \quad y & = arctan\left( \frac{1-x}{1+x} \right)\\ tan(y) & = \left( \frac{1-x}{1+x} \right) \quad \enclose{circle}{\color{black}{1}} \\ Differentiating \, implicitly & \, with \, respect \, to \, x \\ sec^2(y) \frac{dy}{dx} & = \frac{-1(1+x)-(1-x)(1)}{(1+x)^2} \\ Using \quad 1+ tan^2(y) & = sec^2(y) \\ and \, substituting \, from \, \enclose{circle}{\color{black}{1}} \\ \left(1+ \left( \frac{1-x}{1+x} \right)^2\right)\frac{dy}{dx} & = \frac{-1(1+x)-(1-x)(1)}{(1+x)^2} \\ \left( \frac{(1+x)^2+(1-x)^2}{(1+x)^2} \right)\frac{dy}{dx} & = \frac{-1(1+x)-(1-x)(1)}{(1+x)^2} \\ \left( \frac{(1+x)^2+(1-x)^2}{(1+x)^2} \right)\frac{dy}{dx} & = -\frac{2}{(1+x)^2}\\ \frac{dy}{dx} & = -\frac{2}{(1+x)^2+(1-x)^2}\\ & = -\frac{2}{1+2x+x^2+1-2x+x^2}\\ & = - \frac{2}{2x^2+2} \\ & = - \frac{1}{x^2+1} \end{align}