# Differentiation - derivative of an inverse function

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:

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)*:

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

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:

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**.

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:

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)*:

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:

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

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:

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

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

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

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)*:

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:

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

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)*:

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

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

Equating these gives:

Rearranging gives:

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.

## Example - inverse sine function

We can use this to find the derivative of the inverse sine function. For this, we have:

We will initially restrict ourselves to angles in the range *[-π/2, π/2]*, for reasons that will be clear later. It isn't particularly easy to differentiate the inverse sine function directly, but of course, we know how to differentiate the sine function, so it seems ideal for the approach we have been using in this article. We can use the formula from before:

Here is a graph of the inverse sine function (left) and the sine function (right):

We can differentiate *g*, it is a standard result:

Now we can find *g'(f(x))*:

Unfortunately, that doesn't look very helpful. We still have an inverse sine, but now it is wrapped in a cosine. It looks worse than the original expression!

But remember what we did with the log case previously? We managed to arrange the expression so we had the exponential of the log of x, which of course is just x. If we can somehow adjust this expression so we are finding the sine of the inverse sine, that will also reduce to *x* (subject to a few caveats we will get to shortly).

Fortunately, Pythagoras comes to our rescue. We know from the Pythagorean identity that:

This can be rearranged (we will assume the positive root for now):

We can apply this to our original problem, by setting *u* equal to the inverse sine of *x*:

This gives us exactly what we need:

The sine of the inverse sine is just *x*:

Finally, we can find an expression or the derivative of *f*:

We just have a couple of loose ends to tidy up. First, we assumed the positive square root. This is valid because we limited our range of angles to *[-π/2, π/2]*, and as is clear from the graph above that the slope of the inverse sine function is positive in that region. Secondly, we assumed the inverse sine function is single-valued. Again, the range limitation guarantees this.

Since the sine curve is cyclic, it would be possible to extend this to other parts of the curve by taking care to select the positive or negative root depending on the angle value.

## See also

- Slope of a curve
- Differentiation from first principles - x²
- Differentiation from first principles - a to the power x
- Second derivative and sketching curves
- Differentiation - the product rule
- Differentiation - the quotient rule
- Differentiation - the chain rule
- Derivative of sine, geometric proof
- Differentiation - L'Hôpital's rule

## Join the GraphicMaths Newletter

Sign up using this form to receive an email when new content is added:

## Popular tags

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