Chain Rule in Difference Calculus

  • #1
topsquark
Science Advisor
Insights Author
Gold Member
MHB
2,020
829
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 \(\displaystyle \Delta f(g(n)) = \dfrac{ \Delta f(g) }{ \Delta g } \dfrac{ \Delta g(n) }{ \Delta n }\)

Let \(\displaystyle f(g(n)) = (n^2)^2\). Then \(\displaystyle f(g) = g^2\) and \(\displaystyle g(n) = n^2\)

\(\displaystyle \Delta f(g(n)) = \dfrac{ \Delta g^2 }{ \Delta g } \dfrac{ \Delta n^2 }{ \Delta n }\)

Now, \(\displaystyle \Delta g^2 = (g + 1)^2 - g^2 = 2g + 1\). (And similarly for \(\displaystyle \Delta n^2\).)

So
\(\displaystyle \Delta f(g(n)) = (2g + 1)(2n + 1) = (2(n^2) + 1)(2n + 1) = 4 n^3 + 2 n^2 + 2 n + 1\)

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

Where am I going wrong?

-Dan
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
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?
 
  • #3
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:
\(\displaystyle \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 }\)

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:
  • #4
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 \(\displaystyle \Delta u(n) = u(n + 1) - u(n)\). But there is a slightly more general form: \(\displaystyle \Delta u(n) = u(n + h) - u(n)\) 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 \(\displaystyle \Delta g = (g + 1) - g = 1\). But it isn't: \(\displaystyle g = n^2\), so \(\displaystyle \Delta g = 2n + 1\).

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

\(\displaystyle \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}\)

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

\(\displaystyle = \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)\)

So
\(\displaystyle \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\)

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
 
  • #5
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:
\(\displaystyle \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 }\)

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:
  • #6
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 \(\displaystyle \dfrac{ \Delta f(g(n)) }{ \Delta n }\) does indeed use the difference \(\displaystyle \Delta n = 1\). But when we convert it to \(\displaystyle \dfrac{ \Delta f(g) }{ \Delta g }\) then the difference of 1 gets redefined to the difference \(\displaystyle \Delta g \neq 1\). This isn't an issue in Differential Calculus because when we take the limit as h goes to 0 \(\displaystyle \Delta x = \Delta g \to 0\).

-Dan
 
Back
Top