2.11: Implicit Differentiation
( \newcommand{\kernel}{\mathrm{null}\,}\)
Implicit differentiation is a simple trick that is used to compute derivatives of functions either
- when you don't know an explicit formula for the function, but you know an equation that the function obeys or
- even when you have an explicit, but complicated, formula for the function, and the function obeys a simple equation.
The trick is just to differentiate both sides of the equation and then solve for the derivative we are seeking. In fact we have already done this, without using the name “implicit differentiation”, when we found the derivative of logx in the previous section. There we knew that the function f(x)=logx satisfied the equation ef(x)=x for all x. That is, the functions ef(x) and x are in fact the same function and so have the same derivative. So we had
ddxef(x)=ddxx=1
We then used the chain rule to get ddxef(x)=ef(x)f′(x), which told us that f′(x) obeys the equation
ef(x)f′(x)=1and we can now solve for f′(x)f′(x)=e−f(x)=e−logx=1x.
The typical way to get used to implicit differentiation is to play with problems involving tangent lines to curves. So here are a few examples finding the equations of tangent lines to curves. Recall, from Theorem 2.3.4, that, in general, the tangent line to the curve y=f(x) at (x0,y0) is y=f(x0)+f′(x0)(x−x0)=y0+f′(x0)(x−x0).
Find the equation of the tangent line to y=y3+xy+x3 at x=1.
This is a very standard sounding example, but made a little complicated by the fact that the curve is given by a cubic equation — which means we cannot solve directly for y in terms of x or vice versa. So we really do need implicit differentiation.
- First notice that when x=1 the equation, y=y3+xy+x3, of the curve simplifies to y=y3+y+1 or y3=−1, which we can solve 1: y=−1. So we know that the curve passes through (1,−1) when x=1.
- Now, to find the slope of the tangent line at (1,−1), pretend that our curve is y=f(x) so that f(x) obeys
f(x)=f(x)3+xf(x)+x3
for all x. Differentiating both sides givesf′(x)=3f(x)2f′(x)+f(x)+xf′(x)+3x2
- At this point we could isolate for f′(x) and write it in terms of f(x) and x, but since we only want answers when x=1, let us substitute in x=1 and f(1)=−1 (since the curve passes through (1,−1)) and clean things up before doing anything else.
- Subbing in x=1, f(1)=−1 gives
f′(1)=3f′(1)−1+f′(1)+3 and so f′(1)=−23
- The equation of the tangent line is
y=y0+f′(x0)(x−x0)=−1−23(x−1)=−23x−13
We can further clean up the equation of the line to write it as 2x+3y=−1.
In the previous example we replace y by f(x) in the middle of the computation. We don't actually have to do this. When we are writing out our solution we can remember that y is a function of x. So we can start with
y=y3+xy+x3
and differentiate remembering that y≡y(x)
y′=3y2y′+xy′+y+3x2
And now substitute x=1,y=−1 to get
y′(1)=3⋅y′(1)+y′(1)−1+3and soy′(1)=−23
The next one is at the same time a bit easier (because it is a quadratic) and a bit harder (because we are asked for the tangent at a general point on the curve, not a specific one).
Let (x0,y0) be a point on the ellipse 3x2+5y2=7. Find the equation for the tangent lines when x=1 and y is positive. Then find an equation for the tangent line to the ellipse at a general point (x0,y0).
Since we are not given an specific point x0 we are going to have to be careful with the second half of this question.
- When x=1 the equation simplifies to
3+5y2=75y2=4y=±2√5.
We are only interested in positive y, so our point on the curve is (1,2/√5). - Now we use implicit differentiation to find dydx at this point. First we pretend that we have solved the curve explicitly, for some interval of x's, as y=f(x). The equation becomes
3x2+5f(x)2=7now differentiate6x+10f(x)f′(x)=0f′(x)=−3x5f(x)
- When x=1,y=2/√5 this becomes
f′(1)=−35⋅2/√5=−32√5
So the tangent line passes through (1,2/√5) and has slope −32√5. Hence the tangent line has equationy=y0+f′(x0)(x−x0)=2√5−32√5(x−1)=7−3x2√5or equivalently3x+2√5y=7
Now we should go back and do the same but for a general point on the curve (x0,y0):
- A good first step here is to sketch the curve. Since this is an ellipse, it is pretty straight-forward.
- Notice that there are two points on the ellipse — the extreme right and left points (x0,y0)=±(√73,0) — at which the tangent line is vertical. In those two cases, the tangent line is just x=x0.
- Since this is a quadratic for y, we could solve it explicitly to get
y=±√7−3x25
and choose the positive or negative branch as appropriate. Then we could differentiate to find the slope and put things together to get the tangent line.
But even in this relatively easy case, it is computationally cleaner, and hence less vulnerable to mechanical errors, to use implicit differentiation. So that's what we'll do.
- Now we could again “pretend” that we have solved the equation for the ellipse for y=f(x) near (x0,y0), but let's not do that. Instead (as we did just before this example) just remember that when we differentiate y is really a function of x. So starting from
3x2+5y2=7differentiating gives6x+5⋅2y⋅y′=0
We can then solve this for y′:y′=−3x5y
where y′ and y are both functions of x. - Hence at the point (x0,y0) we have
y′|(x0,y0)=−3x05y0
This is the slope of the tangent line at (x0,y0) and so its equation isy=y0+y′⋅(x−x0)=y0−3x05y0(x−x0)
We can simplify this by multiplying through by 5y0 to get
5y0y=5y20−3x0x+3x20We can clean this up more by moving all the terms that contain x or y to the left-hand side and everything else to the right:
3x0x+5y0y=3x20+5y20But there is one more thing we can do, our original equation is 3x2+5y2=7 for all points on the curve, so we know that 3x20+5y20=7. This cleans up the right-hand side.
3x0x+5y0y=7 - In deriving this formula for the tangent line at (x0,y0) we have assumed that y0≠0. But in fact the final answer happens to also work when y0=0 (which means x0=±√73), so that the tangent line is x=x0.
We can also check that our answer for general (x0,y0) reduces to our answer for x0=1.
- When x0=1 we worked out that y0=2/√5.
- Plugging this into our answer above gives
3x0x+5y0y=7sub in (x0,y0)=(1,2/√5):3x+52√5y=7clean up a little3x+2√5y=7
as required.
At which points does the curve x2−xy+y2=3 cross the x–axis? Are the tangent lines to the curve at those points parallel?
This is a 2 part question — first the x-intercepts and then we need to examine tangent lines.
- Finding where the curve crosses the x-axis is straight forward. It does so when y=0. This means x satisfies
x2−x⋅0+02=3 so x=±√3.
So the curve crosses the x–axis at two points (±√3,0). - Now we need to find the tangent lines at those points. But we don't actually need the lines, just their slopes. Again we can pretend that near one of those points the curve is y=f(x). Applying ddx to both sides of x2−xf(x)+f(x)2=3 gives
2x−f(x)−xf′(x)+2f(x)f′(x)=0
etc etc. - But let us stop “pretending”. Just make sure we remember that y is a function of x when we differentiate:
x2−xy+y2=3start with the curve, and differentiate2x−xy′−y+2yy′=0
Now substitute in the first point, x=+√3,y=0:2√3−√3y′+0=0y′=2
And now do the second point x=−√3,y=0:−2√3+√3y′+0=0y′=2
Thus the slope is the same at x=√3 and x=−√3 and the tangent lines are parallel.
Okay — let's get away from curves and do something a little different.
You are standing at the origin. At time zero a pitcher throws a ball at your head 2.
The position of the (centre of the) ball at time t is x(t)=d−vt, where d is the distance from your head to the pitcher's mound and v is the ball's velocity. Your eye sees the ball filling 3 an angle 2θ(t) with
sin(θ(t))=rd−vt
where r is the radius of the baseball. The question is “How fast is θ growing at time t?” That is, what is dθdt?
- We don't know (yet) how to solve this equation to find θ(t) explicitly. So we use implicit differentiation.
- To do so we apply ddt to both sides of our equation. This gives
cos(θ(t))⋅θ′(t)=rv(d−vt)2
- Then we solve for θ′(t):
θ′(t)=rv(d−vt)2cos(θ(t))
- As is often the case, when using implicit differentiation, this answer is not very satisfying because it contains θ(t), for which we still do not have an explicit formula. However in this case we can get an explicit formula for cos(θ(t)), without having an explicit formula for θ(t), just by looking at the right–angled triangle in Figure 2.11.5, above.
- The hypotenuse of that triangle has length d−vt. By Pythagoras, the length of the side of the triangle adjacent of the angle θ(t) is √(d−vt)2−r2. So
cos(θ(t))=√(d−vt)2−r2d−vt
andθ′(t)=rv(d−vt)√(d−vt)2−r2
Okay — just one more tangent-to-the-curve example and then we'll go on to something different.
Let (x0,y0) be a point on the astroid 4 5
x23+y23=1.
Find an equation for the tangent line to the astroid at (x0,y0).
- As was the case in examples above we can rewrite the equation of the astroid near (x0,y0) in the form y=f(x), with an explicit f(x), by solving the equation x23+y23=1. But again, it is computationally cleaner, and hence less vulnerable to mechanical errors, to use implicit differentiation. So that's what we'll do.
- First up, since (x0,y0) lies on the curve, it satisfies
x230+y230=1.
- Now, no pretending that y=f(x), this time — just make sure we remember when we differentiate that y changes with x.
x23+y23=1
Start with the curve, and then differentiate
23x−13+23y−13y′=0 - Note the derivative of x23, namely 23x−13, and the derivative of y23, namely 23y−13y′, are defined only when x≠0 and y≠0. We are interested in the case that x=x0 and y=y0. So we better assume that x0≠0 and y0≠0. Probably something weird happens when x0=0 or y0=0. We'll come back to this shortly.
- To continue on, we set x=x0,y=y0 in the equation above, and then solve for y′:
23x−130+23y−130y′(x)=0⟹y′(x0)=−(y0x0)13
This is the slope of the tangent line and its equation isy=y0+f′(x0)(x−x0)=y0−(y0x0)13(x−x0)
Now let's think a little bit about what the tangent line slope of −3√y0x0 tells us about the astroid.
- First, as a preliminary observation, note that since x230≥0 and y230≥0 the equation x230+y230=1 of the astroid forces 0≤x230,y230≤1 and hence −1≤x0,y0≤1.
- For all x0,y0>0 the slope −3√y0x0<0. So at all points on the astroid that are in the first quadrant, the tangent line has negative slope, i.e. is “leaning backwards”.
- As x0 tends to zero, y0 tends to ±1 and the tangent line slope tends to infinity. So at points on the astroid near (0,±1), the tangent line is almost vertical.
- As y0 tends to zero, x0 tends to ±1 and the tangent line slope tends to zero. So at points on the astroid near (±1,0), the tangent line is almost horizontal.
Here is a figure illustrating all this.
Sure enough, as we speculated earlier, something weird does happen to the astroid when x0 or y0 is zero. The astroid is pointy, and does not have a tangent there.
Exercises
Stage 1
If we implicitly differentiate x2+y2=1, we get the equation 2x+2yy′=0. In the step where we differentiate y2 to obtain 2yy′, which rule(s) below are we using? (a) power rule, (b) chain rule, (c) quotient rule , (d) derivatives of exponential functions
Using the picture below, estimate dydx at the three points where the curve crosses the y-axis.
Remark: for this curve, one value of x may correspond to multiple values of y. So, we cannot express this curve as y=f(x) for any function x. This is one typical situation where we might use implicit differentiation.
Consider the unit circle, formed by all points (x,y) that satisfy x2+y2=1.
- Is there a function f(x) so that y=f(x) completely describes the unit circle? That is, so that the points (x,y) that make the equation y=f(x) true are exactly the same points that make the equation x2+y2=1 true?
- Is there a function f′(x) so that y=f′(x) completely describes the slope of the unit circle? That is, so that for every point (x,y) on the unit circle, the slope of the tangent line to the circle at that point is given by f′(x)?
- Use implicit differentiation to find an expression for dydx. Simplify until the expression is a function in terms of x only (not y), or explain why this is impossible.
Stage 2
Find dydx if xy+ex+ey=1.
If ey=xy2+x, compute dydx.
If x2tan(πy/4)+2xlog(y)=16, then find y′ at the points where y=1.
If x3+y4=cos(x2+y) compute dydx.
If x2ey+4xcos(y)=5, then find y′ at the points where y=0.
If x2+y2=sin(x+y) compute dydx.
If x2cos(y)+2xey=8, then find y′ at the points where y=0.
At what points on the ellipse x2+3y2=1 is the tangent line parallel to the line y=x?
For the curve defined by the equation √xy=x2y−2, find the slope of the tangent line at the point (1,4).
If x2y2+xsin(y)=4, find dydx.
Stage 3
If x2+(y+1)ey=5, then find y′ at the points where y=0.
For what values of x do the circle x2+y2=1 and the ellipse x2+3y2=1 have parallel tangent lines?