If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Worked example: Implicit differentiation

Using implicit differentiation, let's take on the challenge of the equation (x-y)² = x + y - 1 in this worked example. We utilize the chain rule and algebraic techniques to find the derivative of y with respect to x. This adventure deepens our grasp of how variables interact within intricate equations. Created by Sal Khan.

Want to join the conversation?

  • aqualine ultimate style avatar for user Charles James
    This whole "with respect to y or respect to x" thing has me very confused. And not just bc of this video, but bc my really really expensive text book doesn't really talk much about this concept. I don't really understand the dy/dx notation. I always understood it to mean simply "derivative." But now it's a variable... What does "with respect to" mean? I know what an equation in explicit and implicit form means if that helps anyone explain my problem.
    (98 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user robinvandenbliek
      I know it's a late reply but maybe people are still wondering. Let's say we have a function y=x^2. Derivative of y with respect to x simply means the rate of change in y for a very small change in x. So, the slope for a given x. If I have something like 'derivative of y with respect to x^2 then it means the rate of change in y for a very small change in x^2. So, the slope for a given value of x^2 (you plot x^2 on the x-axis in this case). We would write this second derivative as dy/d(x^2).
      (57 votes)
  • old spice man green style avatar for user newbarker
    Did Sal made a mistake? Should the answer should be the following?:

    dy/dx = (2x - 2y - 1) / (2x - 2y + 1)

    I've tried it twice and got the the same answer. Wolfram Alpha seems to confirm: http://www.wolframalpha.com/input/?i=derivative+with+respect+to+x+%28x-y%29%5E2+%3D+x+%2B+y+-+1.

    Workings:
    2(x - y)(1 - dy/dx) = 1 + dy/dx
    => (2x - 2y)(1 - dy/dx) = 1 + dy/dx
    => (2x - 2y) - (2x - 2y)dy/dx = 1 + dy/dx
    => dy/dx + (2x - 2y)dy/dx = 2x - 2y - 1
    => dy/dx(1 + (2x - 2y)) = 2x - 2y - 1
    => dy/dx = (2x - 2y - 1)/(2x - 2y + 1)
    (40 votes)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user Shivangshu423
      This is Sal's answer...

      dy/dx = (2y - 2x + 1) / (2y - 2x -1)

      If you change your answer like so...

      dy/dx = (2x - 2y - 1) / (2x - 2y + 1)
      dy/dx = -1(-2x + 2y +1) / -1(-2x + 2y -1)
      dy/dx = (-2x + 2y +1) / (-2x + 2y -1)
      dy/dx = (2y - 2x + 1) / (2y - 2x -1)

      You can see that you and Sal both have the same answer.
      (116 votes)
  • mr pants teal style avatar for user Jazi
    At , did Sal accidentally forget the - when distributing (2x - 2y) into (1 - (dy/dx))?
    (34 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Anne
    , how come we can simplify the left side of the equation by simply distributing (2x - 2y)? Do we need to FOIL it? Or would it give the same results?
    (25 votes)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user doctorfoxphd
      Way, way, way back in polynomials, Sal teaches one common alternative to the FOIL method that is called distribution. In this case, we have (2x - 2y)(1 - dy/dx). The method is to split one of the binomials into its two terms and then multiply each term methodically by the two terms of the second binomial. So, as he says, multiply (2x - 2y) times 1 and (2x - 2y) times -1(dy/dx) to get (2x - 2y) + (2y - 2x)dy/dx = 1 + dy/dx

      As you noticed, the result is the same, and it should be. It is just another way to methodically multiply binomials.
      (17 votes)
  • spunky sam blue style avatar for user Thomas Ebersole
    Why is the d/dx multiplied by the constant ( in this case -1) equal to 0? Does it always equal 0 in every problem if it is a constant?
    (7 votes)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user ~
      There's a clue in the word 'constant'. d/dx multiplied by something is an operation to find this something's rate of change with respect to x. A constant, however, doesn't change at all, it stays constant! -1 constantly has the value -1. There are no changeable variables like x associated with it (like in, for example, -1x). So it has no rate of change. The rate of change of a constant always equals 0.
      (32 votes)
  • sneak peak purple style avatar for user Vector Inc.
    At , when Sal subtracts dy/dx from both sides, how does he end up with (2y-2x-1)dy/dx?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user loumast17
      (2y-2x) dy/dx - dy/dx = (2y-2x-1) dy/dx

      It might help to imagine dy/dx as a single variable.

      (2x - 2y)z - z = (2x - 2y - 1)z

      If that doesn't help you may just want to expand and then re factor.

      (2y-2x) dy/dx - dy/dx
      2y dy/dx - 2x dy/dx - dy/dx Now factor out dy/dx
      (2y - 2x - 1) dy/dx

      Let me know if that didn't help.
      (24 votes)
  • marcimus purple style avatar for user anarocks_910
    Hi everyone,
    Quick Question - I'm stuck at when Sal subtracts a dy/dx from the left hand side and gets -1dy/dx - how is this so?

    In my mind dy/dx-dy/dx would somehow cancel eachother out but I think I've confused myself.
    (17 votes)
    Default Khan Academy avatar avatar for user
  • orange juice squid orange style avatar for user mk9391
    Shouldn't it be (2x-2y) - (2x-2y)(dy/dx) instead of (2x-2y)+(2x-2y)(dy/dx) at
    (7 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jose.Garcia0064
    At i don't understand the process of subtracting the dy/dx
    (7 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Abul Hussian Shariff
    At Sal decides to distribute (2x - 2y) and at he distributes as -> (2x - 2y) + (2x - 2y)(1 - dx/dy).
    My concern revolves around the distribution, that it should be -> (2x - 2y) - (2x - 2y)(1 - dx/dy) because (2x - 2y) distributes itself into (1 - dx/dy).
    Why has Sal put a + ?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Creeksider
      Sal's work here was correct but used a little sleight of hand that's easy to overlook. For the second part of the expression, instead of writing what you were expecting

      - (2x - 2y)(1 - dy/dx)

      he wrote

      + (2y - 2x)(1 - dy/dx)

      Notice that he reversed the order of the terms in the first parentheses: instead of 2x - 2y he wrote 2y - 2x. That reversal of order is equivalent to multiplying the expression by -1, and that allows him to change the minus sign to a +.
      (14 votes)

Video transcript

Let's get some more practice doing implicit differentiation. So let's find the derivative of y with respect to x. We're going to assume that y is a function of x. So let's apply our derivative operator to both sides of this equation. So let's apply our derivative operator. And so first, on the left hand side, we essentially are just going to apply the chain rule. First we have the derivative with respect to x of x minus y squared. So the chain rule tells us this is going to be the derivative of the something squared with respect to the something, which is just going to be 2 times x minus y to the first power. I won't write the 1 right over there. Times the derivative of the something with respect to x. Well, the derivative of x with respect to x is just 1, and the derivative of y with respect to x, that's what we're trying to solve. So it's going to be 1 minus dy dx. Let me make it a little bit clearer what I just did right over here. This right over here is the derivative of x minus y squared with respect to x minus y. And then this right over here is the derivative of x minus y with respect to x. Just the chain rule. Now let's go to the right hand side of this equation. This is going to be equal to the derivative of x with respect to x is 1. The derivative of y with respect to x. We're just going to write that as the derivative of y with respect to x. And then finally, the derivative with respect to x of a constant, that's just going to be equal to 0. Now let's see if we can solve for the derivative of y with respect to x. So the most obvious thing to do. Let's make it clear. This right over here, I can rewrite as 2x minus 2y. So let me do that so I can save some space. This is 2x minus 2y If I just distribute the 2. And now I can distribute the 2x minus 2y onto each of these terms. So 2x minus 2y times 1 is just going to be 2x minus 2y. And then 2x minus 2y times negative dy dx, that's just going to be negative 2x minus 2y. Or we could write that as 2y minus 2x times dy dx. Is equal to 1 plus dy dx. I'll do all my dy dx's in orange now. 1 plus dy dx. So now there's a couple of things that we could attempt to do. We could subtract 2x minus 2y from both sides. So let's do that. So let's subtract 2x minus 2y from both sides. So over here, we're going to subtract 2x minus 2y from that side. And then we could also subtract a dy dx from both sides, so that all of our dy dx's are on the left hand side, and all of our non dy dx's are on the right hand side. So let's do that. So we're going to subtract a dy dx on the right and a dy dx here on the left. And so what are we left with? Well, on the left hand side, these cancel out. And we're left with 2y minus 2x dy dx minus 1 dy dx, or just minus a dy dx. Let me make it clear. We could write this as a minus 1 dy dx. So this is we can essentially just add these two coefficients. So this simplifies to 2y minus 2x minus 1 times the derivative of y with respect to x, which is going to be equal to-- on this side, this cancels out. We are left with 1 minus 2x plus 2y. So let me write it that way. Or we could write this as-- so negative, negative 2y is just a positive 2y. And then we have minus 2x. And then we add that 1, plus 1. And now to solve for dy dx, we just have to divide both sides by 2y minus 2x minus 1. And we are left with-- we deserve a little bit of a drum roll at this point. As you can see, the hardest part was really the algebra to solve for dy dx. We get the derivative of y with respect to x is equal to 2y minus 2x plus 1 over 2y minus 2x minus 1.