The identity `f ( g ( x ) ) = x` holds for all values of `x` on some interval (say, on the entire real axis). Because of this, if both parts of the identity are differentiable, their derivatives are also equal everywhere (which may be proved by definition of the derivative).

Suppose `g ( x )` is also differentiable. Then `f ( g ( x ) )` is also differentiable, and its derivative is (by the chain rule) `f ' ( g ( x ) ) * g ' ( x ) .` Because of the given identity, this derivative is equal to `x' = 1 .` Use the given fact about `f ( x ) ,` `f ' ( x ) = 1 + ( f ( x ) )^2` which holds for anything we substitute into `f, ` `f ' ( u ) = 1 + ( f ( u ) )^2 .` Here `u = g ( x ) :`

`f ' ( g ( x ) ) * g ' ( x ) = ( 1 + ( f ( g ( x ) ) )^2) * g ' ( x ) = 1 .`

Finally, recall that `f ( g ( x ) ) = x` and obtain `( 1 + x^2) * g ' ( x ) = 1 ,` which is equivalent to what we want,

`g'(x)=1/(1+x^2).`