Piecewise Functions
Evaluate and Graph
Learn to read, evaluate, and graph functions defined by multiple rules on different intervals of the domain.
What Is a Piecewise Function?
A piecewise function is a function defined by two or more sub-functions, each applying to a specific interval of the domain. Rather than a single rule for every input, the rule that applies depends on which interval the input falls in.
Reading the Notation
A piecewise function uses a large brace to group sub-functions with their domain restrictions:
Why Do Piecewise Functions Matter?
Domain Intervals and Boundaries
Each sub-function owns a portion of the domain. At the boundary (where intervals meet), exactly one sub-function must claim the point to keep \( f \) a true function.
Continuous vs Discontinuous
How to Evaluate \( f(a) \)
Example 1: Evaluating at a Point
Find \( f(5) \): Since \( 5 \ge 2 \), use the second piece:
\( f(5) = 5^2 + 1 = 25 + 1 = \) 26.
Find \( f(-1) \): Since \( -1 < 2 \), use the first piece:
\( f(-1) = 3(-1) - 2 = -3 - 2 = \) \(-5\).
How to Graph Piecewise Functions
Example 2: Graphing a Piecewise Function
Example 3: Three-Piece Function
Evaluating at Boundary Points
Boundary points deserve special care. For the function in Example 3:
\( |x| \) as a Piecewise Function
The absolute value function is the most common piecewise function you already know:
Finding Domain and Range
For any piecewise function, the domain is the union of all intervals, and the range is the set of all output values across every piece.
Common Mistakes to Avoid
Summary Table
| Evaluate | Graph | |
|---|---|---|
| Step 1 | Identify the input \( x = a \) | Identify boundary \( x \)-values |
| Step 2 | Find which interval \( a \) belongs to | Graph each piece on its interval |
| Step 3 | Substitute into that sub-function | Mark endpoints (open/closed) |
| Step 4 | Simplify to get \( f(a) \) | Check continuity at boundaries |
| Key Check | Only one piece applies | No two filled dots at same \( x \) |
Question 1 of 5
Given \( f(x) = \begin{cases} 2x + 1 & \text{if } x < 3 \\ x^2 - 5 & \text{if } x \ge 3 \end{cases} \), what is \( f(3) \)?
Question 2 of 5
For the function \( g(x) = \begin{cases} -3 & \text{if } x < 0 \\ x + 1 & \text{if } 0 \le x \le 4 \\ 10 & \text{if } x > 4 \end{cases} \), what is \( g(0) + g(4) \)?
Question 3 of 5
A piecewise function has a jump discontinuity at \( x = c \) when:
Question 4 of 5
On the graph of \( h(x) = \begin{cases} x + 2 & \text{if } x \le 1 \\ 4 & \text{if } x > 1 \end{cases} \), which statement about the point at \( x = 1 \) is correct?
Question 5 of 5
What is the range of \( f(x) = \begin{cases} 2 & \text{if } x < 0 \\ x^2 & \text{if } 0 \le x \le 3 \end{cases} \)?