Video: Implicit Differentiation, Whatโ€™s Going on Here?

Grant Sanderson • 3Blue1Brown • Boclips

Implicit Differentiation, Whatโ€™s Going on Here?

14:53

Video Transcript

Let me share with you something I found particularly weird when I was a student first learning calculus. Letโ€™s say that you have a circle with radius five centered at the origin of the ๐‘ฅ๐‘ฆ-plane. This is something defined with the equation ๐‘ฅ squared plus ๐‘ฆ squared equals five squared. That is, all of the points on this circle are a distance five from the origin, as encapsulated by the Pythagorean theorem. Where the sum of the squares of the two legs on this triangle equal the square of the hypotenuse, five squared. And suppose that you wanna find the slope of a tangent line to this circle, maybe at the point ๐‘ฅ, ๐‘ฆ equals three, four.

Now, if youโ€™re savvy with geometry, you might already know that this tangent line is perpendicular to the radius touching it at that point. But letโ€™s say you donโ€™t already know that, or maybe you want a technique that generalizes to curves other than just circles. As with other problems about the slopes of tangent lines to curves, the key thought here is to zoom in close enough that the curve basically looks just like its own tangent line. And then ask about a tiny step along that curve. The ๐‘ฆ-component of that little step is what you might call d๐‘ฆ. And the ๐‘ฅ-component is a little d๐‘ฅ. So the slope that we want is the rise over run, d๐‘ฆ divided by d๐‘ฅ.

But unlike other tangent-slope problems in calculus, this curve is not the graph of a function. So we canโ€™t just take a simple derivative, asking about the size of some tiny nudge to the output of a function caused by some tiny nudge to the input. ๐‘ฅ is not an input and ๐‘ฆ is not an output. Theyโ€™re both just interdependent values related by some equation.

This is whatโ€™s called an implicit curve. Itโ€™s just the set of all points ๐‘ฅ, ๐‘ฆ that satisfy some property written in terms of the two variables ๐‘ฅ and ๐‘ฆ. The procedure for how you actually find d๐‘ฆ d๐‘ฅ for curves like this is the thing that I found very weird as a calculus student. You take the derivative of both sides, like this. For ๐‘ฅ squared, you write two ๐‘ฅ times d๐‘ฅ. And similarly, ๐‘ฆ squared becomes two ๐‘ฆ times d๐‘ฆ. And then, the derivative of that constant, five squared, on the right is just zero. Now, you can see why this feels a little strange, right? What does it mean to take the derivative of an expression that has multiple variables in it? And why is it that weโ€™re tacking on the little d๐‘ฆ and the little d๐‘ฅ in this way?

But, if you just blindly move forward with what you get, you can rearrange this equation and find an expression for d๐‘ฆ divided by d๐‘ฅ. Which, in this case, comes out to be negative ๐‘ฅ divided by ๐‘ฆ. So at the point with coordinates ๐‘ฅ, ๐‘ฆ equals three, four, that slope would be negative three divided by four, evidently. This strange process is called implicit differentiation. And donโ€™t worry, I have an explanation for how you can interpret taking a derivative of an expression with two variables like this. But first, I wanna set aside this particular problem and show how itโ€™s connected to a different type of calculus problem, something called a related-rates problem.

Imagine a five-meter-long ladder held up against a wall. Where the top of the ladder starts four meters above the ground, which, by the Pythagorean theorem, means that the bottom is three meters away from the wall. And letโ€™s say itโ€™s slipping down in such a way that the top of the ladder is dropping at a rate of one meter per second. The question is, in that initial moment, whatโ€™s the rate at which the bottom of the ladder is moving away from the wall? Itโ€™s interesting, right? That distance from the bottom of the ladder to the wall is 100 percent determined by the distance from the top of the ladder to the floor. So we should have enough information to figure out how the rates of change for each of those values actually depend on each other. But it might not be entirely clear how exactly you relate those two.

First things first, itโ€™s always nice to give names to the quantities that we care about. So letโ€™s label that distance from the top of the ladder to the ground ๐‘ฆ of ๐‘ก, written as a function of time cause itโ€™s changing. Likewise, label the distance between the bottom of the ladder and the wall ๐‘ฅ of ๐‘ก. The key equation that relates these terms is the Pythagorean theorem, ๐‘ฅ of ๐‘ก squared plus ๐‘ฆ of ๐‘ก squared equals five squared. What makes that a powerful equation to use is that itโ€™s true at all points of time. Now, one way that you could solve this would be to isolate ๐‘ฅ of ๐‘ก. And then you figure out what ๐‘ฆ of ๐‘ก has to be based on that one-meter-per-second drop rate. And you could take the derivative of the resulting function, d๐‘ฅ d๐‘ก, the rate at which ๐‘ฅ is changing with respect to time.

