One of the things we should be very familiar with is the concept of a function. We've talked about these functions and how they are represented as equations, and we've also talked about how we can graph them individually. Now what we're going to learn in this video is how we can take multiple equations like this and combine them into a single function. This is what is known as a piecewise function, and a piecewise function is made up of multiple equations. Now because we cannot have a situation where these equations essentially overlap each other like we have here and there or there and there, what we need to do is define these equations for different x values when dealing with piecewise functions.
So let's just get right into an example of a piecewise function situation we would need to solve in this course. Let's say we're dealing with this function right here. This would be an example of a piecewise function because notice how we have multiple equations written for a single function. And notice also how we have these different x values that we're defining the equations for. Now what I need to do is take a look at these x values and figure out how I can graph this equation.
Well, the way that I can graph this function that we have here, \( f(x) \), is I can notice here that our x values are really interested in negative one. Because notice we're looking where \( x \) is less than negative one or where \( x \) is greater than or equal to negative one. Now I'll pause right here and mention that it's possible you also have more than two equations. You might have three or four equations where there are more x values defined. But since here we're only looking at negative one, I'm going to go ahead and draw a wall right here through this x value of negative one.
Now this wall essentially tells me where my functions are going to be defined. So everything on the left side of the wall is going to be this equation, and everything on the right side of the wall is going to be that equation. That's because this equation shows us right here that we have \( x \) is greater than or equal to negative one, whereas the other equation shows us where \( x \) is less than negative one. And notice how these are the same equations that we had over here. So if I were to draw a wall on my graph right here, what I'm basically doing in this problem is I'm just taking this left piece of the equation here, drawing on the left side of the wall, then taking this right piece of the equation and drawing it on the right side of the wall.
So doing this over here, we first will graph negative \( x \) where \( x \) is less than negative one. So notice here that that's just going to be this line. So we're going to have this line that goes right through there. So this is going to be the first piece of our piecewise function. Now the next piece is going to be where \( x \) is greater than or equal to negative one.
We'll notice that that's going to be this parabola that we see right here. But I can't just draw a full parabola because we only are defining the parabola on the right side of this wall. What I can notice here is well, when we have this negative one value, notice that we're down here at negative 3. So when I point there at negative 3, then I can see that we go down to negative 4, then we go back up through here at 2. So we're going to have a parabola that looks something like this, and this would be the right side of this piecewise function.
So now I'll go ahead and remove this wall because this is what the piecewise function is going to look like. But what I also need to do, because I'm not quite finished with this yet, because notice here that we kinda have just these empty points that are finishing here, and we need to actually write something for these. Well, notice that for this piece, we're saying \( x \) is less than negative one. It can't actually be equal to negative one, so we have to put an open circle right there. Let's see for this other piece, we see that \( x \) is greater than or equal to negative one, so I can put a solid circle right there.
So this is actually what the piecewise function is going to look like, and that's how we can graph this. Now I also want you to notice that these two parts are not connected. There's this jump that happens right here. So whenever you have the situation where the \( y \) values between the pieces don't match, we call this a jump discontinuity, and that's because we have this jump right here. So this is not going to be continuous.
Right? I have to pick up my pen and I have to go down here. So this is where we have a jump, meaning that this is not some sort of continuous curve that we have between these piecewise functions. But that's okay. That actually happens a lot when you're dealing with these piecewise functions.
So we see this jump here, we see this graph, and this is what the graph would look like. But notice here that in our example, we're also asked to do a little bit more. We're asked to evaluate these functions right here by plugging the values into the correct equation. So because we're specifically asked to plug the values into the correct equation, we can't just simply look at the graph and figure it out that way. So we're going to need to figure out which equations we're using.
Well, notice here that my first function that I'm trying to evaluate, my first value is at an \( x \) value of negative 3. Now if we're thinking about an \( x \) value of negative 3, this is clearly going to be a value that's less than negative one. So because we're less than negative one, that falls into this portion of the equation. So we're going to use negative \( x \). So I'm going to have negative negative 3, in which case these two negatives will cancel, leaving me with positive 3.
So this right here would be \( f(-3) \). Now the next thing I need to figure out is what \( f(-1) \) is. Well, \( f(-1) \), notice that negative one, it falls into this criteria, because this is \( x \) is greater than or equal to negative one. We can't be equal to negative one up here, so we can't use this one, but we're going to have to use this equation for negative one. So putting negative one into this equation right here, we're going to have negative 1 squared minus 4.
Negative 1 squared, well, that's just going to be positive 1, and then minus 4, it's going to give us negative 3. So this right here would be \( f(-1) \). Now the last portion here asks us to find \( f(2) \). Now to find \( f(2) \), well, 2 is clearly greater than negative 1. So that's going to fit into this piece of the equation right here.
So going to have \( x^2 \) minus 4, which would be 2 squared minus 4. 2 squared is 4, and 4 minus 4 is 0. So this right here would be \( f(2) \). So now that we found these equations here, now that we found what this evaluates to by plugging it into our piecewise function, you can actually take a look at your graph here, and you'll actually notice that all of these points line up to where we said they would based on the graph that we have. So this is the situation where you can graph piecewise functions, and you can also evaluate them using these equations.
So I hope you found this video helpful, and let's go ahead and move on and try getting a little more practice with this concept. See you in the next one.