38
$\begingroup$

In 6th grade I was first introduced to the idea of a function in the form of tables. The input would be "n" and the output "$f_n$" would be some modification of the input. I remember finding a pattern in the function "f(n)=n^2". Here is what the table looked like:

\begin{array}{|c|c|} \hline n& f_n\\ \hline 1&1 \\ \hline 2&4\\ \hline 3&9\\ \hline 4&16\\ \hline 5&25\\ \hline ...&...\\ \hline n&n^2\\ \hline \end{array}

I would then take the outputs $f_n$ and find the differences between each one: $f_n-f_{n-1}$. This would produce:

\begin{array}{|c|c|} \hline n& f(n)-f(n-1)\\ \hline 1&1 \\ \hline 2&3\\ \hline 3&5\\ \hline 4&7\\ \hline 5&9\\ \hline ...&...\\ \hline \end{array}

Repeating this process (of finding the differences) for the outputs of $f_n-f_{n-1}$ would yield a continuous string of $2$s. As a 6th grader I called this process 'breaking down the function' and at the time it was just another pattern I had found.

Looking back at my work as a freshman in high school, I realize that the end result of 'breaking down a function' corresponds to the penultimate derivative (before the derivative equals zero). For example: breaking down $y=x^3$ gives a continuous string of $6$s, and the third derivative of $x^3$ is 6 (while the 2nd derivative is 6x).

Is there any significance to this pattern found by finding the differences between each output of a function over-and-over again? Does it have anything to do with derivatives? I know my question is naive, but I'm only a high school freshman in algebra II. A non-calculus (or intuitively explained calculus concepts) answer would be very helpful [note that I used an online derivative calculator to find the derivatives of these functions and I apologize for any incorrect calculus terminology].

$\endgroup$
  • 8
    $\begingroup$ You might be interested in finite calculus. $\endgroup$ – Cameron Williams Jun 15 '16 at 4:01
  • 2
    $\begingroup$ On an unrelated note, you could extend the string of $2$s and reverse engineer the $f_{n + 1}$-th term without having to explicitly find the interpolating polynomial of $f_n$. I once discovered the same pattern in grade 7/8 and exploited the heck out of this in my homework problems. $\endgroup$ – Yiyuan Lee Jun 15 '16 at 4:06
  • 2
    $\begingroup$ Also it may be worth while to know that just like the derivative has an antiderivative, i.e. it's integral: $\sum_{n=1}^{x}(f(n)-f(n-1))=-f(0)+f(x)$ as the sum telescopes. So in a way the summation is the inverse operator of the backwards difference. Combining this with @YiyuanLee method of reverse engineering, you may get a method of finding summations. Let $g(n)=f(n)-f(n-1)$ and you will see what I mean. Or perhaps I am not clear in my thought let me know if interested. $\endgroup$ – Ahmed S. Attaalla Jun 15 '16 at 4:31
  • 3
    $\begingroup$ If you want to step out of your comfort zone a bit, try looking up the "umbral calculus" in addition to the "difference calculus" mentioned by other answers. $\endgroup$ – J. M. is a poor mathematician Jun 15 '16 at 7:42
  • 1
    $\begingroup$ @AhmedS.Attaalla Great comment. This also gives some intuition for the fundamental theorem of calculus -- telescoping series is basically a discrete version of the FTC. $\endgroup$ – Nick Alger Jun 16 '16 at 5:10
22
$\begingroup$

Yes, this has plenty to do with the derivative. In particular, what you describe is the backwards difference operator, which is just defined as $$\nabla f(n)=f(n)-f(n-1).$$ This is an operator of interest on its own, but the connection to calculus is that we can consider this as telling us the "average" slope between $n-1$ and $n$.

