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 take these equations and graph them individually. Now, what we're going to be learning in this video is how we can take multiple equations like this and combine them into a single function. This is known as a piecewise function, and a piecewise function is made up of multiple equations. Because we cannot have a situation where these equations overlap each other, 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 how we define the equations for different x values. Now, I need to 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, f of x, is I 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. I'll pause right here and mention that it's possible you also have more than 2 equations. You might have 3 or 4 equations where more x values are defined. But since here we're only looking at negative one, I'm going to draw a wall right here through this x value of negative one.
This wall tells me where my functions are going to be defined. So everything on the left side of the wall will be this equation, and everything on the right side of the wall will be that equation. This equation shows us right here that we have \( x \geq -1 \), whereas the other equation shows us where \( x < -1 \). And notice how these are the same equations that we had over here. So if I were to draw a wall on my graph, what I'm doing is taking this left piece of the equation, 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.
We first will graph \( -x \) where \( x < -1 \). This will be the first piece of our piecewise function. The next piece is where \( x \geq -1 \). We'll notice that it's a parabola. However, I can't just draw a full parabola because we are only defining the parabola on the right side of this wall. When we have this negative one value, and we're down here at negative 3, we'll have a parabola that looks something like this, and this would be the right side of this piecewise function.
I'll now 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, we have these empty points finishing here, and we need to write something for these. For this piece saying \( x < -1 \), it can't actually be equal to negative one, so we have to put an open circle right there. For this other piece, we see that \( x \geq -1 \), so I can put a solid circle right there.
These two parts are not connected. There's a jump that happens right here. Whenever you have the situation where the y values between the pieces don't match, we call this a jump discontinuity, because we have this jump right here. It is not going to be continuous. I have to pick up my pen and move to another part of the graph. This jump indicates that the curve is not continuous, but that's okay because this happens a lot when dealing with these piecewise functions.
We also need to evaluate these functions by plugging values into the correct equations. My first function that I'm trying to evaluate at an x value of negative 3, which is clearly less than negative one, falls into this portion of the equation. So I'm going to use negative x, giving us positive 3. This right here would be \( f(-3) \). Now, for \( f(-1) \), notice negative one fits here because \( x \geq -1 \). We'll input -1 into this equation giving us negative 3 again, so this would be \( f(-1) \). For \( f(2) \), \( x \) is greater than -1, so we use the equation \( x^2 - 4 \), giving 0. This is \( f(2) \).
Now that we found these evaluations by plugging them into our piecewise function, you can take a look at graph and notice that all of these points line up to where we said they would based on the graph we have. This is how you can graph piecewise functions and also evaluate them using these equations.
I hope you found this video helpful. Let's go ahead and try getting a little more practice with this concept. See you in the next one.