And thatโ€™s fine; it involves a couple layers of using the chain rule. And itโ€™ll definitely work for you. But I wanna show a different way that you can think about the same problem. This left-hand side of the equation is a function of time, right? It just so happens to equal a constant, meaning the value evidently doesnโ€™t change while time passes. But itโ€™s still written as an expression dependent on time, which means we can manipulate it like any other function that has ๐‘ก as an input. In particular, we can take a derivative of this left-hand side. Which is a way of saying, โ€œIf I let a little bit of time pass, some small d๐‘ก, which causes ๐‘ฆ to slightly decrease and ๐‘ฅ to slightly increase, how much does this expression change?โ€

On the one hand, we know that that derivative should be zero, since the expression is a constant. And constants donโ€™t care about your tiny nudges in time. They just remain unchanged. But on the other hand, what do you get when you compute this derivative? Well, the derivative of ๐‘ฅ of ๐‘ก squared is two times ๐‘ฅ of ๐‘ก times the derivative of ๐‘ฅ. Thatโ€™s the chain rule that I talked about last video. Two ๐‘ฅ d๐‘ฅ represents the size of a change to ๐‘ฅ squared caused by some change to ๐‘ฅ, and then weโ€™re dividing out by d๐‘ก. Likewise, the rate at which ๐‘ฆ of ๐‘ก squared is changing is two times ๐‘ฆ of ๐‘ก times the derivative of ๐‘ฆ.

Now evidently, this whole expression must be zero. And thatโ€™s an equivalent way of saying that ๐‘ฅ squared plus ๐‘ฆ squared must not change while the ladder moves. At the very start, time ๐‘ก equals zero, the height, ๐‘ฆ of ๐‘ก, is four meters, and that distance, ๐‘ฅ of ๐‘ก, is three meters. And since the top of the ladder is dropping at a rate of one meter per second, that derivative, d๐‘ฆ d๐‘ก, is negative one meters per second. Now this gives us enough information to isolate the derivative, d๐‘ฅ d๐‘ก. And when you work it out, it comes out to be four-thirds meters per second.

The reason I bring up this ladder problem is that I want you to compare it to the problem of finding the slope of a tangent line to the circle. In both cases, we had the equation ๐‘ฅ squared plus ๐‘ฆ squared equals five squared. And in both cases, we ended up taking the derivative of each side of this expression. But for the ladder question, these expressions were functions of time. So taking the derivative has a clear meaning. Itโ€™s the rate at which the expression changes as time changes. But what makes the circle situation strange is that rather than saying that small amount of time, d๐‘ก, has passed, which causes ๐‘ฅ and ๐‘ฆ to change. The derivative just has these tiny nudges, d๐‘ฅ and d๐‘ฆ, just floating free, not tied to some other common variable, like time. Let me show you a nice way to think about this.

Letโ€™s give this expression, ๐‘ฅ squared plus ๐‘ฆ squared, a name, maybe ๐‘†. ๐‘† is essentially a function of two variables. It takes every point ๐‘ฅ, ๐‘ฆ on the plane and associates it with a number. For points on this circle, that number happens to be 25. If you step off the circle away from the center, that value would be bigger. For other points ๐‘ฅ, ๐‘ฆ closer to the origin, that value would be smaller. Now what it means to take a derivative of this expression, a derivative of ๐‘†, is to consider a tiny change to both of these variables. Some tiny change, d๐‘ฅ, to ๐‘ฅ and some tiny change, d๐‘ฆ, to ๐‘ฆ. And not necessarily one that keeps you on the circle, by the way. Itโ€™s just any tiny step in any direction of the ๐‘ฅ๐‘ฆ-plane. And from there you ask, how much does the value of ๐‘† change? And that difference, the difference in the value of ๐‘† before the nudge and after the nudge, is what Iโ€™m writing as d๐‘†.

For example, in this picture, weโ€™re starting off at a point where ๐‘ฅ equals three and where ๐‘ฆ equals four. And letโ€™s just say that that step I drew has d๐‘ฅ at negative 0.02 and d๐‘ฆ at negative 0.01. Then the decrease in ๐‘†, the amount that ๐‘ฅ squared plus ๐‘ฆ squared changes over that step, would be about two times three times negative 0.02 plus two times four times negative 0.01. Thatโ€™s what this derivative expression, two ๐‘ฅ d๐‘ฅ plus two ๐‘ฆ d๐‘ฆ, actually means. Itโ€™s a recipe for telling you how much the value ๐‘ฅ squared plus ๐‘ฆ squared changes as determined by the point ๐‘ฅ, ๐‘ฆ where you start and the tiny step d๐‘ฅ, d๐‘ฆ that you take. And as with all things derivative, this is only an approximation. But itโ€™s one that gets truer and truer for smaller and smaller choices of d๐‘ฅ and d๐‘ฆ. The key point here is that when you restrict yourself to steps along the circle, youโ€™re essentially saying you want to ensure that this value of ๐‘† doesnโ€™t change. It starts at a value of 25, and you wanna keep it at a value of 25. That is, d๐‘† should be zero.

