Back to the exercise lecture, the first example is fairly similar to the example that we did in the lecture.
But let’s try it out. Remember the only thing that’s going to be new here is doing the dx/dy
and then changing it to dy/dx. Our function says we have x = y² + y over y – y³. We are going to do dx/dy.
So we’re going to differentiate this like so, dx/dy. On the other side, we will be differentiating
this function with respect to y. That’s basically setting the problem up. That’s what we’re going to do.
Now in order to do this little part in the middle, we are going to have to use the quotient rule.
If I split this up into u = y² + y and v = y – y³, we’re going to be doing du/dy and dv/dy.
But we won’t bother complicating it too much in writing it out. We’ll just say u differentiated
and v differentiated. When I differentiate that, that gives me 2y + 1 with respect to y.
When I differentiate this function, it gives me 1 – 3y². Bring the power down and decrease the power by 1.
Remember the quotient rule, so the quotient rule in our case, if we just use this notation dx/dy here,
it was vdu/dx – udv/dx divided by v². When we multiply this through, we have y – y³ multiplied by 2y + 1.
You subtract udv/dx. So we have y² + y multiplied by 1 – 3y². Divide it all with v², so you have (y – y³)².
We can now expand this out just to see if there’s anything that cancels out or anything that simplifies.
We’re going to multiply this y with both terms and then the y³ with both terms. So y times 2y
gives me 2y². Then y times 1 gives me just y. I have y³ multiplied by 2y which gives me
-2y to the power of 4, and then I have –y³. I have those terms in the middle. We now look at the second.
Let’s just put brackets around here so we can distinguish them. In this case, we’re going to multiply
this through, so y² will multiply with those terms. Then the y will multiply with those two terms there.
I now have y² – 3y to the power of 4 + y – 3y³. This is all being divided by (y – y³)². Remember this is still dx/dy.
So it’s important that I keep writing that so we don’t forget to flip it right at the end.
I can times it through with the minus. So, you can either do it in one more line or do in your heads.
If I just do that here so we can see it. So, I have 2y² + y – 2y to the 4 – y³. Then I have –y² + 3y to the 4 - y + 3y³
all over (y – y³)². Let’s see if we can start to combine some terms. We have 2y² and –y², so 2y² – y² just gives me y².
We have a +y and a –y so that cancels out. So -2y to the 4 + 3y to the 4 gives me + y to the 4.
Then the last part is –y³ and +3y³, so that gives me +2y³ and it’s all over (y – y³)². Once that’s all simplified
and there’s nothing more we can do, just remember the last step. We want to find dy/dx.
We want to have dy at the top and dx at the bottom. In order to do that, we’re also going to have to swap
these two denominators and numerator here. We can now say that dy/dx, you bring the bottom
or the denominator up and the numerator down. So, we can rewrite this as (y – y³)² over y² + y to the 4 + 2y³.
That is your gradient and we’ve used the fact that dx/dy can be swapped to dy/dx.