MHB Chain Rule in Difference Calculus

topsquark
Science Advisor
Homework Helper
Insights Author
MHB
Messages
2,020
Reaction score
843
I'm having some problems using the chain rule and I'm not sure where the trouble lies. For example:

If I'm not mistaken, if we have the composite function f(g(n)) then [math]\Delta f(g(n)) = \dfrac{ \Delta f(g) }{ \Delta g } \dfrac{ \Delta g(n) }{ \Delta n }[/math]

Let [math]f(g(n)) = (n^2)^2[/math]. Then [math]f(g) = g^2[/math] and [math]g(n) = n^2[/math]

[math]\Delta f(g(n)) = \dfrac{ \Delta g^2 }{ \Delta g } \dfrac{ \Delta n^2 }{ \Delta n }[/math]

Now, [math]\Delta g^2 = (g + 1)^2 - g^2 = 2g + 1[/math]. (And similarly for [math]\Delta n^2[/math].)

So
[math]\Delta f(g(n)) = (2g + 1)(2n + 1) = (2(n^2) + 1)(2n + 1) = 4 n^3 + 2 n^2 + 2 n + 1[/math]

But if we calculate [math]\Delta n^4[/math] from the definition:
[math]\Delta n^4 = (n + 1)^4 - n^4 = 4 n^3 + 6 n^2 + 4 n + 1[/math]

Where am I going wrong?

-Dan
 
Last edited by a moderator:
Physics news on Phys.org
Hey Dan,

It seems to me that the chain rule will not generally work for difference quotients. As I see it you basically have a counterexample that proves it.
What is your rationale to think it does?

Instead the chain rule applies to the derivative, which is the difference quotient taken to the limit.
In this case the highest order term represents the derivative, and that one is a match.
Perhaps a variant of the chain rule applies to difference quotients?
 
Klaas van Aarsen said:
Hey Dan,

It seems to me that the chain rule will not generally work for difference quotients. As I see it you basically have a counterexample that proves it.
What is your rationale to think it does?

Instead the chain rule applies to the derivative, which is the difference quotient taken to the limit.
In this case the highest order term represents the derivative, and that one is a match.
Perhaps a variant of the chain rule applies to difference quotients?
Well, the fact it doesn't seem to work would be explained by the fact that it doesn't work!

I'm trying to find relationships between Difference Calculus and Differential Calculus. It seemed reasonable that there should be a chain rule. After all there's a version of both the product and quotient rules. I figured there might be extra terms involved but the derivation was nearly identical to the derivation of the "usual" chain rule:
[math]\Delta f(g(n)) = \dfrac{ \Delta f(g(n)) }{ \Delta n } = \dfrac{f(g(n + 1)) - f(g(n))}{(n + 1) - n} = \dfrac{f(g(n + 1)) - f(g(n))}{g(n + 1) - g(n)} \dfrac{g(n + 1) - g(n)}{(n + 1) - n} = \dfrac{ \Delta f(g) }{ \Delta g } \dfrac{ \Delta g(n) }{ \Delta n }[/math]

Perhaps I'm too used to Differential Calculus but I see no reason why this shouldn't work.

So. Assuming my head isn't wrapped around this right, is there a way to take a difference operation of a composite function?

-Dan
 
Last edited by a moderator:
Okay, I know what's wrong now. I had to go through three or four derivations of the chain rule to figure it out and, of course, it was staring me in the face.

The forward difference operator I've been using is defined as [math]\Delta u(n) = u(n + 1) - u(n)[/math]. But there is a slightly more general form: [math]\Delta u(n) = u(n + h) - u(n)[/math] where h can be any real number (I suppose) though I've only seen it as an integer so far. This is where my problem was... If you look at my example you will see that I automatically set [math]\Delta g = (g + 1) - g = 1[/math]. But it isn't: [math]g = n^2[/math], so [math]\Delta g = 2n + 1[/math].

