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

## Differential Calculus

### Course: Differential Calculus>Unit 3

Lesson 4: Implicit differentiation (advanced examples)

# Implicit differentiation (advanced example)

Sal finds dy/dx for e^(xy²)=x-y using implicit differentiation. Created by Sal Khan.

## Want to join the conversation?

• For those who get stuck at . I spent a few hours trying to figure out how Sal got e^xy^2 in the form he did to get the derivative. I finally found a sheet on derivatives of powers of e with the following: the derivative of powers of e is equal to e and it's exponent and/or power (times) the derivative of the exponent and/or power. I had not see this explained in any of Sal's work prior to this video so I was quite stuck (hey, this is the absolute 1st time I've done calculus so I had no clue). I hope this helps anyone who has the same question
--I thought it would have been nice for Sal to include this info regarding derivates of powers of e, but I guess he has a somewhat difficult task of deciding just how basic to explain certain things. Since I had not seen this explained prior to this point in the calculus videos (and I've watched them all up to here)......I thought this would be nice info to include here for anyone needing it --thx
(83 votes)
• This is an application of the chain rule where you take the derivative of the outer equation which is e^x (where x=the inner function) and times that by the derivative of the inner function which is xy^2 where you'll have to use the product rule to get that derivative. Also you have to think of y as a function of x, that is why he uses the chain rule again on y^2, where the outer function is (something)^2 and then you take the derivative of the inner function (y) with respect to x getting dy/dx or in case of the notation used in this video, y'
(34 votes)
• At he discusses notation and why with the capital D it is not clear whether if you are taking the derivative with respect to X. But one thing in all these videos that has not been clear to me: why with respect to X? What happens if you go the other way? Does it still work (but with a lot more hairy math)? I'm sure there is something basic I am not seeing, but any thoughts would be great.
Cheers...
(14 votes)
• I think the reason that we usually differentiate with respect to x is because this gives us the slope. And this is only because by convention x is normally the independent variable and shown on the horizontal axis when graphed.
Remember that differentiation is about the rate of change of a function with respect to some variable. dy/dx means the change in y with respect to the change in x. dy/dx = rise/run = slope. If we differentiated with respect to y (dx/dy) then we would know the change in x for a given change in y, which would be the run/rise, or reciprocal of the slope. Not any more complicated; just not as useful.
It might help to consider that in a lot of physics problems, the derivative is with respect to t (time), rather than x, because we are interested in how something changes with time. If, say, we were looking for how a horizontal position 'x' changed with time 't' then we would be interested in dx/dt.
(29 votes)
• at , when we add y' to each side, we do not have 2y'. The only difference is that the y' on the left just disappears. Why is this?
(6 votes)
• Think of it like this:
blah*y' + 1*y' = (blah + 1)y' this is the same thing, distributive property
and Sal added +1y' to both sides of the equation to get rid of the y' on the right side of the equation and you can do that because doing the same thing to both sides of the equation doesn't change the equality of the equation.
(14 votes)
• in the final solution, can you plug in x-y for the e^(xy^2) since the original equation says that they are equal? this would give a slightly less hairy expression i think.
(9 votes)
• Yes, I think you can do this. Sal does a similar thing in the next video (Derivative of x^(x^x)). Can someone more knowledgeable than I please confirm this?
(5 votes)
• at why does he get "+1)y'" and not just 2y'? it seems like there is already a y' on that side so now that he added another there should be two right?
(2 votes)
• He just skipped one step, when he added y' he got
2xy(e^xy^2)*y'+y'
Now you can't just add this and get 2y' but they both have a y' so you can do this
y'(2xy*e^xy^2+1)
(6 votes)
• At you multiply by Y' but why is the reason for this? If the product rule is just f'(x)g(x)+f(x)g'(x) which would mean from my understanding (1)(y^2) + (x)(2y)
(5 votes)
• he multiplies by y prime because each time you take the derivative of y you have to add a y prime.
(1 vote)
• Can someone PLEASE help me here. I have this problems from the Implicit Differentiation practice section, which is the exercise right after this one, but I am EXTREMELY CONFUSED.
OK, so here is the problem:
Find dy/dx for cos^2(xy)=x+y,
Ok, So the next step would be:
2cos(xy)*(-sin(xy))*(y+x(dy/dx))=1+dy/dx.
Ok cool, I got to this part.
BUT THEN the solution does this, WHICH I HAVE NO IDEA WHYYYYYYY!
2ycos(xy)*(-sin(xy))+2xcos(xy)*(-sin(xy))dy/dx=1+dy/dx.
Someone NEEDS to explain this ^ part to me and how it became to be this or else I will BLOW MY BRAINS OUT!
(4 votes)
• The derivative of y is dy, of x is dx. So that was main mistake. Note: It is easier to do these problems with the y' notation instead of the dx notation.
Here is how to solve the problem:
``cos²(xy)=x+y2cos(xy) (-sin(xy)) (xdy + y dx) = dx + dy−2cos(xy) sin(xy) (xdy + y dx) = dx + dy−2x cos(xy) sin(xy) dy −2y cos(xy) sin(xy) dx = dx + dy−2x cos(xy)(sin(xy) dy − dy = dx + 2y cos(xy) sin(xy) dx dy [−2x cos(xy) sin(xy) − 1 ] = dx [ 1 + 2y cos(xy) sin(xy) ]dy (−1)[ 1+2x cos(xy) sin(xy)] = dx [1 + 2y cos(xy) sin(xy)]dy = (−1)[1 + 2y cos(xy )sin(xy)] dx / [1+2x cos(xy) sin(xy)] dy/dx =  (−1)[1 + 2y cos(xy) sin(xy)] / [1+2x cos(xy) sin(xy)] ``

You can leave it like that or you can use the following property to simplify:
2 sin(u) cos(u) = sin(2u)
Thus,
``dy/dx = (-1) { y sin(2xy) + 1 ] / [ x sin(2xy) + 1]``
(1 vote)
• Would it be ok to rewrite the original relationship as:
xy^2 = ln(x -y)
I think this is slightly less messy to differentiate.
(3 votes)
• It will be a valid operation but you'll end up with a different derivative for a different relation. See for yourself - http://www.wolframalpha.com/input/?i=x*y%5E2+%3D+ln(x-y)
(2 votes)
• Could I take natural logarithm on the both sides and then do differentiation on xy^2 = ln(x-y) instead of differentiating e^xy^2 = x-y directly?
(3 votes)
• In line 3, instead of multiplying e^xy^2 to each term in the brackets, i took it to the right side and i took the derivative from the right side to the left. So the equation became...
y^2+(2xy)(y')+y'=1/e^xy^2
(y')(2xy)+y'=(1-(y^2)(e^xy^2))/e^xy^2
y'(2xy+1)=(1-(y^2)(e^xy^2))/e^xy^2
therfore
y'=(1-(y^2)(e^xy^2))/(2xy)(e^xy^2)+e^xy^2

where did i go wrong?
(2 votes)
• I think you made a mistake in your first line, While you did switch (y') to the left when you decided to divide everything with (e^xy^2) you forgot to also divide the (y') you just switched.

So instead
y^2+(2xy)(y')+y'=1/e^xy^2
it should be
y^2+(2xy)(y')+(y')/e^xy^2=1/e^xy^2
(2 votes)

## Video transcript

So let's take another implicit derivative of the somewhat crazy relationship. And I've graphed the relationship here. As you can see, it is actually quite bizarre. e to the x times y squared is equal to x minus y. This is some at least in the range that's depicted here, the x's and the y's that satisfy this relationship. Well let's take the derivative of both sides. So we'll apply our derivative operator to both sides. And actually this is a good chance to maybe explore some different notation. We tend to be using that notation, but oftentimes you'll see a derivative operator that just looks like a big capital D. So maybe we'll do that right over here. So let me make it clear. This is the equivalent of saying d over dx. I'll just use this big capital D operator so that you are familiar with the notation. And instead of using dy dx for the derivative of y with respect to x, I'm just going to write that as y prime. So we get a little bit of practice with different notation. So let's take the derivative of this thing right over here. Well we're going to apply the chain rule. Actually, we're going to apply the chain rule multiple times here. The derivative of e to the something with respect to that something is going to be e to the something times the derivative of that something with respect to x. So times the derivative of xy squared. So that's our left-hand side. We aren't done taking the derivative yet. And on our right-hand side, the derivative of x is just 1. And the derivative with respect to x of y is just going to be minus-- or I could write-- negative dy dx. But instead of writing dy dx, I'm going to write y prime. As you can tell, I like this notation and this notation more because it makes it explicit that I'm taking the derivative with respect to x. Here, we just have to assume that we're taking the derivative with respect to x. Here, we have to assume that's the derivative of y with respect to x. But anyway let's stick with this notation right over here. Actually, let me make all of my y primes, all my derivatives of y with respect to x, let me make them pink so I keep track of them. So once again, this is going to be equal to e to the xy squared times the derivative of this. Well the derivative of this, we can just use the product and actually a little bit of the chain rule here. So the derivative of x is just 1 times the second function. So it's going to be times y squared. And then to that, we're going to add the product of the first function which is this x times the derivative of y squared with respect to x. Well that's going to be the derivative of y squared with respect to y, which is just going to be 2y times the derivative of y with respect to x, which we are now writing as y prime. And then that's going to be equal to 1 minus y prime. And like we've been doing, we now have to just solve for y prime. So let's distribute this exponential, this e to the xy squared. And we get e, or maybe I should say y squared times e to the xy squared. So that's that. Plus 2xye to the xy squared. y prime, the derivative of y with respect to x, is equal to 1 minus the derivative of y with respect to x. Now let's get all of our y primes on one side. So let's add y prime to both sides. So let's add-- and just to be clear, I'm adding one y prime to both sides. So let's add a y prime to both sides. And let's subtract this business from both sides. So let's subtract y squared e to the xy squared subtracting from both sides. So we're going to subtract y squared e to the xy squared. And we are left with 2xye to the xy squared plus 1 times y prime. We had this many y primes and then we add another 1y prime so we have this many plus 1 y primes. That's going to be equal to-- well, I purposely added y prime to both sides and so we are left with 1 minus-- this is kind of a crazy expression-- y squared times e to the xy squared. And now we just have to divide both sides by this. And we're left with the derivative of y with respect to x is equal to this, which I will just copy and paste. Actually, let me just rewrite it. Scroll down a little bit. It's equal to 1 minus y squared e to the xy squared over this business. Let me get some more space. 2xye to the xy squared plus 1. And we're done. It was kind of crazy, but fundamentally no different than what we've been doing in the last few examples.