Limits of piecewise functions | Limits and continuity | AP Calculus AB | Khan Academy
Let's think a little bit about limits of piecewise functions that are defined algebraically like our F of x right over here. Pause this video and see if you can figure out what these various limits would be. Some of them are one-sided and some of them are regular limits or two-sided limits.
All right, let's start with this first one: the limit as x approaches four from values larger than or equal to four. So that's what that plus tells us. When x is greater than 4, our f of x is equal to √(x). So, as we are approaching four from the right, we are really thinking about this part of the function. This is going to be equal to the square root of four. Even though right at four our f of x is equal to this, we are approaching from values greater than four. We're approaching from the right, so we would use this part of our function definition. This is going to be equal to two.
Now, what about our limit of f of x as we approach four from the left? Well, then we would use this part of our function definition. This is going to be equal to 4 + 2 over 4 - 1, which is equal to 6 over 3, which is equal to two. If we want to say what is the limit of f of x as x approaches 4, this is a good scenario here. From both the left and the right, as we approach x=4, we're approaching the same value.
We know that in order for the two-sided limit to have a limit, you have to be approaching the same thing from the right and the left, and we are. This is going to be equal to two. Now, what's the limit as x approaches two of f of x? As x approaches two, we are going to be completely in this scenario right over here. Interesting things do happen at x equals 1; here our denominator goes to zero, but at x=2, this part of the curve is going to be continuous.
We can just substitute the value; it's going to be 2 + 2 over 2 - 1, which is 4 over 1, which is equal to 4. Let's do another example. We have another piecewise function, so let's pause our video and figure out these things.
All right, now let's do this together. What's the limit as x approaches -1 from the right? If we're approaching from the right when we are greater than or equal to -1, we are in this part of our piecewise function. We would say this is going to approach 2 to the -1 power, which is equal to ½.
What about if we're approaching from the left? If we're approaching from the left, we're in this scenario right over here; we're to the left of x = -1. This is going to be equal to the sine, because we're in this case for our piecewise function of -1 + 1, which is the sine of 0, which is equal to 0.
Now what's the two-sided limit as x approaches -1 of G of x? Well, we're approaching two different values as we approach from the right and as we approach from the left. If our one-sided limits aren't approaching the same value, well then this limit does not exist. What's the limit of G of x as x approaches zero from the right?
Well, if we're talking about approaching zero from the right, we are going to be in this case right over here. Zero is definitely in this interval, and over this interval, this right over here is going to be continuous. So, we can just substitute x equals 0 there. It's going to be 2 to the 0, which is indeed equal to 1, and we're done.