Here's how the derivation is supposed to work:
[math]\Delta n^4 = \Delta (n^2)^2 = \Delta f(g(x))[/math]. I will set [math]f(g) = g^2[/math] and [math]g(n) = n^2[/math].

[math]\dfrac{ \Delta f(g(n)) }{ \Delta n } = \dfrac{ f(g(n + 1)) - f(g(n))}{g(n + 1) - g(n)} \dfrac{g(n + 1) - g(n)}{(n + 1) - n}[/math]

The last factor is [math](n + 1)^2 - n^2 = 2n + 1[/math]. For the first factor, let [math]\Delta g = g(n + 1) - g(n)[/math]. Then
[math]\dfrac{f(g(n + 1)) - f(g(n)}{g(n + 1) - g(n)} = \dfrac{f(g(n) + \Delta g) - f(g(n))}{\Delta g}[/math] <----- This is [math]\dfrac{ \Delta f(g) }{ \Delta g }[/math]

[math] = \dfrac{(g + \Delta g)^2 - g^2}{\Delta g} = \dfrac{2 g \Delta g + ( \Delta g) ^2}{ \Delta g } = 2g + \Delta g = 2(n^2) + (2n + 1)[/math]

So
[math]\dfrac{ \Delta (n^2)^2 }{ \Delta n} = ( 2(n^2) + (2n + 1))(2n + 1) = 4n^3 + 2n^2 + 4n^2 + 2n + 2n + 1 = 4n^3 + 6n^2 + 4n + 1[/math]

as required.

It's a bit more difficult to use than the Differential version. And there are few functions you can actually use it for... Most functions don't have expressions for f(a + b), so I'm pretty much left with polynomials, exponentials, and factorials and I don't really need the chain rule for those. But the whole idea was to look at different Calculus rules for Difference Calculus.

-Dan
 
topsquark said:
Well, the fact it doesn't seem to work would be explained by the fact that it doesn't work!

I'm trying to find relationships between Difference Calculus and Differential Calculus. It seemed reasonable that there should be a chain rule. After all there's a version of both the product and quotient rules. I figured there might be extra terms involved but the derivation was nearly identical to the derivation of the "usual" chain rule:
[math]\Delta f(g(n)) = \dfrac{ \Delta f(g(n)) }{ \Delta n } = \dfrac{f(g(n + 1)) - f(g(n))}{(n + 1) - n} = \dfrac{f(g(n + 1)) - f(g(n))}{g(n + 1) - g(n)} \dfrac{g(n + 1) - g(n)}{(n + 1) - n} = \dfrac{ \Delta f(g) }{ \Delta g } \dfrac{ \Delta g(n) }{ \Delta n }[/math]

Perhaps I'm too used to Differential Calculus but I see no reason why this shouldn't work.

So. Assuming my head isn't wrapped around this right, is there a way to take a difference operation of a composite function?

-Dan

In your equations you have $f(g(n+1))-f(g(n))=\Delta f(g)$, but isn't it $\Delta f(g)= f(g+1)-f(g) = f(g(n)+1)-f(g(n))$ instead?
I think we should have $f(g(n+1)-g(n))=\Delta (f\circ g)(n)$.
 
Last edited:
Klaas van Aarsen said:
In your equations you have $f(g(n+1))-f(g(n))=\Delta f(g)$, but isn't $\Delta f(g)= f(g+1)-f(g) = f(g(n)+1)-f(g(n))$ instead?
I think we should have $f(g(n+1)-g(n))=\Delta (f\circ g)(n)$.
That's the place where I was screwing up. The [math]\dfrac{ \Delta f(g(n)) }{ \Delta n }[/math] does indeed use the difference [math]\Delta n = 1[/math]. But when we convert it to [math]\dfrac{ \Delta f(g) }{ \Delta g }[/math] then the difference of 1 gets redefined to the difference [math]\Delta g \neq 1[/math]. This isn't an issue in Differential Calculus because when we take the limit as h goes to 0 [math]\Delta x = \Delta g \to 0[/math].

-Dan
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.
Back
Top