 In this video, I wanna explore how to compute the limit of a piecewise function, particularly, I'm gonna be interested at the switching numbers, that is those numbers for which the function changes its behavior, cause after all the piecewise functions we're gonna encounter in a typical calculus course, you're gonna see some type of nice pre-calculus function, some nice pre-calculus function. This is what we call an elementary function, a function created by using the algebraic operations of additions, traction, multiplication, division, exponents, we can also use transcendental functions like exponentials, logarithms, trigonometric functions, through inverses, composition, any type of combination there, right? We have these elementary functions and a piecewise functions is gonna be pieced together these different pieces. Now, in terms of calculating limits, if you're looking for any number in the domain that's not associated to a switch, like if you look at x equals three, then a little bit to the left of x equals three, it looks like eight minus two x. A little bit to the right of x equals three, it still looks like eight minus two x. Therefore, the limit as x approaches three of f of x here, this is just gonna be the same thing as the limit as x approaches three of eight minus two x. Because near x equals three, the function just looks like a line. You don't see the square root part when you're near x equals three. I mean, so then the limit calculation would just be evaluation of the function. So you get eight minus two times three. So we get eight minus six. The limit should be two, which is exactly what you expected right here, right? The y-coordinate. Great. Now that's if we're trying to evaluate, or that is if we wanna compute a limit when we're not near the switching numbers. You just look at what's going on in that part. When it comes to piecewise function, the switching numbers are the most interesting because that's where it switches behavior. So you'll notice with this function if you take, first of all, f of four in this situation is undefined. It does not exist. The domain doesn't tell you what to do when x equals four. We can do when x is bigger than four, but when x is less than four, but not when x is for itself. That we can still consider the limit in this situation because if we wanna compute the limit, take the limit as x approaches four of f of x. What's that gonna equal? Well, it turns out that if you approach from the left versus approaching from the right, you get a different approach because of this piecewise nature of the function. So let's explore that for a little bit. If we consider the portion to the left, if you take the approach to the left of four, then the function thinks you're a line. And so the approach will be that of a line. Take the limit as x approaches four from the left of f of x. This is gonna behave just like the left portion of four. So that is as you approach four from the left, this will look like eight minus two x. But as this is a linear function, the limit will be the evaluation of the function as we saw in previous videos for lecture 10 right here. So we get eight minus two times four. You're gonna get eight minus eight. You're gonna get zero. So the left-handed limit is gonna be zero. So as you approach x equals four from the left, we think y will approach zero. All right, what about if we approach it from the right? If we approach from the right, on this portion of the graph, we actually think we're a square root function. So if you approach from the right, we think it's gonna behave like the square root of x minus four, in which case then in that situation, we get the limit as x approaches four from the right of f of x. This will then look like the limit as x approaches four from the right of the square root of x minus four, which by the limit properties we've seen previously, we can actually evaluate this function at x equals four. We get the square root of four minus four, which is gonna be the square root of zero, which is zero. And so as we approach four from the left, we see that y will also approach zero. And you'll notice that these two limits are in agreement. The left-handed limit says it should be zero. The right-handed limit says it should be zero. And since the limits both think they should be zero, we see that the limit of f of x is gonna be zero here because the both one sided limits agree. Let's take another example. Let's take the limit as x approaches zero of the absolute value of x. You'll notice that the typical absolute value function itself is naturally a piecewise function. It's graph makes that classic v-shape like so, right? We see that the absolute value function, it's a piecewise function, right? It looks like x when x is greater than or equal to zero. It looks like negative x when x is less than zero, excuse me. And so if we wanna find the limit as x approaches zero of the absolute value of x, well, we consider the left-handed limit as we approach zero from the left of the absolute value of x. This will look like the limit of just negative x as x approaches zero from the left. That'll look like negative zero, which is equal to zero. On the other hand, if we take the limit as x approaches zero from the right of the absolute value of x, this will be just the same as the limit of x as x approaches zero, and we see that's equal to zero. So again, like the other example, the left-handed limit and the right-handed limit both agree that both are zero. So the limit of the absolute value of x as x approaches zero will be itself zero.