 Welcome back everyone. We are still in section 4.5 in Stuart's textbook talking about the definite integral. And I wanna do another example of an integral, but this time what would happen if we had, we wanna integrate like an exponential function, right? So if we think about this graphically, we have this function y equals two to the x. So we have this exponential growth right here. And so we're trying to go from one to three. We're trying to calculate the area of a region like this. As usual, we should figure out what delta x is, b minus a over n. This is usually fairly straightforward because you just take the bounds that are given by the integral, three minus one over n, just simplify this thing. We get that delta x equals two over n. We have to calculate xi, which remember it always looks like a plus i delta x. Ooh, that's a bad looking delta, like so. And so a here is one, i is just, it's just i and then delta x is a two over n. And so you try to simplify, there's not a whole lot to simplify. We just get this one plus two i over n, like so. And then we're gonna evaluate, we're gonna evaluate the function at this xi, which our function of course is two to the x. So we end up with this two to the xi, which is two to the one plus two to the i over n. Can we try to simplify that expression at all? Well, and if we do so by exponent rules, be aware that the plus of the exponent, this is the same thing as taking two to the first times two squared i over n. And which two to the first of course is just gonna be a two. And then by other exponent properties, since we have a product in terms of the exponent, we get this two squared raised to the i over n. And so this is the form we're gonna prefer. We're gonna take two, whoopsie daisy, two times four raised to the i over n power, all right? And so we're gonna take this for our Riemann sum. So coming over here to the integral again, the integral by definition is the limit as n goes to infinity of the sum, i ranges from one to n. We should then get an f of xi here times delta x, but plug it in the appropriate parts for the f of, excuse me, f of xi, we end up with two times four raised to the i over n power. And then we times that by delta x, which delta x this time is two over n, like so. And so let's factor out the pieces that we can, that is let's factor out those pieces that don't depend on i whatsoever. This factor of two, it's constant, it can come out. Likewise, this two can come out. And also the one over n there is also, it doesn't depend on i whatsoever as well. The delta x can always be factored out of this sum here. So we take the limit as n goes to infinity of two times two, which is four over n. And then you times that by the sigma of one as i goes from one to n. And then you're left with this four raised to the i over n power right there. And so now what do you deal, how do you deal with this four i over n power there? Because with this point in all these previous Riemann sum calculations we've done, we were able to apply some rule that helps us simplify the sum, that is we can turn the sum into a rational function of some kind. How do you do that with an exponential situation? Well, the thing to remember here is that this exponential form is what we had called previously a geometric sequence. And so we're right now looking at a geometric sum for which we did have a formula exactly for that. If we're adding up our geometric sum, so we had something like a times R to the n minus one, sorry, i minus one is what it should say. i minus one as i goes from one to n. This was the same thing as a times one minus R to the n all over one minus R. So we could use that formula right here. But before we can apply it, we have to figure out what is the a and what is the R, right? In this situation, the, well, let's do a little bit of some work here on the four i to the n. We gotta work with that thing first. And so to deal with that, let's make the following observation four i to the n by exponent rules again, we're gonna get four to the one over n so the nth root of four, we raise that to the i. So we can accomplish that for us, all right? And then the next step is we have to, we have to get an i minus one in the exponent. So we can factor this as four one over n, sorry, one over n. Times four to the one over n, I'm getting a little cramped here. Let me move this over here. Four one over n times four to the one over n i minus one. So that preps us for the situation that we want for this formula here. And in which case then we recognize we have an a right here and we have our R right here. And so if we make those observations, we can plug those into this geometric sum formula and we're gonna see that as the limit, as n goes to infinity, we have this four over n and then our sum then becomes a, which is four to the one over n power there, times that by one minus R, one minus R, R is itself four one over n and this is raised to the nth power and this will all sit above the one minus four one over n power right there, all right? And so let's try to simplify this thing a little bit. Four to the one over n to the n power, those will cancel out, we'll just get a four, right? That's just a four. And so then we end up with, in this consideration, you're gonna get one minus four right there. So take the limit as n goes to infinity, we have four over n times four to the one over n and you could write these as radicals if that helps you like the nth root there. And then we're gonna have a minus three, one minus four there, all over one minus four to the one over n power. We have all these things to consider right there. And so I'm gonna multiply together the four and the negative three. So we get this negative 12. I can actually sit this in front of the limit here. The limit as n goes to infinity here of this. What's left, what's still left behind? We have four one over n over n times one minus four to the one over n, like so. All right? And so just checking my notes to make sure everything is still pretty good right now. It is still pretty good. Now, unlike some of the other examples, at this moment we typically would just be able to plug in n equals infinity, right? And it would simplify. If we did something like that, we end up with four raised to the one over infinity. That's the top. That would just be four to the zero, which is a one. But in the denominator, you end up with infinity times, what are we getting here? One minus again, four to the one there. You're gonna infinity times zero. There's an indeterminate form going on in this denominator, right? And so we're gonna have to deal with this using L'Hopital's rule in some regard. So let me get rid of this business right here. Zero times infinity is not the preferred form we want for L'Hopital's rule. What we're gonna do is we're gonna rewrite this limit, negative 12 times the limit. We're gonna move that in in the denominator to the numerator so that it looks like four, four to the one over n times one over n. And this will sit above the one minus four to the one over n, right here. I want you to now notice that as n goes to infinity, the numerator is gonna approach one times zero, which of course is zero. And the denominator, the denominator will approach one minus one, which is zero. So we're in the form zero, zero over zero. So we're gonna use L'Hopital's rule to take the derivative of the top and bottom, all right? So keeping the negative 12 out in front, we're applying L'Hopital's rule. We take the limit as n goes to infinity. Let's start off with the denominator. That's gonna be a little bit easier here. When you take the derivative of the denominator, the constant will go to zero. And then as this is an exponential function, if we take the derivative with respect to n, we're gonna have to do the chain rule. So as it's an exponential on the outside, because we do have this chain going on here, we have this outer function and then we have this inner function, the one over n right there. The outer function, we're gonna get negative four, one to the n times the natural log of four. That's the outer derivative. And then the inner derivative, since it's one over n, we end up with negative one over n squared. And that comes from just the usual power rule calculation. If we do the same thing on the top, we're gonna have to use the product rule because there's a product of two things. So similarly, if we take the derivative of four to the one over n first, that's gonna give us four, one over n times the natural log of four. That's, because that's a chain rule is involved in this one as well. Then we take the derivative of one over n, which gives us negative one over n squared. And then we're gonna add to that four, one over n. Then we take the derivative of one over n here, which gives us negative one over n squared. And so we do all of these derivatives, but I want you to be aware there's some nice simplification that's gonna happen here. You will notice that the two terms in the numerator both have a negative one over n squared. And so does the denominator. These are all factors, this is a common factor. So we could factor it out from the top and it'll cancel with the one at the bottom. So the negative one over n squares are gone. Also, what we see here is that all of everything in the numerator also has a four one over n in it. Right, so we have four one over n right there, four one over n. We could factor that from the numerator and that would actually cancel with the one in the denominator. So boom, boom, boom. There's some messy cancellation going on here. I just mean because there's like blood everywhere, right? Let's get these people in hospital and see where they are. We're taking still negative 12, don't forget the negative 12, the limit as n goes to infinity. What didn't get canceled out? We have a natural log of four on the first bit, plus one. And this all sits above, looks like negative natural log of four. If we have everything correct, I think that's what we got right there. I hope I didn't miss out on anything else. And which case, just making sure because I feel like something might have been missed. But this should all just be constants, right? I don't think I see any other variables floating around in this situation. For which case, if we put this together, taking the limit as n goes to infinity as it's just a constant at that moment. Let's see, I feel like, oh, I did forget something, didn't I? That's what I was afraid of. So this, my spider sense was tingling and I think I've detected the error right here. So I made a mistake here when I did my derivative. This right here, which I just mentioned in green, that is the derivative of the four, the four to the one over n. I forgot the one over n right there. So we need another one over n that's right here. This would then give us the natural log of four over n. And so we can calculate that limit as n goes to infinity, that natural log over four, that's gonna go to zero over the negative natural log of four. And so in terms of simplification, the negatives cancel out, we end up with 12 over the natural log of four. But by properties of the natural log, 12 over the, the natural log of four succinctly is two times the natural log of two, which two goes into 12, six times. And we end up with the error where the curve is gonna be six, six over the natural log of two. And so it's like, wow, that was a really, really, really long problem right there. So I mean, there was a lot of stuff going on there. We had to do the limit of the Riemann sums. We used this power, this exponential rule for the sigma sums. And then also this L'Hopital calculation. This one really, it really was a very involved calculation. You can see that there's a lot going on here. And so if you were able to follow even half of what you're talking about, I think that puts you in a good situation to try to understand these Riemann sums. Now, again, this example was chosen to be on the harder side. If you struggle with it, that's okay. Feel free to watch this video over and over again and ask questions in the comments below if you have any questions. But we do need to understand how we can calculate these definite integrals using this definition, but it sort of begs the question, is there an easier way? This is very, very involved. And this is actually gonna be analogous to what we first dealt with with derivatives when it's like, holy cow, supplemented difference quotient sounds easy compared to what we just did and it is, it really is. But there's gotta be a better way and this is actually what the next section of the book is all about when we talk about the fundamental theorem of calculus. Is there a way we can compute these areas on the curves without going through this drawn out process? And it turns out we can connect area of the curve with anti-derivatives, which you had talked about in the previous chapter. So stay tuned. This is a little bit of foreshadow when we'll talk some more about this in the future.