MHB Chain Rule in Difference Calculus

AI Thread Summary
The discussion centers on the challenges of applying the chain rule in difference calculus, particularly with composite functions. The original poster, Dan, initially believed that the chain rule could be directly applied to difference quotients, but encountered discrepancies in his calculations. After further examination, he realized that the forward difference operator he used was too simplistic, as it did not account for the correct definition of \Delta g. The conversation highlights the distinction between difference calculus and differential calculus, noting that the chain rule is more complex in the former and may not apply as intuitively. Ultimately, Dan concludes that while there are relationships between the two forms of calculus, the application of the chain rule in difference calculus requires careful consideration of the definitions involved.
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
 
Back
Top