MedVision ad

Higher Derivatives and Counting Theory (2 Viewers)

braintic

Well-Known Member
Joined
Jan 20, 2011
Messages
2,137
Gender
Undisclosed
HSC
N/A
We all know the product rule f ' = u'v + uv'

When you keep differentiating you get
f '' = u''v + 2u'v' + uv''
f ''' = u'''v + 3u''v' + 3u'v'' + uv'''
f '''' = u''''v + 4u'''v' + 6u''v'' + 4u'v''' + uv''''

So you get something akin to the binomial expansion.
(And the undifferentiated f = uv also fits the pattern, coming from the first line of Pascal's triangle, where you count undifferentiated u and v as being akin to powers of zero)

Clearly I understand how direct application of the product rule gives these results (it was an easy derivation).

But I am looking for a deeper insight into how this comes about. Perhaps by applying counting theory to differentiation by first principles, but preferably through geometric intuition (I do understand the basic product rule works in a geometric sense). I get the feeling it is obvious and I am missing something.

Any suggestions?
(High school maths only please - no mention of partial derivatives or the total derivative)
 
Last edited:

Carrotsticks

Retired
Joined
Jun 29, 2009
Messages
9,494
Gender
Undisclosed
HSC
N/A
If you draw a tree diagram following the derivatives and seeing which terms match with which, you are actually just reconstructing Pascal's Triangle, which explains the coefficients.

Consider the following diagram (I hope it's clear enough). Each term has 2 branches because the product rule turns a single 'term' to the sum of two terms.



The first row says 1 and 1. This indicates that there is 1 of each term (one of u'v and one of uv').

The second row says 1, 2 and 1. This means there's 1 of the 'leftmost term' and one of the rightmost term which are u''v and uv'' respectively. However, the 2 in the middle comes from the fact that when you differentiate the terms in the row above, you get one copy from each of the above term. Since there are 2 terms directly above, you get 2 of the middle term, which is u'v'.

Likewise for the third row, you get only one copy of u'''v and uv'''. However for say u''v', you have 3 copies because one comes from the '1' in the row above and the other two come from the '2' in the row above as well, making a total of 3 copies.

If you keep continuing this, you soon see that we are essentially re-constructing Pascal's Triangle, hence why the terms appear to be following the formula nCk.

 

braintic

Well-Known Member
Joined
Jan 20, 2011
Messages
2,137
Gender
Undisclosed
HSC
N/A
If you draw a tree diagram following the derivatives and seeing which terms match with which, you are actually just reconstructing Pascal's Triangle, which explains the coefficients.

Consider the following diagram (I hope it's clear enough). Each term has 2 branches because the product rule turns a single 'term' to the sum of two terms.



The first row says 1 and 1. This indicates that there is 1 of each term (one of u'v and one of uv').

The second row says 1, 2 and 1. This means there's 1 of the 'leftmost term' and one of the rightmost term which are u''v and uv'' respectively. However, the 2 in the middle comes from the fact that when you differentiate the terms in the row above, you get one copy from each of the above term. Since there are 2 terms directly above, you get 2 of the middle term, which is u'v'.

Likewise for the third row, you get only one copy of u'''v and uv'''. However for say u''v', you have 3 copies because one comes from the '1' in the row above and the other two come from the '2' in the row above as well, making a total of 3 copies.

If you keep continuing this, you soon see that we are essentially re-constructing Pascal's Triangle, hence why the terms appear to be following the formula nCk.

Thanks for your effort here.
However ... I did indicate that I already understood how it works based on simply applying the basic product rule. I understand how counting theory works there.
I can already visualise how the basic product rule works in a geometric sense, and I am hoping to get a similar geometric 'feel' for the expanded rules. Perhaps by visualizing how differentials in a product compound when taking multiple derivatives.
 
Last edited:

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Thanks for your effort here.
However ... I did indicate that I already understood how it works based on simply applying the basic product rule. I understand how counting theory works there.
I can already visualise how the basic product rule works in a geometric sense, and I am hoping to get a similar geometric 'feel' for the expanded rules. Perhaps by visualizing how differentials in a product compound when taking multiple derivatives.
I am still not sure what you are looking for here (in particular I have no idea what you mean by understanding the product rule in a geometric sense), but another way of thinking about it:

If you are differentiating the product (uv) n times, you are hitting it with n successive differentiations, some of which will hit the u, the rest of which will hit the v.

The number of ways of choosing k of these n differentiations to hit the u is clearly nCk, which is why we get nCk copies of the term u^(k)v^(n-k) in the expansion of (uv)^(n).

This interpretation also extends immediately to differentiating things like (uvw) n times, where we will get multinomial coefficients instead of binomial coefficients.
 

Carrotsticks

Retired
Joined
Jun 29, 2009
Messages
9,494
Gender
Undisclosed
HSC
N/A
I am still not sure what you are looking for here (in particular I have no idea what you mean by understanding the product rule in a geometric sense), but another way of thinking about it:

If you are differentiating the product (uv) n times, you are hitting it with n successive differentiations, some of which will hit the u, the rest of which will hit the v.

The number of ways of choosing k of these n differentiations to hit the u is clearly nCk, which is why we get nCk copies of the term u^(k)v^(n-k) in the expansion of (uv)^(n).

This interpretation also extends immediately to differentiating things like (uvw) n times, where we will get multinomial coefficients instead of binomial coefficients.
I think he's referring to the 'proof' of the product rule using rectangles and squares?

 

braintic

Well-Known Member
Joined
Jan 20, 2011
Messages
2,137
Gender
Undisclosed
HSC
N/A
Ah right. In that case, I can't really think of any analogous picture for n differentiations.

Yes, that was more or less how I was picturing it.

I am starting to get a feel for it by deriving formulae for the second and third derivatives by first principles.

I have
f ''(x) = lim(h->0) [f(x+2h) - 2f(x+h) + f(x)] / h^2
and
f'''(x) = lim(h->0) [f(x+3h) - 3f(x+2h) + 3f(x+h) - f(x)] / h^3

So the binomial coefficients are coming through again.

Still trying to get a geometric feel for that before I look at the product rule.
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Cool, please post anything interesting you come up with.

By the way, those formulae don't imply second/third differentiability if the limits exist right? They just tell us the value of the derivative if it does happen to exist.
 

braintic

Well-Known Member
Joined
Jan 20, 2011
Messages
2,137
Gender
Undisclosed
HSC
N/A
Cool, please post anything interesting you come up with.

By the way, those formulae don't imply second/third differentiability if the limits exist right? They just tell us the value of the derivative if it does happen to exist.
I haven't considered differentiability. I am looking at this only from the perspective of a pleb high school maths teacher. I'm sure you have considerably more maths knowledge than I do, so I will have to leave it to you to examine differentiability.

My mind has diverted back to the mundane tasks of what to teach tomorrow. So I will have to return to thinking about this on the weekend.
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
I haven't considered differentiability. I am looking at this only from the perspective of a pleb high school maths teacher. I'm sure you have considerably more maths knowledge than I do, so I will have to leave it to you to examine differentiability.

My mind has diverted back to the mundane tasks of what to teach tomorrow. So I will have to return to thinking about this on the weekend.
Yeah it doesn't imply second differentiability because for functions like |x|, your limit still exists as you approach the point (0,0). Nice to have such a formula though.
 

braintic

Well-Known Member
Joined
Jan 20, 2011
Messages
2,137
Gender
Undisclosed
HSC
N/A
I haven't considered differentiability. I am looking at this only from the perspective of a pleb high school maths teacher. I'm sure you have considerably more maths knowledge than I do, so I will have to leave it to you to examine differentiability.

My mind has diverted back to the mundane tasks of what to teach tomorrow. So I will have to return to thinking about this on the weekend.
Would it make a difference if, instead of x+2h, x+h and x, I instead had x+h, x and x-h? Firstly would that formula still work, and secondly would non-differentiability show itself?
 

Carrotsticks

Retired
Joined
Jun 29, 2009
Messages
9,494
Gender
Undisclosed
HSC
N/A
Would it make a difference if, instead of x+2h, x+h and x, I instead had x+h, x and x-h? Firstly would that formula still work, and secondly would non-differentiability show itself?
Would it make a difference to what? The formula isn't any different since you are just re-indexing your terms essentially.

Non-differentiability via the limit process won't always show, as per the example with y=|x|.

If the limit doesn't exist, then the function isn't differentiable.

However, if the limit exists, there's no guarantee that the function is differentiable.
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Would it make a difference to what? The formula isn't any different since you are just re-indexing your terms essentially.

Non-differentiability via the limit process won't always show, as per the example with y=|x|.

If the limit doesn't exist, then the function isn't differentiable.

However, if the limit exists, there's no guarantee that the function is differentiable.
Actually, the "symmetric formula" for the second derivative wouldn't converge for |x|.



which does not exist.


The formula still doesn't tell us if a function is second differentiable though. Any odd function for example, no matter how ill-behaved, will make the expression identically zero at x=0. Such a symmetry can happen around any point.

There is merit in the symmetric expression over the non-symmetric expression from the numerical standpoint though (ie it IS better than just a re-indexing of terms). If a second derivative exists, then the symmetric expression converges faster (the error is something like a power of h smaller) to the correct value (so you don't need to chuck in quite as small a 'h' to get a good approximation to f'' ).
 

Carrotsticks

Retired
Joined
Jun 29, 2009
Messages
9,494
Gender
Undisclosed
HSC
N/A
Actually, the "symmetric formula" for the second derivative wouldn't converge for |x|.



which does not exist.


The formula still doesn't tell us if a function is second differentiable though. Any odd function for example, no matter how ill-behaved, will make the expression identically zero at x=0. Such a symmetry can happen around any point.

There is merit in the symmetric expression over the non-symmetric expression from the numerical standpoint though (ie it IS better than just a re-indexing of terms). If a second derivative exists, then the symmetric expression converges faster (the error is something like a power of h smaller) to the correct value (so you don't need to chuck in quite as small a 'h' to get a good approximation to f'' ).
Did not know this last part! Interesting!
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Did not know this last part! Interesting!
To be more precise, I think we need to be at least three times differentiable to show that the symmetric expression for f'' is better than the asymmetric one (in order to use Taylors to give us a handle on the error).

If we are three times continuously differentiable, then the error term improves by a full factor of h. If we are just three times differentiable, the error terms improve from a big-O to a little-o.

In any case, pretty much every function dealt with in high school is smooth.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Top