[MUSIC] What's the derivative of a product of two functions? The derivative
of a product is given by this, the Product Rule.
The derivative of f times g is the derivative of f times g plus f times the
derivative of g. It's a bunch of things to be warned about
here. This is the product of two functions, but
the derivative involves the sum of two different products.
It's the derivative of the first times the second plus the first times the
derivative of the second. Let's see an example of this rule in
action. For example, let's work out the
derivative of this product, the product of 1+2x and 1+x^2.
Alright, well here we go. This is a derivative of product, so by the Product
Rule, I'm going to differentiate the first thing, multiply by the second, and
add that to the first thing times the derivative of the second.
So, it's the derivative of the first term in the product times the second term in
the product, derivative of the first function times the second, plus the first
function, 1+2x, times the derivative of the second.
So, that's an instance of the Product Rule.
Now, this is the derivative of a sum, which is the sum of the derivatives.
So, it's the derivative of 1 plus the derivative of 2x times 1+x^2 plus 1+2x
times the derivative of a sum, which is the sum of the derivatives.
Now, the derivative of 1, that's a derivative of a constant function that's
just 0, this is the derivative of a constant
multiple so I can pull that constant multiple out of the derivative,
times 1+x^2+1+2x times, the derivative of 1 is 0,
it's the derivative of a constant, plus the derivative of x^2 is 2x.
Alright. Now, I've got 0+2 times the derivative of
x. The derivative of x is just 1.
So, that's just 2*1*(1+x^2)+(1+2x)*(0+2x).
So, there it is. I could maybe write this a little bit
more neatly. 2*(1+x^2)+(1+2x)*2x.
This is the derivative of our original function (1+2x)*(1+x^2).
We din't really need the Product Rule to compute that derivative.
So, instead of using the Product Rule on this, I'm going to first multiply this
out and then do the differentiation. Here, watch.
So, this is the derivative but I'm going to multiply all this out, alright? So,
1+2x^3, which is what I get when I multiply 2x by x^2, plus x^2, which is
1*x^2+2x*1. So now, I could differentiate this
without using the Product Rule, right? This is the derivatives of big sum,
so it's the sum of the derivatives. The derivative of one, the derivative of
2x^3, the derivative of x^2, and the derivative of 2x.
Now, the derivative of 1, that's the derivative of a constant,
that's just 0. The derivative of this constant multiple
of x^3, I can pull out the constant multiple.
The derivative of x^2 is 2x and the derivative of 2-x, so I can pull out the
constant multiple. Now, what's 2 times the derivative of
x^3? That's 2 times, the derivative of x^3 is 3x^2+2x+2 times the derivative of
x, which is 2*1. And then, I could write this maybe a
little bit more nicely. This is 6x^2+2x+2.
So, this is the derivative of our original function.
Woah. What just happened? I'm trying to differentiate 1+2x*1+x^2.
When I just used the Product Rule, I got this, 2*(1+x^2)+(1+2x)*(2x).
When I expanded and then differentiated, I got this,
6x^2+2x+2. So, are these two answers the same? Yeah.
These two answers are the same. let's see how.
I can expand out this first answer. This is 2*1+2x^2+1*2x plus 2x*2x is 4x^2.
Now look, 2, 2x^2+4x^2 gives me 6x^2.
And 1*2x gives me this 2x here. These are, in fact, the same.
Should we really be surprised by this? I mean, I did do these things in a
different order. So, in this first case, I differentiated
using the Product Rule and then I expanded what I got.
In the second case, first, I expanded and after doing expansion, then I
differentiated. More succintly in the first case, I
differentiated than expanded. In the second case, I expanded then I
differentiated. Look, you'd think the order would matter.
Usually, the order does matter. If you take a shower and then get
dressed, that's a totally different experience from getting dressed and then
stepping into the shower. The order usually does matter and you'd
think that differentiating and then expanding would do something really
different than expanding and then differentiating.
But you've got real choices when you do these derivative calculations, and yet
somehow, Mathematics is conspiring so that we can all agree on the derivative,
no matter what choices we might make on our way there.
And I think we can also all agree that that's pretty cool.
[MUSIC]