Step 14: Implicit Differentiation and Inverse Functions
- When \( x \) and \( y \) are tied together in one equation, such as \( x^2 + 3xy-y^2 = 3 \), differentiate both sides with respect to \( x \). Every term in \( y \) picks up a factor \( \dfrac{dy}{dx} \) by the chain rule; then collect and solve.
- For a parametric curve \( x = f(t) \), \( y = g(t) \), the gradient is \( \dfrac{dy}{dx} = \dfrac{dy/dt}{dx/dt} \). You never need to eliminate \( t \).
- For an inverse function, if \( f(a) = b \) then \( \left(f^{-1}\right)'(b) = \dfrac{1}{f'(a)} \). This gives \( \dfrac{d}{dx}\sin^{-1}x = \dfrac{1}{\sqrt{1-x^2}} \), \( \dfrac{d}{dx}\cos^{-1}x = -\dfrac{1}{\sqrt{1-x^2}} \) and \( \dfrac{d}{dx}\tan^{-1}x = \dfrac{1}{1 + x^2} \).
- Exam point: an implicit gradient usually contains both \( x \) and \( y \), so you need both coordinates of the point. And \( \left(f^{-1}\right)'(b) \) uses \( f’ \) at \( a \), the matching \( x \)-value, never at \( b \).
Curves that are not y = f(x)
Every rule so far has assumed that \( y \) is given as a formula in \( x \). Plenty of curves are not like that. The equation \( x^2 + 3xy-y^2 = 3 \) describes a perfectly good curve (Figure 1), but for \( x = 1 \) it has two points, \( (1, 1) \) and \( (1, 2) \), so it is not the graph of one function. You could solve the quadratic in \( y \) and differentiate each branch, but that is slow, and for many curves it is impossible.
The way round it uses nothing new. Along the curve, \( y \) still depends on \( x \), even if we cannot write the formula down. So differentiate both sides of the equation with respect to \( x \), treating \( y \) as an unknown function of \( x \). A term such as \( y^2 \) is then a composite (a function of \( y \), which is a function of \( x \)), and the chain rule from Step 13 attaches a factor \( \dfrac{dy}{dx} \):
After differentiating, the job is pure algebra: gather the \( \dfrac{dy}{dx} \) terms on one side, factorise, and divide.
The curve \( x^2 + 3xy-y^2 = 3 \) passes through \( (1, 2) \). Find \( \dfrac{dy}{dx} \), then the equations of the tangent and the normal at \( (1, 2) \).
At the other point with \( x = 1 \), \( (1, 1) \), the same formula gives \( \dfrac{2 + 3}{2-3} = -5 \). One formula, two different gradients: that is why you always need both coordinates.
Find the gradient of the curve \( e^{y} + xy = e \) at the point \( (0, 1) \).
There is no way to write \( y \) as a formula in \( x \) here, yet the gradient took three lines.
An economics example: the marginal rate of substitution. An indifference curve joins all the bundles of two goods that give a consumer the same utility. With utility \( U = xy^2 \), the bundles worth \( U = 144 \) satisfy \( xy^2 = 144 \): an implicit curve. Differentiating, \( y^2 + 2xy\dfrac{dy}{dx} = 0 \), so \( \dfrac{dy}{dx} = -\dfrac{y}{2x} \). At \( (4, 6) \) the slope is \( -\tfrac{3}{4} \): the consumer would give up 0.75 units of Y for one more unit of X. At \( (9, 4) \) it is only \( -\tfrac{2}{9} \). Economists call \( -\dfrac{dy}{dx} \) the marginal rate of substitution, and its fall along the curve (Figure 2) is the familiar diminishing MRS. The same algebra on an isoquant gives a firm’s marginal rate of technical substitution.
Parametric curves
Sometimes a curve is traced out by a moving point, and each coordinate is given in terms of a third variable, the parameter, usually \( t \) or \( \theta \): \( x = f(t) \), \( y = g(t) \). To find the gradient, the chain rule says \( \dfrac{dy}{dt} = \dfrac{dy}{dx} \cdot \dfrac{dx}{dt} \). Divide through and you have the rule.
The tangent is horizontal where \( \dfrac{dy}{dt} = 0 \) (and \( \dfrac{dx}{dt} \neq 0 \)), and vertical where \( \dfrac{dx}{dt} = 0 \) (and \( \dfrac{dy}{dt} \neq 0 \)).
A curve has parametric equations \( x = t^3 \), \( y = 3t-t^2 \). (a) Find the tangent at the point where \( t = 1 \). (b) Find the points where the tangent is horizontal or vertical.
Substituting \( t \) into \( x \), \( y \) and \( \dfrac{dy}{dx} \) separately, and writing all three down, avoids the classic slip of using \( t = 1 \) as if it were the x-coordinate.
For concavity you also need \( \dfrac{d^2y}{dx^2} \), and it is not \( \dfrac{d^2y/dt^2}{d^2x/dt^2} \). Apply the gradient rule again, to the function \( \dfrac{dy}{dx} \): \( \dfrac{d^2y}{dx^2} = \dfrac{d}{dt}\left(\dfrac{dy}{dx}\right) \Big/ \dfrac{dx}{dt} \). For the curve above this gives \( -\tfrac{4}{9} \) at \( t = 1 \), so the curve is concave down there. This second-derivative form is AP BC only; Step 28 takes parametric curves further.
The derivative of an inverse function
If \( f \) is one-to-one, its inverse \( f^{-1} \) undoes it, and the graph of \( y = f^{-1}(x) \) is the reflection of \( y = f(x) \) in the line \( y = x \) (Step 3). Reflection swaps \( x \) and \( y \). The point \( (a, b) \) on \( f \) becomes \( (b, a) \) on \( f^{-1} \), and a tangent that rises \( m \) for every 1 across becomes one that rises 1 for every \( m \) across. So the gradient \( m \) turns into \( \dfrac{1}{m} \).
The algebra agrees. Differentiate \( f\big(f^{-1}(x)\big) = x \) with the chain rule: \( f’\big(f^{-1}(x)\big) \cdot \left(f^{-1}\right)'(x) = 1 \). Put \( x = b \), so that \( f^{-1}(b) = a \), and divide by \( f'(a) \). If \( f'(a) = 0 \) the tangent to \( f \) is horizontal, its reflection is vertical, and \( f^{-1} \) is not differentiable at \( b \).
Let \( f(x) = 2x + \cos x \). Explain why \( f \) has an inverse, and find \( \left(f^{-1}\right)'(1) \).
Figure 3 shows the two tangents: gradient 2 at \( (0, 1) \) on \( f \), and gradient \( \tfrac{1}{2} \) at \( (1, 0) \) on its inverse.
An economics example: elasticity from inverse demand. Economists usually write demand with price as a function of quantity, for instance \( P = 100e^{-0.02Q} \). Price elasticity needs \( \dfrac{dQ}{dP} \), the other way round, and the inverse rule supplies it: \( \dfrac{dQ}{dP} = 1 \Big/ \dfrac{dP}{dQ} \). Here \( \dfrac{dP}{dQ} = -2e^{-0.02Q} = -0.02P \), so
At \( Q = 50 \) (price about $36.79) the elasticity is exactly \( -1 \): demand is unit elastic, which is where revenue is at its largest. Below 50 units demand is elastic, and above it inelastic. We never had to solve for \( Q \) in terms of \( P \).
Inverse trigonometric functions
The functions \( \sin^{-1}x \), \( \cos^{-1}x \) and \( \tan^{-1}x \) (also written \( \arcsin x \), \( \arccos x \), \( \arctan x \)) return an angle in radians, restricted to a principal range so that each has one output: \( \left[-\tfrac{\pi}{2}, \tfrac{\pi}{2}\right] \) for \( \sin^{-1} \), \( [0, \pi] \) for \( \cos^{-1} \) and \( \left(-\tfrac{\pi}{2}, \tfrac{\pi}{2}\right) \) for \( \tan^{-1} \). Implicit differentiation finds each derivative.
Take \( y = \sin^{-1}x \). Then \( \sin y = x \). Differentiate with respect to \( x \): \( \cos y\,\dfrac{dy}{dx} = 1 \), so \( \dfrac{dy}{dx} = \dfrac{1}{\cos y} \). On the principal range \( \cos y \geq 0 \), so \( \cos y = +\sqrt{1-\sin^2 y} = \sqrt{1-x^2} \). For \( y = \tan^{-1}x \), \( \tan y = x \) gives \( \sec^2 y\,\dfrac{dy}{dx} = 1 \), and \( \sec^2 y = 1 + \tan^2 y = 1 + x^2 \). The same method on \( \cos y = x \) gives the third result.
| Function | Derivative | Valid for | With the chain rule |
|---|---|---|---|
| \( \sin^{-1}x \) | \( \dfrac{1}{\sqrt{1-x^2}} \) | \( -1 < x < 1 \) | \( \dfrac{u’}{\sqrt{1-u^2}} \) |
| \( \cos^{-1}x \) | \( -\dfrac{1}{\sqrt{1-x^2}} \) | \( -1 < x < 1 \) | \( -\dfrac{u’}{\sqrt{1-u^2}} \) |
| \( \tan^{-1}x \) | \( \dfrac{1}{1 + x^2} \) | all \( x \) | \( \dfrac{u’}{1 + u^2} \) |
The first two differ only in sign, because \( \sin^{-1}x + \cos^{-1}x = \tfrac{\pi}{2} \), a constant.
Differentiate (a) \( \tan^{-1}3x \) (b) \( \sin^{-1}\left(x^2\right) \) (c) \( x\cos^{-1}x \).
Each one is a standard derivative from the table combined with a rule you already know.
Choosing a method, and higher derivatives
AP calls it “selecting procedures” (topic 3.5): look at the form of the expression and pick the rule before you write anything.
| You are given | Method |
|---|---|
| \( y \) as a formula in \( x \) | Chain, product and quotient rules (Steps 12 and 13) |
| One equation mixing \( x \) and \( y \) | Implicit differentiation |
| \( x \) and \( y \) both in terms of \( t \) | \( \dfrac{dy}{dt} \div \dfrac{dx}{dt} \) |
| A value of \( \left(f^{-1}\right)’ \) with no formula for \( f^{-1} \) | \( \dfrac{1}{f'(a)} \), where \( f(a) = b \) |
| The variable in both the base and the power, as in \( x^{1/x} \) | Take logarithms first, then differentiate implicitly |
The last row is logarithmic differentiation. Neither the power rule nor the exponential rule fits \( y = x^{1/x} \) (for \( x > 0 \)), but \( \ln y = \dfrac{\ln x}{x} \) is easy. Differentiating, \( \dfrac{1}{y}\dfrac{dy}{dx} = \dfrac{1-\ln x}{x^2} \), so \( \dfrac{dy}{dx} = x^{1/x}\,\dfrac{1-\ln x}{x^2} \), which is zero only at \( x = e \). None of the three syllabuses names this method, but it is a tidy use of implicit differentiation.
Higher-order derivatives (AP topic 3.6) are just derivatives of derivatives: \( f”(x) \) or \( \dfrac{d^2y}{dx^2} \), then \( f”'(x) \), then \( f^{(4)}(x) \) and so on. For an implicit curve, differentiate the expression for \( \dfrac{dy}{dx} \) again, still treating \( y \) as a function of \( x \), substitute the first derivative, and tidy up with the curve’s own equation.
For the curve \( x^2-y^2 = 9 \), show that \( \dfrac{d^2y}{dx^2} = -\dfrac{9}{y^3} \), and evaluate it at \( (5, 4) \).
The negative value says that the upper branch of this hyperbola is concave down at \( (5, 4) \).
Practise: 6 questions
Try each one on paper first, then check the worked answer.
EasyQ1. The curve \( x^2y + y = 10 \) passes through \( (2, 2) \). Find the gradient there. Show worked answer
So \( \dfrac{dy}{dx} = -\dfrac{2xy}{x^2 + 1} \).
At \( (2, 2) \): \( -\dfrac{8}{5} \).
EasyQ2. Differentiate \( y = \cos^{-1}(5x) \). Show worked answer
\( \dfrac{dy}{dx} = -\dfrac{5}{\sqrt{1-25x^2}} \), for \( -\tfrac{1}{5} < x < \tfrac{1}{5} \).
MediumQ3. Let \( f(x) = x^5 + x^3 + 1 \), and let \( g \) be the inverse of \( f \). Find \( g'(3) \). Show worked answer
\( f'(x) = 5x^4 + 3x^2 \), so \( f'(1) = 8 \).
\( g'(3) = \dfrac{1}{f'(1)} = \dfrac{1}{8} \).
MediumQ4. A curve has parametric equations \( x = 2\sin t \), \( y = \cos 2t \). Find the equation of the tangent at the point where \( t = \tfrac{\pi}{6} \). Show worked answer
\( \dfrac{dy}{dx} = \dfrac{-2\sin 2t}{2\cos t} = \dfrac{-4\sin t\cos t}{2\cos t} = -2\sin t \).
At \( t = \tfrac{\pi}{6} \): point \( \left(1, \tfrac{1}{2}\right) \), gradient \( -1 \).
Tangent: \( y-\tfrac{1}{2} = -(x-1) \), so \( y = \tfrac{3}{2}-x \).
(Check: \( \cos 2t = 1-2\sin^2 t \), so the curve is the parabola \( y = 1-\tfrac{1}{2}x^2 \), whose gradient \( -x \) is \( -1 \) at \( x = 1 \).)
MediumQ5. The curve \( y^3 + y = x \) passes through \( (2, 1) \). Find \( \dfrac{dy}{dx} \) and \( \dfrac{d^2y}{dx^2} \) in terms of \( y \), and evaluate both at \( (2, 1) \). Show worked answer
Chain rule again: \( \dfrac{d^2y}{dx^2} = -(3y^2 + 1)^{-2} \cdot 6y\dfrac{dy}{dx} = -\dfrac{6y}{(3y^2 + 1)^3} \).
At \( y = 1 \): \( \dfrac{dy}{dx} = \dfrac{1}{4} \) and \( \dfrac{d^2y}{dx^2} = -\dfrac{6}{64} = -\dfrac{3}{32} \).
ExamQ6. A curve has equation \( x^2 + xy + 2y^2 = 8 \). (a) Show that \( \dfrac{dy}{dx} = -\dfrac{2x + y}{x + 4y} \). [3] (b) Find the equation of the normal to the curve at the point \( (2, 1) \), giving your answer in the form \( ax + by + c = 0 \). [3] (c) Find the exact coordinates of the points on the curve where the tangent is parallel to the x-axis. [4] Show worked answer
\( (x + 4y)\dfrac{dy}{dx} = -(2x + y) \), so \( \dfrac{dy}{dx} = -\dfrac{2x + y}{x + 4y} \). [A1]
(b) At \( (2, 1) \): \( \dfrac{dy}{dx} = -\dfrac{5}{6} \). [B1]
Normal gradient \( \tfrac{6}{5} \): \( y-1 = \tfrac{6}{5}(x-2) \). [M1]
\( 5y-5 = 6x-12 \), so \( 6x-5y-7 = 0 \). [A1]
(c) Parallel to the x-axis when \( 2x + y = 0 \), so \( y = -2x \). [M1]
Substitute: \( x^2-2x^2 + 8x^2 = 8 \), so \( 7x^2 = 8 \). [M1]
\( x = \pm\sqrt{\tfrac{8}{7}} = \pm\tfrac{2\sqrt{14}}{7} \). [A1]
Points \( \left(\tfrac{2\sqrt{14}}{7}, -\tfrac{4\sqrt{14}}{7}\right) \) and \( \left(-\tfrac{2\sqrt{14}}{7}, \tfrac{4\sqrt{14}}{7}\right) \); at both, \( x + 4y = -7x \neq 0 \), so the gradient is defined. [A1]
Total: 10 marks.
Check yourself
1. Differentiating implicitly with respect to \( x \), what is \( \dfrac{d}{dx}\left(y^2\right) \)?
2. \( g \) is the inverse of \( f \), with \( f(3) = 7 \) and \( f'(3) = 5 \). What is \( g'(7) \)?
3. What is the gradient of \( y = \tan^{-1}x \) at \( x = 1 \)?
Your score: 0 out of 3
The short version
- Implicit differentiation: differentiate every term with respect to \( x \); each \( y \) term gains \( \dfrac{dy}{dx} \), and \( xy \) needs the product rule. Use both coordinates of the point.
- Parametric curves: \( \dfrac{dy}{dx} = \dfrac{dy/dt}{dx/dt} \). Horizontal tangents where \( \dfrac{dy}{dt} = 0 \), vertical where \( \dfrac{dx}{dt} = 0 \).
- Inverses: \( \left(f^{-1}\right)'(b) = \dfrac{1}{f'(a)} \) where \( f(a) = b \). Reflection in \( y = x \) turns gradient \( m \) into \( \dfrac{1}{m} \).
- \( \dfrac{d}{dx}\sin^{-1}x = \dfrac{1}{\sqrt{1-x^2}} \), \( \dfrac{d}{dx}\cos^{-1}x = -\dfrac{1}{\sqrt{1-x^2}} \), \( \dfrac{d}{dx}\tan^{-1}x = \dfrac{1}{1 + x^2} \) (9709 needs only \( \tan^{-1} \)).
- Implicit second derivatives: differentiate \( \dfrac{dy}{dx} \) again, substitute \( \dfrac{dy}{dx} \), then simplify with the curve’s equation.
- The full chapter in Mathematics Made Simple has many more worked examples and a full set of practice questions with a complete answer key.
Further reading on EconTutorials
Related in-depth articles from our blog:
