01 / 21

Piecewise Functions
Evaluate and Graph

Learn to read, evaluate, and graph functions defined by multiple rules on different intervals of the domain.

College Algebra

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:

Sub-function 1
\( x + 3 \) applies when \( x < 1 \)
Sub-function 2
\( 2x - 1 \) applies when \( x \ge 1 \)

Why Do Piecewise Functions Matter?

Tax Brackets
Income is taxed at different rates depending on which bracket it falls in: a natural piecewise model.
Shipping Costs
Flat rate up to 5 lbs, per-pound rate above: pricing rules change at a threshold.
Absolute Value
\( |x| \) is itself piecewise: \( x \) when \( x \ge 0 \) and \( -x \) when \( x < 0 \).

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.

1
\( x < 1 \) (open at 1)
\( x \ge 1 \) (closed at 1)

Continuous vs Discontinuous

Continuous
The pieces connect at the boundary: no gap or jump. Both sub-functions give the same output at \( x = c \).
Discontinuous (Jump)
The pieces do not connect: a visible gap or jump at the boundary. The outputs differ at \( x = c \).
Continuous 2 Jump Discontinuity 2 jump

How to Evaluate \( f(a) \)

1
Identify the input. What value of \( x \) are you substituting? (e.g., \( x = 4 \))
2
Find the correct interval. Check each condition to see which one \( x = 4 \) satisfies.
3
Use the matching sub-function. Substitute the input into that rule only.
4
Simplify. Compute the output to get \( f(4) \).

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

1
Identify the boundary values. These are the \( x \)-values where the rule changes.
2
Graph each sub-function on its interval only. Ignore values outside its domain restriction.
3
Mark the endpoints. Use a filled circle for \( \le \) or \( \ge \) and an open circle for \( < \) or \( > \).
4
Combine all pieces into one graph. Check for jumps or connections at boundaries.

Example 2: Graphing a Piecewise Function

x y 2 4 6 1 2 3 4 \( y = -x + 4 \) \( y = x \) boundary

Example 3: Three-Piece Function

x y −1 2 1 2 3 4 5 \( y = 1 \) \( y = x^2 \) \( y = 5 \)

Evaluating at Boundary Points

Boundary points deserve special care. For the function in Example 3:

At \( x = -1 \)
\( -1 \le -1 \le 2 \) is true, so use the middle piece: \( g(-1) = (-1)^2 = 1 \).
At \( x = 2 \)
\( -1 \le 2 \le 2 \) is true, so use the middle piece: \( g(2) = 2^2 = 4 \).

\( |x| \) as a Piecewise Function

The absolute value function is the most common piecewise function you already know:

x y 1 2 3 −1 −2 −3 1 2 3 \( y = -x \) \( y = x \)

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.

1
Domain: Combine all conditions. If every real number is covered by some piece, the domain is \( (-\infty, \infty) \).
2
Range: Determine the output values for each piece on its interval, then take their union.

Common Mistakes to Avoid

✕ Using the Wrong Piece
Plugging \( x = 3 \) into the first rule when \( x = 3 \) belongs to the second interval. Always check the condition first.
✕ Double-Claiming a Boundary
Writing \( x \le 2 \) for one piece and \( x \ge 2 \) for another makes \( x = 2 \) belong to both: the function is not well-defined.
✕ Wrong Circle Type
Drawing a filled circle when the inequality is strict (\( < \) or \( > \)), or an open circle when it should be closed (\( \le \) or \( \ge \)).

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} \)?