00:01
Okay, so we were to show that the gradient of the quotient of two functions, f and g, is the following.
00:06
G times the gradient of f minus f times the gradient of g, all divided by the function g squared.
00:12
So this should be reminiscent of the quotient rule from calculus 1, because if you have the derivative of a quotient like this in just a single variable, this is equivalent to low, low, d -high, minus high, d.
00:33
Low all over low squared.
00:37
So we're going to prove this for the case of gradients and it actually does work out.
00:41
This is kind of a fun problem but you have to be very careful about how you set this up.
00:45
So the first thing that i'm going to do is i'm going to define a new function and instead of working with the gradient of f divided by g, i'm going to define h to be the function that is exactly f over g.
00:59
So now let's kind of isolate the gradient of h.
01:03
So we know that the gradient of h, is going to be a vector that represents all of the possible partial derivatives.
01:11
So you can take as many partial derivatives as you have inputs.
01:14
So let's say the h were a function of two variables, x and y, then it would have two components in the vector.
01:22
But in principle, this could have a million inputs, which case you'd have a million components in the vector.
01:29
I'm going to simplify this, and we're just going to say that only has two components, x and y.
01:34
And you can extend this very easily to the case of an infinite number of inputs and an infinite number of components, but i just think it's easier if we do it this way.
01:44
Then the grading of h will essentially be the partial derivative of h with respect to x.
01:50
That's the first component, and the partial of h with respect to y.
01:56
If you have more components, you can add those as well.
02:01
So all we need to do is kind of expand this out and see what happens.
02:04
So the partial derivative of h with respect to x is going to look something like this.
02:14
Okay, and let's suppose that h has two components, x and y.
02:17
Now, h, we defined to be a quotient of functions f and g.
02:23
And it is at this point that we can use the single variable quotient rule, because now we are taking the derivative with respect to a single variable of a quotient.
02:32
So now we can say that this is equivalent to g times, partial f partial x minus f partial g partial x all over g squared okay it's very it's very important that you take the derivative with respect to x only right you do not say df dx you have to this symbol because there are multiple variables that you could take the derivative with respect to so just be very careful on that okay likewise the second component is partial h partial y so you can do the same thing, and then partial y of this quotient is just going to be bottom times the derivative of the top.
03:23
Notice that i'm taking it with respect to y minus f, partial g, partial y, all over g squared.
03:33
Okay, so i know it looks really messy right now, but we're going to plug both of those in to get a sense of what this gradient is.
03:42
Okay, so partial h, which is actually what we want all along, partial f over g, is going to be, well, there's really no good way of doing this, so i'm just going to kind of copy all of this.
04:06
So that's the first component, and here's the second component.
04:12
It doesn't look like we've made any progress.
04:14
It looks like we've just honestly made this worse.
04:18
But there are things in this vector that we can fact.
04:21
Factor out.
04:22
The first thing we can factor out is this g squared in the denominator...