 Welcome back everyone. In this video as we continue our discussion of sequences, we actually wanna start doing calculus with our sequences. And so when it comes to calculus, what are things we might be interested in? Well, in calculus too, we often talk about things about limits, about derivatives, and particularly about integrals. These are things we very much interested in calculus. But all of that context about limits, derivatives, integrals, we've been focusing those in the past with these differentiable and continuous functions. But what about the discrete functions, which we call sequences? What type of calculus can we do there? Well, I can already tell you that the notion of a derivative isn't really gonna work so well here. Because after all, if we try to describe a tangent line, then it's natural to think of the tangent line like this. But when one things of a tangent line in this aspect is because they're describing a specific continuous function. But the things you have to realize that this green dashed line isn't there for a sequence, your tangent line could go here, or here, or here, or here. And all of those touch the graph exactly one point. So the notion of tangent line kind of falls apart for a discrete sequence. And hence the notion of a derivative is a lot weaker in this context. We can talk about rates of change a little bit. And now something we'll talk about later. We'll talk about the tack a little bit later as well. But one thing that does kind of make sense with a sequence is the notion of a limit. As long as one's careful about this, what is a limit is? Like what's the behavior, what's the trend as we approach some value along the way? Well, one issue is if you pick a single point here, you really can't get closer and closer and closer to two, right? So if you're like, okay, let's go from two. We leap frog from six to five to four to three. But at this point, you're kind of stuck, right? We can't go from three to two without touching two. And so this idea of getting arbitrarily close to two is something that doesn't happen with a sequence as well. Because again, the only way to approach two is to actually jump to two. And so when it comes to limits like the limit as in approaches two of the sequence a sub n, there's really not a whole lot you could say here. The behavior as you could closer and closer to two can't defy what happens at two. And so limits like this we're really not concerned with at all when it comes to sequences. But limits that we are interested in is the following. What if we take the limit as in approaches infinity of our sequence a sub n? Because in this situation, as we take these points and when they get, you allowed the n value to get bigger and bigger and bigger, we could start to see that there might be some limiting behavior on what's going on here. Case in point, consider the sequence a sub n equals n minus one over n. If we can compute the first six terms of this sequence, just plug in n equals specific numbers for one, you'll get one minus one over one, which is just a zero. For a two, you plug in two, you'll get two minus one over two, which is one half. For three, you'll plug in three minus one over three, which gives you two thirds. Then for a four, you'll get a three fourths. For a five, you'll get a four fifths. For a six, you'll get a five sixths. And we can see the graph right here. And so notice that as you start taking bigger and bigger values of n, these numbers one, one half, two thirds, three fourths, four fifths, five sixths, the next will be six sevenths, the next will be seven eighths, the next will be eight ninths. They're getting closer and closer and closer to some limiting value, which appears to be this limit L equals one. And so this is what we would describe as the limit of this sequence. These numbers are getting closer and closer to the number one. The output numbers getting closer and closer and closer to one. And I do wanna make mention here that this sequence right here has a very natural continuous expansion. We could expand this to the function f of x equals x minus one over x. And yes, if you take the limit here as x approaches infinity of f of x, because this is a balanced rational function, this is gonna look like, you have this infinity over infinity, but in particular it's balanced, you have x over x, this thing is gonna approach one. And so oftentimes you see that when you're studying a sequence that the sequence, as the limit as you approach infinity between the discrete sequence and the continuous function will often be the same thing here. This is often the same. And so we say that if a limit has, or I should say if a sequence has a limit, we talk about the limit of a sequence because really the limit as n goes to infinity is the only one we care about. If this limit exists, if the limit exists, then we say that the sequence, the sequence is convergent. And so what we see here, a sub n is an example of a convergent sequence. If this limit doesn't exist, we would say that it's divergent instead. Let's get some examples of other sequences here. Let's take the sequence b sub n equals negative one to the n plus one two over n. This is an example of an alternating sequence because notice as you look at terms in the sequence, b one is gonna be a positive two, b two is gonna be a negative one, b three is a positive two thirds, and b four is gonna be a negative one half, b five will be a positive two fifths, and b six will be a negative one third, right? And this comes from this alternating factor, negative one to the n plus one. When you choose n to be an odd number, n plus one will be even, and thus an even power of negative one is positive. But if you take n to be a negative, to be a odd number, I said odd already, if you take n to be an even number, n plus one will be odd, and then negative one to an odd power will be a negative. So you see this alternating factor going on here, so it goes positive, negative, positive, negative, positive, negative, positive, negative, positive, negative, positive, negative. And so you see this jumping above and below the x-axis if you're trying to graph this thing. In terms of numerics, right? If you plug in n equals one, just ignore the negative one for a moment. If you plug in one here, you're gonna get a two, plug in two, you get a one, plug in three, you get two thirds, plug in four, you get one half, and so you see this happening. So you see this two, then down to negative one, then to two thirds, then to negative one half, then to two fifths, down to negative one third, then we get two sevenths, then we're gonna get negative one fourth, then we're gonna get a, where are we now? A positive two, down to negative one fifth, and it kind of, we'll keep on doing this. It jumps above and below, above and below, above and below the x-axis, but you can see that as n goes to infinity, this function right here is going to approach zero. The sequence will approach zero. So we often draw this arrow, so we write this as bn approaches zero. And so we do find the limit here. And so this notation here, bn arrow, is just shorthand for the limit, saying that the limit as n approaches infinity, of b sub n equals zero. That's all that we mean there. All right, let's take a look at another example of such a thing like this. Let's, so I mean, the alternating sequence, you have one doing one thing and one doing another thing. The odds were doing positive things, the even positions were doing negative things. That kind of feels like a piecewise function, and we could define a sequence likewise using piecewise functions. So take it to be the sequence which when n is odd, you're just gonna output an n. But when n is even, you're gonna output one over n, right? And so the first six terms would look like this. One is odd, so you get one. Two is even, so you get one half. Three is odd, so you get three. Four is even, so you get one fourth. Five is odd, so you get five. Six is even, so you get one sixth. And you see this behavior like so. But if you look at the graph of this, you're gonna get the following. So one is odd, so you're gonna get one, then you go to one half, then you go to three, then you go to one fourth, then you go to five, then you go to one sixth, then you would go to seven, then you'd go to one eighth, then you'd go to nine, and this thing is just gonna be a bigger, bigger, bigger. This is actually an example of a divergent, a divergent sequence here. If we take the limit as n goes to infinity of c sub n, this does not exist, right? There is no real number for which this sequence gets closer and closer and closer to do. I mean, it is true that there's a subsequence. There's a subsequence, if you only look at the even positions, there's a subsequence that wants to go to zero. And you also have this subsequence of odd positions that wants to go towards infinity. And you see this disagreement here between one going one direction and one going the other direction. And because you see these subsequences approaching different values, we have to conclude that the limit doesn't exist. This is analogous to when we studied continuous functions, if the left limit said one thing and the right limit said a different thing, then the limit didn't exist because we had this disagreement of witnesses here. We can often calculate limits of sequences using this graphical approach. We could see the convergence or we can see the divergence. But sometimes it's difficult to graph these sequences or maybe we just don't want to be four. Oftentimes, we can find the limit by comparing it to some continuous function, right? We have this sequence a sub n equals sine of pi over n. But it's probably not too difficult to also figure out that we could extend this sequence to a continuous function f of x equals sine of pi over x. And so then we ask ourselves, what's the limit here? The limit as n goes to infinity of a sub n, this will equal the limit of sine of pi over n as n goes to infinity. We just treat this like we would any other function we've limit we've done before. Sine is a continuous function so we can take it out of the limit process. You have to take the limit as n goes to infinity of pi over x, pi over n, excuse me. Now as n goes towards infinity, you're gonna get pi over infinity, which is gonna look like zero. So this becomes sine of zero, which itself is zero. So calculate limits for sequences often doesn't boil down to be anything different than we've been. And that's if we can connect the sequence with some continuous function. This continuous expansion is a very useful idea in computing limits. But sometimes it's not so simple. Like for example, if we consider the sequence a sub n equals n factorial over n to the n. In this situation, the question about computing limits is difficult because if we try to find some continuous extension, the bottom might be clear x to the x. But then what do you do with x factorial? What does x factorial even mean, right? Because factorial sequence is this recursive sequence. It's just you just multiply by x the previous factorial. But if we don't have a previous x was potty, what would that mean in that situation? So some continuous expansion is not gonna be applicable here. And we should also just that if we just plug in infinity, right, a sub n it approaches infinity factorial over infinity to the infinity. Well, the bottom is quite clear. It's gonna be infinity, right? But at the factorial sequence also it gets bigger and bigger and bigger and bigger. This is gonna look like infinity over infinity, which is an indeterminate form. Can we use L'Hopital's rule in a situation like this? Well, again, the answer is gonna be no here because how do you take the derivative of n factorial? If you take the derivative of x factorial, again, the issue is x factorial doesn't have a continuous analog. And therefore we can't really use continuous methods. We have to do a purely discrete argument here. And so looking at the sequence we can actually make the following argument. A sub one is gonna look like one over one, which is just one. A sub two is gonna look like one times two over two times two if we keep it factored. So this gives us one half. A sub three will look like one times two times three. That's three factorial over three times three times three. You can always cancel out the last term. You end up with one over three times two over three. All right, if we did a sub four, this is gonna look like one times two times three times four over four times four times four times four. Again, the fourth cancel and you're left with one fourth times two third or two fourths, excuse me, and then three fourths. And so for one last example, consider a five. This is gonna look like one fifth times two fifths. Times three fifths, times four fifths. And then of course there's a five fifths there. And so with the exception of the last one, the five fifths, each of these terms here is less than one, less than one, less than one, less than one. And these numbers are gonna get smaller and smaller and smaller the more we take these out here. So this actually kind of gives me a conjecture. I have this claim. I have the claim that this sequence a sub n it's gonna approach zero because you're just multiplying these numbers over and over and over again. And just get smaller, smaller, smaller, smaller. Justify this claim. Let's look at the general case. Notice here that if you take a sub n, this is equal to n factorial over n to the n. So this is gonna look like a one times two times three all the way up to n. And this will then sit above n times n times n all the way up to n. And if you break these things, if you put these things into factorizations, you get one over n, you're gonna get two over n, you're gonna get three over n all the way up to n over n. And all of these factors here, ignoring the first one for both, all of these factors right here, each of them is gonna be less than or equal to one. n over n of course is exactly equal to one and all the other ones are strictly less than one. Because of that observation, I can actually say that a n is less than, less than or equal to one over n. Also, I wanna mention that a n is always greater than or equal to zero because these things are positive. The sequence a sub n is a positive sequence. So it's always greater than or equal to zero and it's less than or equal to one over n. And the reason why I mentioned this is because notice if we take the limit as n goes to infinity of the zero sequence, that's easy, that's just zero. If we take the limit as n goes to infinity of the sequence one over n, that one we can compute very quickly. That's gonna be one over infinity, which is a k zero. And so then our function, a sub n, is sandwiched between these. That is the limit as n goes to infinity of n factorial over n to the n. This will be squeezed between the limit of a zero sequence, which is zero, and the limit of the sequence one over n, which is likewise zero. This then by the squeeze theorem, so we conclude here by the squeeze theorem, by the squeeze theorem, we see that the limit of n factorial over n to the n is going to be zero as well. And so when it comes to discrete sequences, one has to be a little bit more careful at times. While a lot of continuous tools like derivatives and L'Hopital's rule would apply when we can expect, sometimes we can't expand a sequence continuously like in the case of the factorial sequence right here, but there are still some tools we can use like the squeeze theorem that can be very helpful in terms of calculations. And we're gonna explore some of these in the next video as well, because sequences in many ways behave like real-valued continuous, but in some aspects they behave differently because they are not the same thing. And so we have to be very careful on which part of continuous calculus can transfer over to our study of sequences we're referring to as discrete calculus.