A function is said to be piecewise if it is defined by different rules for different parts of its domain. One example of a piecewise function is This function is defined by one linear function for values of smaller than and another linear function for values of that are greater than or equal to zero. The graph of is shown.
When graphing a piecewise function, each piece must be considered separately. First, a piece is graphed for the values of its domain. Then an end or ends of the piece are marked with
Consider the piecewise function The function consists of two pieces, where each is a linear function. The first of these is defined when is less than or equal to As this piece is not defined for the -intercept can not be used to graph. Instead it can be graphed using a table of values.
These points are then marked and, as it is a linear function, joined with a straight line across the corresponding domain. The rule states that this piece is defined at Therefore, the end is marked with a closed circle.
The second piece of the function is defined for Therefore, the -intercept can be used when graphing the function. The equation gives a linear function in slope-intercept form with By using the -intercept and the slope, two points can be marked and then connected with a line across the corresponding domain. Since only -values greater than are in the interval, the endpoint is not included in the function. Therefore, it is marked with an open circle.
Removing all unnecessary information, the final graph of is shown.
Consider the rule of a piecewise function, Use the rule to determine and Then verify the points on the function's graph.
When determining points on a piecewise function, it is important to make sure that the correct piece of the function is used.
To evaluate we must use the first piece of the function, because is an element of that domain. Therefore, we find that Thus, should be a point on the graph of We can find in the same way. However, will be used. Thus, the point should also lie on the graph. We'll plot both to verify.
Both points lie on the graph of which verifies that
A piecewise function that is defined by a constant value on each part of its domain is called a step function The following equation is one example of a step function. Graphs to step functions consist of two or more line segments that are horizontal lines. The function has four segments.
When graphing step functions, as when graphing any piecewise function, each piece must be considered separately. Graph each piece across its domain. Mark the end or ends of with
To park a car at the Sombra Brothers Amusement Park costs $ for the first two hours, then another $ for each additional hour. Graph a function which describes the parking fee.
To begin, we'll make sense of the given information. The cost for parking the car starts at $ That cost remains unchanged for the first two hours. If you stay less than two hours, the entire amount must be paid. Each additional hour costs $ This is true even if you only go one minute into the next hour. Therefore, the fee for parking the car can be described as follows.
|total cost||number of hours parked|
Since the parking fee is constant across each interval this is a step function. We can graph each piece of the function separately by drawing a horizontal line at the total cost for the corresponding number of hours.
The lower end of each piece is marked with a closed circle, while the upper end is marked with an open circle.