What you are doing is iterating the operator. In particular, one often writes $$\nabla^{k+1} f(n)=\nabla^k f(n)-\nabla^k f(n-1)$$ to meant that $\nabla^k f(n)$ is the result of applying this operator $k$ times. For instance, one has that $\nabla^3 n^3 = 6$, as you note. More generally $\nabla^k n^k = k!$, and this lets us recover a polynomial function from its table, which is what you were up to in sixth grade.

However, we can take things further by trying to interpret these numbers - and there is a natural interpretation. For instance, $\nabla^2 f(n)$ represents how quickly $f$ is "accelerating" over the interval $[n-2,n]$, since it tells us about how the average slope changes between the interval $[n-2,n-1]$ and the interval $[n-1,n]$. If we keep going, we get that $\nabla^3 f(n)$ tells us how the acceleration changes between an interval $[n-3,n-2]$ and $[n-2,n]$. We can keep going like this for physical interpretations.

However, this operator has a problem: We'd like to interpret the values as accelerations or as slopes, but $\nabla^k f(n)$ depends on the values of $f$ across the interval $[n-k,n]$. That is, it keeps taking up information from further and further away from the point of interest. The way one fixes this is to try to measure the slope over a smaller distance $h$ rather than measure it over a length of $1$: $$\nabla_h f(n)=\frac{f(n)-f(n-h)}h$$ which is now the average slope of $f$ between $n-h$ and $n$. So, if we make $h$ smaller, we start to need to know $f$ across a smaller range. This gives better meanings to higher order differences like $\nabla_h^k f(n)$, since now they only depend on a small portion of $f$.

The derivative is just what happens to $\nabla_h$ when you send $h$ to $0$. It captures only local information about the function - so, it captures instantaneous slope or instantaneous acceleration and so on. In particular, one can work out that $\nabla f(n)$ is just the average of the derivative over the interval $[n-1,n]$. One can also work out that $\nabla^2 f(n)$ is a weighted average* of the second derivative over the interval $[n-2,n]$ and $\nabla^3 f(n)$ is another weighted average of the third derivative over $[n-3,n]$.

In particular, if the $k^{th}$ derivative is constant, then it coincides with $\nabla^k f(n)$. One can also find results that if the $k^{th}$ derivative is linear, then $\nabla^k f(n)$ differs from it by at worst a constant. In particular, $\nabla$ is good at capture "global" effects (like the highest order term in a polynomial and its coefficient) but bad at capturing "local" effects (like instantaneous changes in the slope). So, in some sense, $\nabla$ is just a rough approximation of the derivative, and has similar interpretations, just doesn't work nearly as cleanly.

(*Unfortunately, "weighted average" here is hard to explain rigorously without calculus. For the benefit of readers with more background, I really mean "convolution" assuming that $f$ is actually differentiable enough times for any of this to make sense)

$\endgroup$
  • $\begingroup$ The convention I'm accustomed to uses $\Delta$ for $f(n+1)-f(n)$ and $\nabla$ for $f(n)-f(n-1)$, but maybe you are using a different book... $\endgroup$ – J. M. is a poor mathematician Jun 15 '16 at 12:22
  • $\begingroup$ @J.M. I was just unaware of that convention; I changed it to the more standard notation you suggest. $\endgroup$ – Milo Brandt Jun 15 '16 at 13:30
  • $\begingroup$ I thought $\nabla$ is $\left(\frac\partial{\partial x_1};\frac\partial{\partial x_2};...\right)$ and $\Delta$ is $\nabla^2=\sum_i\frac{\partial^2}{\partial x_i^2}$. Then $\textrm{grad}f=\nabla f$, $\textrm{div}\ f=\nabla\cdot f$, $\mathrm{rot}\ f=\nabla\times f$ and Laplace operator is $\mathrm{div\ grad}\ f=\nabla\cdot\nabla f=\nabla^2f=\Delta f$... $\endgroup$ – Crowley Jun 16 '16 at 12:37
  • $\begingroup$ @CRowley $\nabla$ is also that, but in other contexts. Wikipedia (as well as other sources I've found) lists $\nabla$ as the usual notation for backwards differences. It's just a case of a symbol getting multiple uses, which is common enough in math. $\endgroup$ – Milo Brandt Jun 16 '16 at 15:03
  • $\begingroup$ @MiloBrandt. When describing "world" one may think that latin and greek alpahbet is enough. One doesn't know how much wrong he is. It is very same regarding symbols. :) Don't get me wrong: You have defined the operator and you use it as you have defined. To read it wrong one must want to read it wrong. $\endgroup$ – Crowley Jun 16 '16 at 15:12
10
$\begingroup$

While I was in Algebra 2 I discovered the same exact things. Pretty cool and exiting?

Does $f(x)-f(x-1)$ have anything to do with the derivative? Kind of.

The derivative is defined as:

$$\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}=f'(x)$$

