0:00

Welcome to Calculus, I'm professor Ghrist.

Â We're about to begin Lecture 46 on Differences.

Â >> We begin our construction of a discreet calculus

Â by building the notion of a derivative for a sequence.

Â This definition is going to turn out to be much simpler than that of a derivative for

Â smooth function.

Â But this simplicity hides a profound depth

Â that mirrors all the things we have learned in calculus thus far.

Â 0:31

>> Recall that our goal is to build a discrete calculus,

Â a calculus based on sequences.

Â In this lesson, we'll consider what we mean by derivatives.

Â This will come in the form of differences or finite differences.

Â The definition is as follows.

Â Let's say, that you have a sequence a sub n.

Â We say, that the forward difference of a,

Â delta a at n = a sub n+1- a sub n.

Â That is, you look at the person in front of you, and

Â subtract off your present value.

Â 1:14

Now, if we compare this to the definition of the derivative,

Â we see that there are some commonalities.

Â We are taking a difference in the output of the function

Â dividing by a difference in the input of the function.

Â In the case, where that difference is equal to 1,

Â because we're talking about a sequence.

Â Now, if we were to try to graph this function and give an interpretation

Â in terms of slope, then by connecting the dots, well, this would be

Â the slope of the line segment in front of you, hence the forward difference.

Â This motivates the definition of the backward difference.

Â If you look behind you, and consider the slope of at line,

Â we define the backward difference, nabla a at n

Â to be a sub n- a sub n- 1.

Â 2:16

Let's consider a few examples.

Â If we take the sequence 4n and

Â compute it's forwards difference, what do we obtain?

Â I'm going to leave the verification of the computation to you.

Â I want you to show that one obtains the constant sequence 4.

Â Now, what do you observe here, it is if we are taking the derivative

Â of a linear function and obtaining the constant function,

Â but here these are sequences and differences instead of derivatives.

Â 2:55

Here's another example a bit more interesting the Fibonacci sequence.

Â What happens when we take the forward difference of that 1 finds,

Â that again, 1 obtains the Fibonacci sequence, but

Â shifted over by one step.

Â With an additional 1 out in front, that seems like it must be significant.

Â For a last example, consider the sequence 2 to the n.

Â 3:28

What happens when we compute the forward difference of that?

Â We obtain, again, 2 to the n.

Â It says, if this is something,

Â like the exponential function e to the x, which is its own derivative,

Â but here we're in the discrete world taking differences.

Â 3:51

There are many parallels between differences and derivatives.

Â For example, if we ask the question, which sequences are polynomial?

Â Consider n squared, when we take its forward difference,

Â we obtain a sequence of odd numbers.

Â That is the sequence, 2n + 1.

Â What happens when we difference, again,

Â the second forward difference delta squared is in this case, a constant.

Â The constant sequence 2,

Â what happens when we take the next difference, the third forward difference?

Â Then we obtain the constant sequence 0.

Â This is very similar to what happens when we differentiate

Â a polynomial after a finite number of steps, we get 0.

Â In general, one can say that a sequence, a,

Â is a polynomial of degree p if the p plus first derivative,

Â that is difference of a is the constant 0.

Â Now, notice that there's something that's not quite

Â according to what you would expect here.

Â That is the difference of n squared is not 2n,

Â but rather, 2n + 1.

Â Now, that seems anomalous, but we can explain that with a bit more notation,

Â in particular, that of the falling powers.

Â These are discrete calculus versions of monomials.

Â We say, that n to the falling k is n times n-

Â 1 times n- 2, all the way down to n- k + 1.

Â That works for a k bigger than 0.

Â For k = 0, we'll define n to the falling 0 to be 1, of course.

Â Now, the reason why this is so

Â useful is that the forward difference of n to

Â the falling k is k times n to the falling k- 1.

Â Let's look at this in the context of the example that we've done.

Â Consider the sequence n squared,

Â we could rewrite n squared as n(n- 1) + n),

Â that is, it's really n to the falling 2 plus n to the falling 1.

Â And hence, the forward difference of n squared is the forward difference of

Â n to the falling 2 + n to the falling 1.

Â Differencing, like differentiating is linear.

Â Hence, this is the difference of

Â n to the falling 2 + the difference of n to the falling 1.

Â That is 2n to the falling 1 + n to the falling 0.

Â Otherwise written as the sequence 2n+1, which is what we observed.

Â And that seems a bit complicated, why would you want to do that?

Â 7:57

Consider the sum,

Â k goes from 0 to infinity of n to the falling k over k factorial.

Â Evaluated that n = 1.

Â What is that?

