Differentiation - derivative of an inverse function

By Martin McBride, 2026-01-18
Tags: inverse function chain rule first principles derivative
Categories: differentiation calculus


Often if we are trying to differentiate a difficult function, we can make progress by finding the derivative of a related function, and then using the relationship to find the derivative of the original function.

In this article, we will look at one such technique. If we find it difficult to differentiate a function f(x), it might be easier to differentiate its inverse function, g(x). Having found g'(x) we might then be able to find the result we need, f'(x).

As a first example, we will find the derivative of the natural logarithm function. We will then generalise that to any function, and prove the result.

Finding a derivative using the inverse function

Here is our initial function f(x). It is the natural logarithm function, but we will call it f(x) for now:

f(x)

We will make use of the inverse function. As you may know, the inverse of the natural log is the exponential function, e to the power x. But for now, we will call it g(x):

g(x)

Of course, if g is the inverse of f, it follows that f is the inverse of g:

Inverse of f(x)

Another way to express this is to say that g undoes f, and vice versa. Notice that, for the natural log, f can only be applied to x > 0 (because we can't find the log of a non-positive number). So:

Inverse of f(x)

Now let's find the slope of f(x) at some point A. This can be found by drawing a right-angled triangle that forms a tangent to the curve at A.

derivative of f(x)

The derivative of f(x) at this point is equal to the slope of the curve. If the triangle has a width u and height v the derivative of f(x) will be:

derivative of f(x)

We will use the fact that the graph of the inverse of a function is the original function reflected over the leading diagonal. This is because the inverse function is equivalent to the original function with x and y swapped.

Here is the inverse function g(x) drawn on the same axes as f(x):

Inverse of f(x)

The point B on g(x) is the equivalent of point A on f(x). Again, it is just A reflected over the leading diagonal. The slope of the curve at B can also be found in terms of u and v, because the triangle that we used to find the slope also gets reflected over the leading diagonal. Since this reflection swaps the width and height of the triangle, the slope at B is:

Slope of g

Comparing this to the slope of f(x) we get a very useful result:

Slope of f compared to g

So the slope of the inverse function g(x) at B is one over the slope of f(x) at the equivalent point A. Of course, we need to take care if the slope of either curve is ever zero, but for the functions we are using this isn't an issue.

Next, it will be good to find out how B and A are related. Let's define A as the point where x equals some value a, and since the point is on the curve of f, its y value is f(a). So point A is (a, f(a)).

We also know that B is just A with x and y flipped, so B is (f(a), a). This is shown on the graph:

Inverse of f(x)

So we can rewrite our formula for the slope using the value of x at A and B:

Slope of f compared to g

On the RHS we can simplify by evaluating g'(f(x)) at x = a:

Slope of f compared to g

Since both sides are equal for any valid value of a, we can simply say that:

Slope of f compared to g

This allows us to find the derivative of f if we know the derivative of its inverse function g.

Solving for the ln x case

We can now solve this equation using the actual values of f(x) and g(x):

Solution for ln x

Here we have used the fact that the derivative of the exponential function is the exponential function. Substituting these into the general formula for f'(x) above gives:

Solution for ln x

Since the exponential function and natural log functions are inverses of each other, the exponential of the log is simply x, so:

Solution for ln x

You may already know that this is the standard result for the derivative of the ln function.

Alternative proof using the chain rule

The above geometric proof is quite intuitive, but it is also possible to prove the result using the chain rule.

As we noted before, for f(x) and its inverse g(x):

Proof using the chain rule

If we differentiate the LHS using the chain rule we get:

Proof using the chain rule

If we differentiate the RHS using the chain rule we simply get 1:

Proof using the chain rule

Equating these gives:

Proof using the chain rule

Rearranging gives:

Proof using the chain rule

We need to take care if g' evaluates to zero for any f(x). This was not an issue in the previous example because the exponential function is always positive.

Related articles

Join the GraphicMaths Newsletter

Sign up using this form to receive an email when new content is added to the graphpicmaths or pythoninformer websites:



Popular tags

adder adjacency matrix alu and gate angle answers area argand diagram binary maths cardioid cartesian equation chain rule chord circle cofactor combinations complex modulus complex numbers complex polygon complex power complex root cosh cosine cosine rule countable cpu cube decagon demorgans law derivative determinant diagonal directrix dodecagon e eigenvalue eigenvector ellipse equilateral triangle erf function euclid euler eulers formula eulers identity exercises exponent exponential exterior angle first principles flip-flop focus gabriels horn galileo gamma function gaussian distribution gradient graph hendecagon heptagon heron hexagon hilbert horizontal hyperbola hyperbolic function hyperbolic functions infinity integration integration by parts integration by substitution interior angle inverse function inverse hyperbolic function inverse matrix irrational irrational number irregular polygon isomorphic graph isosceles trapezium isosceles triangle kite koch curve l system lhopitals rule limit line integral locus logarithm maclaurin series major axis matrix matrix algebra mean minor axis n choose r nand gate net newton raphson method nonagon nor gate normal normal distribution not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutation matrix permutations pi pi function polar coordinates polynomial power probability probability distribution product rule proof pythagoras proof quadrilateral questions quotient rule radians radius rectangle regular polygon rhombus root sech segment set set-reset flip-flop simpsons rule sine sine rule sinh slope sloping lines solving equations solving triangles square square root squeeze theorem standard curves standard deviation star polygon statistics straight line graphs surface of revolution symmetry tangent tanh transformation transformations translation trapezium triangle turtle graphics uncountable variance vertical volume volume of revolution xnor gate xor gate