Note you found:

$$f(x)-f(x-1)=\frac{f(x)-f(x-1)}{(x)-(x-1)}$$

This resembles the derivative, and is weak approximation to the derivative.

$$x^2-(x-1)^2=2x-1$$

Where as

$$\frac{d}{dx} x^2=2x$$

Concerning the other thing you are observing (the difference $n$ amount of times gives a constant expression for an $n$ degree polynomial):

Let's denote $\nabla f$ to mean the operation $f(x)-f(x-1)$. And denote $D_n(x)$ to mean a polynomial of degree $n$ with input $x$. Let $\backsim$ denote "resembles".

Then (our intuition may suggest)

$$\underbrace{\nabla \nabla \nabla..\nabla}_{n times} D_n(x) \backsim \frac{d^n}{dx^n}D_n(x)=c$$

Where $c$ is a constant. Above I used the fact that the $n$th derivative of an $n$ degree polynomial is constant.

However the proof of what you see and call "breaking down the function" does not involve calculus, you just need to prove:

$$\nabla D_n(x)=D_{n-1}(x)$$

For $n \geq 1$ using the binomial theorem.

$\endgroup$
  • 3
    $\begingroup$ Woo, we kinda almost sorta discovered calculus in Algebra. High five to us math nerds! $\endgroup$ – Simply Beautiful Art Jun 15 '16 at 11:40
  • $\begingroup$ A personal question to Ahmed S. Attaalla.....I read in your About Me section that you are a high school student...What standard (or class) are you studying in exactly now?As far as I know the things you wrote here are not always taught in high schools...(It's taught to undergrads may be)....Also in this answer-math.stackexchange.com/questions/1726399/x-lnx-0-what-is-x/… you used the Lambert W function....it's my dream function as a high school student...So,I want to know what exactly you study.... $\endgroup$ – tatan Jul 12 '16 at 13:39
  • $\begingroup$ Ive currently finished calc 2 and Ap stats probably moving to cal 3 this fall. What I've written I've once discovered on my own, and through extreme examination was able to come up with notations and arguments to explain what I found: and written it in my journal. I later searched my discovery up my internet closely, discovered it was a rediscovery, and decided to use the common notation that I found online instead the one I've used in my journal in this answer. @tatan $\endgroup$ – Ahmed S. Attaalla Jul 12 '16 at 13:45
  • $\begingroup$ @AhmedS.Attaalla Where do you study (in which college),please? $\endgroup$ – tatan Jul 12 '16 at 13:48
  • $\begingroup$ I study at West La College while attending Culver City High School in Los Angles, California. @tatan $\endgroup$ – Ahmed S. Attaalla Jul 12 '16 at 13:50
7
$\begingroup$

An alternative way to think about this is to use the differential operator.

If $D=\frac{d}{dx}$, then we can observe (using Taylor Series reasoning -we'll only be applying this to polynomials, so everything will be analytic with infinite radius of convergence) that

$$ e^D f(x) = f(x+1) $$ So if $\Delta f(x) = f(x+1)-f(x)$ (we could have used the backwards difference, it works either way), then we have $$ \Delta = e^D-1 $$ and so, we have $$ \Delta^n = (e^D-1)^n = \left(\sum_{i=1}^\infty \frac{D^i}{i!}\right)^n $$ Factoring out $D^n$, we have $$ \Delta^n = \left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^nD^n $$ Now, if our $f(x)$ is a polynomial of order $n$, with leading coefficient $a$, then we end up with $$ \Delta^n f(x) = n!\left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^na $$ Now, because $a$ is a constant, any derivative will evaluate to zero. Therefore, expanding the bracketed operator term, we are only left with the leading term, which is $$ \left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^n = 1 + O(D) $$ therefore, $$ \Delta^n f(x) = n!\times a $$ Note that we can generalise this. If the polynomial is order $n+1$ instead of order $n$, with the leading terms $ax^{n+1}+bx^n$, then we have $$ \Delta^n f(x) = n!\left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^n((n+1)ax+b) $$ and the first two terms of the operator are $$ (1+D/2+O(D^2))^n = 1+nD/2 + O(D^2) $$ so we end up with $$ \Delta^n f(x) = n!(1+nD/2)((n+1)ax+b) = n!\left[(n+1)ax+b+\frac{n(n+1)}2a\right] $$ Remember, this $\Delta$ is the forward difference. If you use the backward difference, it looks a little different, but the logic still works.

$\endgroup$
7
$\begingroup$

What you have discovered is a part of what is called the calculus of finite differences. If all you know of $f(x)$ is the sequence $f(0), f(1), f(2), \dots$, can you find a formula for $f(n),\; (n \in \mathbb Z^+)$? Or, to be more ambitious, can you reconstruct $f(x)$? If $f(x)$ is a polynomial, you can actually reconstruct $f(x)$.

What you can do is repeatedly make a list of the differences between consecutive values. For $f(x) = x^3$ it would look like this.

\begin{matrix} 0 && 1 && 8 && 27 && 64 && 125 \dots \\ & 1 && 7 && 19 && 37 && 61\dots \\ && 6 && 12 && 18 && 24 \dots \\ &&& 6 && 6 && 6\dots \\ &&&& 0 && 0 \dots \end{matrix}

It turns out that every polynomial will eventually lead to a row of zeros and that the original polynimial can be reconstructed from the initial entry in each row, in this case from $\{0,1,6,6,\}$.

From a purely technical point of view, $f(n) - f(n-1) = \dfrac{f(n)-f(n-1)}{n - (n-1)}$ is an approximation to $f'(n)$. Finite differences concerns itself with sampling a function at points that are $\delta$ units apart, $\{f(n\delta)\}_{n=0}^N$, where $\delta$ is a small positive real number and $N$ is a large integer. It then makes calculations using $\dfrac{f(n\delta) - f((n-1)\delta)}{\delta}$ as a good approximation to $f'(n\delta)$.

You can google finite differences and find out more about it. For example https://en.wikipedia.org/wiki/Finite_difference_method is where Wikipedia's article is located.

I tried to find a certain letter to Martin Gardner in Scientific American but I could not access it without paying someone money. The letter was from a man who remembers, as a child, discovering what you have found out. He also devised a method of construction the original polynomial from the list of differences. Feeling very proud of himself, he show his results to his father, a mathematician. His father replied, in his best Quaker voice, "Why John, thee has discovered the calculus of finite differences".

$\endgroup$
  • 1
    $\begingroup$ See p. 19 in MG's The Colossal Book of Mathematics. [Source: Scientific American Oct 1961.] $\endgroup$ – Benjamin Dickman Jun 15 '16 at 19:23
  • 1
    $\begingroup$ @BenjaminDickman - Yes I knew that but I couldn't find any free access to it. Thanks a lot for the help.The last time I read that letter was back in 1968. I'm suprised that I remembered it at all. $\endgroup$ – steven gregory Jun 16 '16 at 1:52
  • 1
    $\begingroup$ The table student has seems to be for functions of an integer. For functions of an integer, the difference table will end with a column that is a constant if and only if the function is a polynomial. However, there are functions that are not polynomials; for these, the difference table will not result in a constant, no matter how far you carry it. For example, consider the function 3^n-2^n. Since you are dealing with functions of integers, "calculus" is not operational here. Calculus deals with infinitely small steps. (and infinitely large numbers and infinitely long sums) $\endgroup$ – richard1941 Jun 28 '16 at 16:38
  • $\begingroup$ @richard1941. Yes. I wish someone had said something sooner. $\endgroup$ – steven gregory Jun 28 '16 at 17:07
2
$\begingroup$

Let $f(x)$ be a polynomial. Define $f_0(x)=f(x)$ and recursively $f_{n+1}(x)=f_n(x+1)-f_n(x).$

We can show that if $f$ is of degree $k$ with leading coefficient $a$, then $f_k(x)=a\cdot k!$ is a constant function. Note that $f_n=0$ for $n>k$.

We can see this is true for each $f(x)=x^k$ thus it is true for any linear combination and hence any polynomial.

For $f(x)=x^k$ we have that

$$f_k(x)=\sum_{m=0}^k {k\choose m}(-1)^m(x+m)^k.$$

Expanding $(x+m)^k$ with another binomial sum and using some identities for binomial coefficients will show that all powers of $x$ cancel out.

$\endgroup$
1
$\begingroup$

I remember playing the same game at a hockey game when I was a kid.

It is related to derivatives, as many have pointed out. We are taking successive weighted averages (well, integrals) of the nth derivatives of the function in question.

So for $x^2$ we get $2x$ averaged (integrated) over an interval, and then $2$ averaged (integrated) over an interval. As the average of $2$ over any interval is $2$, we get a constant value.

In general, your process after 2 iterations from a polynomial whose "highest term" is $a x^2$ is $2a$, because the 2nd derivative of $a x^2$ is $2a$, and your process generates a weighted average of the nth derivative.

More generally, if you have a function $f$ which has a constant nth derivative, doing your process n times returns that constant value. On the other hand, getting a constant value out of your process does not mean the derivative is constant. It simply means that the weighted average centered at your sample points is constant.

As an example, imagine your function was $x^2 + sin(pi x)$. When you sample at integer $x$ this function looks just like $x^2$, and your process (and the averaging process) will indeed result in it reaching $2$ after two iterations. Yet the function does not have a constant 2nd (or later) derivative.

We could step into signal theory and talk about how samples at distance 1 apart cannot faithfully reconstruct a sinusodal signal unless it is band-limited within a certain set of frequencies, but that is a digression.

$\endgroup$
1
$\begingroup$

Leibniz was led through the study of finite differences to introduce infinitesimal calculus in the first place, so the connection is very close indeed. This is detailed in Margaret Baron's book on infinitesimal calculus:

Margaret Baron, "The Origins of the Infinitessimal Calculus"

$\endgroup$
0
$\begingroup$

Yes it is related to finite calculus, but others have answered why and how while no one mentioned it is also related to sum of arithmetic sequences so I will.

Let's have arithmetic sequence where $a_1 = 1$ and $d = 2$ (so basically it's sequence of odd numbers).

Sum of first $n$ elements of that sequence (denoted as $S_n$) is:

$$S_n = \frac{2a_1 + (n - 1)d}{2}n = \frac{2 + 2(n - 1)}{2}n = (1 + n -1)n = n^2$$

It is obvious that $S_n - S_{n-1} = a_n$ and because of $S_n=n^2$ we have:

$$n^2-(n-1)^2=S_n-S_{n-1}=a_n$$

In your table for $n$ you got that $n^2-(n-1)^2$ is nth odd number which is the same as formula which I got.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.