Â That's 1 + n + 1/2 n(n- 1) +

Â 1/6 n(n- 1)(n- 2), etc.

Â What happens when we evaluate this if n = 1?

Â Most of the terms vanish.

Â All of the terms vanish, except the first two.

Â When we evaluate at n = 1, we get 1 + 1, which as you know is equal to 2.

Â Therefore, in discrete calculus e really takes on the value of 2.

Â And in fact, if we look at the version of e to the x,

Â that is the sum of n to the falling k over k factorial,

Â we get precisely the sequence 2 to the n.

Â And this is why, when we observed that the forward difference of 2 to the n is 2 to

Â the n, it reminded us of the behavior of e to the x.

Â 9:15

At this point you may feel a bit like Alice in Wonderland.

Â What is with discrete e, and 2 to the n, and falling powers?

Â Discrete calculus can be a strange place, but

Â there is a more rigorous approach that you may find assuring.

Â This approach uses the perspective of operators.

Â These are things that transform functions into functions, or

Â in this case, transform sequences.

Â Some of these operators you've met before.

Â For example, the identity operator.

Â It acts on sequences the way you'd expect, it does nothing.

Â The identity applied to a, that is Ia, is the same sequence, a.

Â What's nice about operators is that we can work with them algebraically.

Â We can say that I squared, that is applying the identity twice,

Â is the same thing as applying the identity once, it does nothing.

Â 10:17

E is the left shift operator, that is Ea is the sequence,

Â which in the nth slot, gives you a sub n+1.

Â And again, we can take powers of E to shift further to the left.

Â If there's a left shift, then there must be a right shift.

Â This has the notation E inverse, it undoes E.

Â 10:48

Now, we can take powers of this operator as well,

Â and start multiplying them together.

Â They behave in the way that you would expect.

Â E inverse E, gives you E to the 0, that is the identity operator.

Â I, that works as well, if you reverse the order, it doesn't matter.

Â 11:41

Here is an application to higher differences.

Â Let's say, you wanna compute the second forward difference of a at n.

Â This is the forward difference of the forward difference of a.

Â That is the forward difference of a sub n + 1- a sub n,

Â which with a little simplification gives

Â a sub n + 2- 2a sub n + 1 + a sub n.

Â What do you notice about those coefficients?

Â Well, if we rewrote the difference operators, E- I and

Â square that, then using the algebra of operators, and

Â simplifying according to what I does, we obtain E squared- 2E + I,

Â not simple.

Â In more generality, if we have the kth forward difference,

Â then by multiplying out E- I k times, we can obtain the formula.

Â The sum is i goes from 0 to k of negative 1 to the k- i

Â times the binomial coefficient k choose i, E to the i.

Â Now, this means what?

Â Let's say, that you wanted to compute a high difference.

Â Let's say, the eighth forward difference, that's gonna depend on a lot of terms.

Â What is the coefficient in front of the a sub n + 6 term?

Â Well, by writing down Pascal's triangle,

Â looking up the appropriate coefficient with the minus sign in the right place,

Â we easily see that, that coefficient is -56.

Â That is much simpler than trying to work it all out by hand.

Â 13:45

Consider the discrete notion of an indefinite integral.

Â If the forward difference is E- I, then what

Â happens when we try to take the inverse, that is undo differencing.

Â Well, we need to take E- I to the negative 1 power.

Â Let's say, if I wrote that a little bit differently and

Â say put a minus sign out front, and we call it I- E.

Â Then it is as if we're trying to compute,

Â 1 over I minus something.

Â Well, I've seen formulae for 1 over 1- x in terms of a geometric series.

Â What happens, if we tried applying the geometric series to this formula?

Â It would suggest that the inverse operator to forward differencing

Â is -(I + E + E squared + E cubed + E to the fourth, etc., etc.

Â Now, that seems rather dubious.

Â Let's check it on a simple example.

Â See what we get.

Â Let's take a random sequence.

Â Let's say, 3, -1, 4, -1, 5, -9, 2, -6, 5,

Â and I'm tired, so I'm just gonna write 0s from now on.

Â What would this delta inverse really mean, it means what?

Â Well, I need to at the nth term

Â take the sum of all the terms in a that follow, from n on up.

Â And then put a minus sign in front of it.

Â If we do so, walking down the line, we can marching from the right,

Â certainly compute the terms in this sequence.

Â This is easy, since our sequence terminated in 0s.

Â What happens when we take that, and forward difference it?

Â I'll leave it to you to check that we obtain the original sequence a,

Â that this actually does work.

Â Now, don't get too carried away.

Â