Defining and graphing functions with different rules over different intervals. Covers piecewise function notation, evaluating and graphing piecewise-defined functions, continuity at boundary points, and absolute value functions as a special case of piecewise. Includes transformations of absolute value functions and solving absolute value equations and inequalities.
High School Advanced • 9-12
Not every real-world relationship follows a single smooth formula. Tax brackets, shipping costs, speed limits -- many quantities are defined by different rules on different intervals. Piecewise functions capture this reality by stitching together multiple formulas, each governing a specific domain. The absolute value function, one of the most important functions in mathematics, turns out to be a piecewise function in disguise.
A piecewise function is defined using a brace that groups several formulas, each with a domain restriction:
To evaluate a piecewise function at a specific input, first determine which piece the input belongs to, then use that formula:
Graph each piece on its specified interval. Pay close attention to the endpoints:
At a boundary between pieces, there may be a jump (the two pieces do not meet), a corner (they meet but at different slopes), or a smooth connection (they meet with the same slope).
A function is continuous at a boundary point x = c if the left-hand piece and the right-hand piece give the same output at x = c. Formally:
If these are not all equal, the function has a discontinuity (a jump or hole) at that point.
The absolute value function |x| can be written as:
This means: if x is nonnegative, leave it alone; if x is negative, negate it (making it positive). The graph is a V-shape with vertex at the origin, symmetric about the y-axis.
The general absolute value function is:
The vertex of f(x) = a|x - h| + k is at the point (h, k).
The equation |expression| = c (where c ≥ 0) splits into two cases:
If c < 0, the equation has no solution (absolute value is never negative).
These require careful treatment:
Problem: Given f(x) = { 3x - 1 if x < 2; x^2 + 1 if x ≥ 2 }, find f(-1), f(2), and f(5).
Solution:
f(-1): Since -1 < 2, use the first piece: f(-1) = 3(-1) - 1 = -4.
f(2): Since 2 ≥ 2, use the second piece: f(2) = 2^2 + 1 = 5.
f(5): Since 5 ≥ 2, use the second piece: f(5) = 5^2 + 1 = 26.
Continuity check at x = 2: Left piece gives 3(2) - 1 = 5. Right piece gives 2^2 + 1 = 5. Both give 5, so f is continuous at x = 2.
Problem: Solve |2x - 5| = 9.
Solution: Split into two cases:
Case 1: 2x - 5 = 9 → 2x = 14 → x = 7
Case 2: 2x - 5 = -9 → 2x = -4 → x = -2
Check: |2(7) - 5| = |9| = 9. |2(-2) - 5| = |-9| = 9. Both check out.
Solutions: x = 7 and x = -2.
Problem: Solve |3x + 1| ≤ 8.
Solution: Since this is a "less than or equal to" inequality:
Subtract 1 from all parts: -9 ≤ 3x ≤ 7
Divide by 3: -3 ≤ x ≤ 7/3
Solution: x is in the interval [-3, 7/3].
Tax brackets are a perfect example. If you earn $0-$10,000, you pay 10%. If you earn $10,001-$40,000, you pay 12% on the amount over $10,000 (plus the fixed tax on the first bracket). Each bracket is a different "piece" of the tax function. Shipping costs, phone plans, and overtime pay all work similarly.
Problem 1: Given g(x) = { -2x + 3 if x ≤ 1; x^2 - 2 if x > 1 }, find g(-2), g(1), and g(3). Is g continuous at x = 1?
g(-2): -2 ≤ 1, so g(-2) = -2(-2) + 3 = 7.
g(1): 1 ≤ 1, so g(1) = -2(1) + 3 = 1.
g(3): 3 > 1, so g(3) = 3^2 - 2 = 7.
Continuity at x = 1: Left piece gives -2(1) + 3 = 1. Right piece as x approaches 1 from the right gives 1^2 - 2 = -1. Since 1 ≠ -1, g is not continuous at x = 1 (there is a jump).
Problem 2: Solve |4x - 3| = 11.
Case 1: 4x - 3 = 11 → 4x = 14 → x = 7/2
Case 2: 4x - 3 = -11 → 4x = -8 → x = -2
Solutions: x = 7/2 and x = -2.
Problem 3: Solve |2x + 5| > 3.
This is a "greater than" inequality, so it splits into a disjunction:
2x + 5 > 3 → 2x > -2 → x > -1
OR
2x + 5 < -3 → 2x < -8 → x < -4
Solution: x < -4 or x > -1, which is (-∞, -4) ∪ (-1, ∞).
Problem 4: Describe the transformations and vertex of f(x) = -3|x + 2| + 5.
Rewrite in standard form: f(x) = -3|x - (-2)| + 5.
h = -2 (shift left 2), k = 5 (shift up 5). Vertex: (-2, 5).
a = -3: The V opens downward (a is negative) and is steeper than the basic |x| (stretched by factor 3).
The maximum value of f is 5, occurring at x = -2.
Problem 5: Write a piecewise function for the following: a parking garage charges $5 for the first hour, $3 for each additional hour up to 5 hours total, and $20 flat for anything beyond 5 hours. Let C(t) represent cost as a function of time t (in hours, t > 0).
C(t) = { 5 if 0 < t ≤ 1; 5 + 3(t - 1) if 1 < t ≤ 5; 20 if t > 5 }
Simplifying the middle piece: C(t) = 3t + 2 for 1 < t ≤ 5.
Check continuity: At t = 1: both give $5. At t = 5: middle piece gives 3(5) + 2 = 17, third piece gives 20. There is a jump at t = 5 -- the price jumps from $17 to $20. (This is realistic: the garage would likely charge $20 as soon as you exceed 5 hours.)
Piecewise functions define different rules on different intervals, modeling real-world situations where behavior changes at boundary points. The absolute value function is a fundamental piecewise function, expressed as |x| = x when x ≥ 0 and -x when x < 0. Transformations of absolute value follow the same shift-stretch-reflect rules as other function families. Absolute value equations split into two cases, while inequalities split into conjunctions (less than) or disjunctions (greater than). Checking continuity at boundary points is essential: the pieces must agree at shared endpoints for the function to be continuous.