Lesson 4 of 8 · 16 min
Piece-wise functions
Evaluate, graph and interpret piece-wise functions — sub-functions on restricted domains — with correct open and closed endpoints and joins.
What you will be able to do
- Read a piece-wise rule and evaluate it, choosing the correct piece at a boundary.
- Sketch a piece-wise function with correct open and closed endpoints.
- Decide whether the pieces join, and find a constant that makes them join.
- Write the rule of a piece-wise function from its graph, and state its domain and range.
Some relationships change their rule partway along. Postage is one price up to 500 g and another above it. A phone plan charges nothing extra until you pass your data limit, then charges for every gigabyte. A single formula cannot describe these — you need a different rule on each part of the domain.
Definition
Piece-wise function
A piece-wise function is made of two or more sub-functions, each with its own restricted domain. The domains do not overlap, so every input uses exactly one rule. A brace collects the pieces, with each domain written beside its rule.
The graph of . The first piece stops at an open circle because excludes ; the middle piece starts with a closed dot at . At the middle and right pieces meet at .
To evaluate a piece-wise function, first decide which piece the input belongs to, then use only that rule:
- : since , use , so .
- : since , use , so .
- : since , use , so .
Boundary values need care. satisfies , not , so it belongs to the middle piece.
For the function above, find .
Key idea
Open and closed endpoints
Draw a closed dot where an endpoint belongs to the piece ( or ) and an open circle where it does not ( or ).
At any -value there can be at most one closed dot. Two closed dots one above the other would give one input two outputs — and the relation would not be a function.
Worked example
Evaluate, sketch and describe a piece-wise function
(a) Find , , and . (b) Sketch the graph of . (c) State the domain and range of .
Step 1: Match each input to its piece
, so uses . Both and satisfy , so they use . , so uses .
Step 2: Evaluate
, , and .
Step 3: Find where each piece starts and stops
The line heads towards but stops short of it: an open circle. The parabola runs from to , with closed dots at both ends. The line starts just after .
Strict inequalities (, ) give open circles; and give closed dots.
Step 4: Sketch the three pieces
Draw the rising line to the left of , the parabola arc from to , and the falling line to the right of , and label the endpoints. The graph jumps at and joins up at .
Step 5: State the domain
The three pieces cover every real number exactly once, so the domain is .
Step 6: Combine the ranges of the pieces
The first piece gives , the parabola gives and the last piece gives . Together they give .
The value is reached at by the parabola, so it is included.
Try it yourself first, then check the working one step at a time.
Answer
, , and . The domain is and the range is .
Method
For each input, find the piece whose domain contains it, then use that rule only.
Sketch each piece only over its own domain, with open or closed endpoints.
The domain is the union of the pieces' domains; the range is the union of their outputs.
Watch out for
Using for and getting .
Stating the range as by looking at the middle piece only.
If two neighbouring pieces give the same value at their boundary, the graph joins up there with no jump — the function is continuous at that point. If they give different values, the graph jumps. In the function above there is a jump at (from down to ) and a join at (both pieces give ).
The right-hand piece (for ) is fixed. Slide to move the left-hand piece up or down. Before you find it, predict the value of from the equations.
To make the pieces join algebraically, substitute the boundary value into both rules and set the results equal.
Worked example
Find the constant that makes the pieces join
(a) Find the value of for which the graph of has no jump at . (b) Using this value of , find .
Step 1: Evaluate the first piece at the boundary
belongs to the first piece, so .
Step 2: Evaluate the second piece at the boundary
As approaches from the right, the second piece approaches .
is not in this piece, but the piece still heads towards the point .
Step 3: Set the values equal and solve
Step 4: Use the correct piece for
, so .
Try it yourself first, then check the working one step at a time.
Answer
, and then .
Method
Substitute the boundary value into both rules.
Set the two results equal and solve for the unknown.
Watch out for
Substituting a value other than the boundary, such as , into both rules.
Find the value of for which has no jump at .
To write a rule from a graph, treat each piece separately: find its equation (for a line, the gradient and -intercept), then write its domain from where it starts and stops, using for a closed dot and for an open circle.
Which rule gives the function graphed below?
Common mistake
Where marks go at the boundaries
- Using the wrong piece at a boundary value. Check each inequality: does it include the boundary?
- Drawing closed dots on both pieces at the same -value, or forgetting the dots entirely.
- Drawing a sub-function beyond its own domain. Each piece stops at its endpoints.
Summary
A piece-wise function uses different sub-functions on non-overlapping restricted domains.
To evaluate it, find the piece whose domain contains the input, then use that rule only.
Closed dots for and , open circles for and ; never two closed dots at the same -value.
Pieces join (no jump) when both rules give the same value at the boundary; set them equal to find an unknown constant.
The domain is the union of the pieces' domains; the range is the union of the outputs of every piece.
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.