So setting this expression two ๐‘ฅ d๐‘ฅ plus two ๐‘ฆ d๐‘ฆ equal to zero is the condition under which one of these tiny steps actually stays on the circle. Again, this is only an approximation. Speaking more precisely, that condition is what keeps you on the tangent line of the circle, not the circle itself. But for tiny enough steps, those are essentially the same thing. Of course, thereโ€™s nothing special about the expression ๐‘ฅ squared plus ๐‘ฆ squared equals five squared. Itโ€™s always nice to think through more examples. So letโ€™s consider this expression sin of ๐‘ฅ times ๐‘ฆ squared equals ๐‘ฅ. This corresponds to a whole bunch of U-shaped curves on the plane. And those curves, remember, represent all of the points ๐‘ฅ, ๐‘ฆ where the value of sin of ๐‘ฅ times ๐‘ฆ squared happens to equal the value of ๐‘ฅ.

Now, imagine taking some tiny step with components d๐‘ฅ, d๐‘ฆ and not necessarily one that keeps you on the curve. Taking the derivative of each side of this equation is gonna tell us how much the value of that side changes during the step. On the left side, the product rule that we talked through last video tells us that this should be left d right plus right d left. That is, sin of ๐‘ฅ times the change to ๐‘ฆ squared, which is two ๐‘ฆ times d๐‘ฆ, plus ๐‘ฆ squared times the change to sin of ๐‘ฅ, which is cos of ๐‘ฅ times d๐‘ฅ. The right side is simply ๐‘ฅ, so the size of a change to that value is exactly d๐‘ฅ, right? Now setting these two sides equal to each other is a way of saying, โ€œWhatever your tiny step with coordinates d๐‘ฅ and d๐‘ฆ is, if itโ€™s gonna keep us on the curve, the values of both the left-hand side and the right-hand side must change by the same amount.โ€ Thatโ€™s the only way that this top equation can remain true.

From there, depending on what problem youโ€™re trying to solve, you have something to work with algebraically. And maybe the most common goal is to try to figure out what d๐‘ฆ divided by d๐‘ฅ is. As a final example here, I wanna show how you can actually use this technique of implicit differentiation to figure out new derivative formulas. Iโ€™ve mentioned that the derivative of ๐‘’ to the ๐‘ฅ is itself. But what about the derivative of its inverse function, the natural log of ๐‘ฅ? Well, the graph of the natural log of ๐‘ฅ can be thought of as an implicit curve. Itโ€™s all of the points ๐‘ฅ, ๐‘ฆ on the plane where ๐‘ฆ happens to equal ln of ๐‘ฅ. It just happens to be the case that the ๐‘ฅs and ๐‘ฆs of this equation arenโ€™t as intermingled as they were in our other examples. The slope of this graph, d๐‘ฆ divided by d๐‘ฅ, should be the derivative of ln of ๐‘ฅ, right? Well, to find that, first rearrange this equation, ๐‘ฆ equals ln of ๐‘ฅ, to be ๐‘’ to the ๐‘ฆ equals ๐‘ฅ. This is exactly what the natural log of ๐‘ฅ means. Itโ€™s saying ๐‘’ to the what equals ๐‘ฅ.

Since we know the derivative of ๐‘’ to the ๐‘ฆ, we can take the derivative of both sides here. Effectively asking how a tiny step with components d๐‘ฅ, d๐‘ฆ changes the value of each one of these sides. To ensure that a step stays on the curve, the change to this left side of the equation, which is ๐‘’ to the ๐‘ฆ times ๐‘‘๐‘ฆ, must equal the change to the right side, which in this case is just d๐‘ฅ. Rearranging, that means that d๐‘ฆ divided by d๐‘ฅ, the slope of our graph, equals one divided by ๐‘’ to the ๐‘ฆ. And when weโ€™re on the curve, ๐‘’ to the ๐‘ฆ is by definition the same thing as ๐‘ฅ. So evidently, the slope is one divided by ๐‘ฅ. And of course, an expression for the slope of a graph of a function written in terms of ๐‘ฅ like this is the derivative of that function. So evidently, the derivative of ln of ๐‘ฅ is one divided by ๐‘ฅ.

By the way, all of this is a little sneak peek into multivariable calculus. Where you consider functions that have multiple inputs and how they change as you tweak those multiple inputs. The key, as always, is to have a clear image in your head of what tiny nudges are at play and how exactly they depend on each other.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.