Piecewise Functions: Step-by-Step Guide
A piecewise function uses different rules for different inputs. To find an output, first look at which range of numbers your x falls in. Then use the rule for that range. Pay close attention to whether the endpoints are included (<= or >=) or not (< or >).
Math Racer skill guide · Algebra 2 · Grade 11
How to solve it, step by step
- Read each piece. Write down each rule together with the condition that tells you when to use it.\[f(x) = \begin{cases} f_{1}(x), & x < a \\ f_{2}(x), & a \le x < b \\ f_{3}(x), & x \ge b \end{cases}\]
- Decide which piece applies. Compare your x to the conditions and find the one that fits. Be careful with the endpoints.\[\text{find the unique } i \text{ such that } x \text{ satisfies the } i\text{-th condition}\]
- Put x into that rule. Use only the rule for that piece. Ignore the others.\[f(x) = f_{i}(x)\]
- Work out the answer. Do the arithmetic to get a single number.\[f(x) = \text{numeric value}\]
- Check the boundaries (if asked). If the problem asks about a boundary, find what the function approaches from each side and compare it with the value at the boundary.\[\lim_{x\to a^{-}}f(x),\;\lim_{x\to a^{+}}f(x),\;f(a)\]
Worked example
Given f(x) = { 2x + 1 if x < 0; x^2 if 0 <= x <= 3; 10 if x > 3 }, find f(-2), f(2), and f(5).
Step 1: There are three pieces: 2x + 1 when x < 0, x^2 when 0 <= x <= 3, and 10 when x > 3.
Step 2: For f(-2): -2 is less than 0, so use 2x + 1. 2(-2) + 1 = -3.
Step 3: For f(2): 2 is between 0 and 3, so use x^2. 2^2 = 4.
Step 4: For f(5): 5 is bigger than 3, so use the constant piece. The answer is 10.
Step 5: So f(-2) = -3, f(2) = 4, and f(5) = 10.
Check: Each input matched exactly one piece, and we used only that piece's rule.
Tips and common mistakes
- Check which way each inequality points, and whether the endpoint is included (<= or >=) or not (< or >).
- Each x belongs to exactly one piece. If it fits two, the function is not written correctly.
- At a boundary, use the piece whose condition includes that exact number.
- To check if a piecewise function connects smoothly, compare what it approaches from the left, what it approaches from the right, and the actual value.
- Sketch each piece on its own range. A picture often makes things clear.
- Never use more than one rule at a time. Pick the one that fits and use only that one.
- Absolute value functions can be written as piecewise functions.