CMClearMathAcademy

Piecewise Functions

A free Algebra II lesson from the “Functions and Notation” unit, with a worked example and practice problems including step-by-step solutions.

A piecewise function uses different rules on different parts of its domain. Each piece has a condition like 'if x < 0' or 'if x >= 2'. To evaluate f(c), find which condition c satisfies, then apply that rule.

What you'll learn

Why it matters: Tax brackets, shipping rates that change with weight thresholds, and step-function timers all use piecewise rules.

Worked example

Problem. f(x) = 2x if x < 0; x + 1 if x >= 0. Find f(-3), f(0), and f(5).

  1. -3 < 0 -> use 2x: f(-3) = -6.
  2. 0 >= 0 -> use x + 1: f(0) = 1.
  3. 5 >= 0 -> use x + 1: f(5) = 6.

Answer: f(-3) = -6, f(0) = 1, f(5) = 6

Practice problems

1. f(x) = x if x < 0; x + 2 if x >= 0. Find f(-5).

Show solution
  1. Warm-up: First identify exactly what the question is asking: f(x) = x if x < 0; x + 2 if x >= 0. Find f(-5).
  2. For function notation, treat the value inside parentheses as the input and carefully substitute it into the rule.
  3. -5 < 0 -> use x: f(-5) = -5.
  4. Check the result by substituting or estimating: the response should match -5 and make sense in the original problem.

Answer: -5

2. Same f. Find f(3).

Show solution
  1. Warm-up: First identify exactly what the question is asking: Same f. Find f(3).
  2. Choose the operation or relationship that matches the wording, then carry it out one clear step at a time.
  3. 3 >= 0 -> use x + 2: f(3) = 5.
  4. Check the result by substituting or estimating: the response should match 5 and make sense in the original problem.

Answer: 5

3. f(x) = 2x if x <= 1; x^2 if x > 1. Find f(0).

Show solution
  1. Warm-up: First identify exactly what the question is asking: f(x) = 2x if x <= 1; x^2 if x > 1. Find f(0).
  2. For function notation, treat the value inside parentheses as the input and carefully substitute it into the rule.
  3. 0 <= 1 -> use 2x: f(0) = 0.
  4. Check the result by substituting or estimating: the response should match 0 and make sense in the original problem.

Answer: 0

4. Same f. Find f(3).

Show solution
  1. Core Practice: First identify exactly what the question is asking: Same f. Find f(3).
  2. Choose the operation or relationship that matches the wording, then carry it out one clear step at a time.
  3. 3 > 1 -> use x^2: f(3) = 9.
  4. Check the result by substituting or estimating: the response should match 9 and make sense in the original problem.

Answer: 9

5. f(x) = x + 1 if x < 2; 5 - x if x >= 2. Find f(0).

Show solution
  1. Core Practice: First identify exactly what the question is asking: f(x) = x + 1 if x < 2; 5 - x if x >= 2. Find f(0).
  2. For function notation, treat the value inside parentheses as the input and carefully substitute it into the rule.
  3. 0 < 2 -> use x + 1: f(0) = 1.
  4. Check the result by substituting or estimating: the response should match 1 and make sense in the original problem.

Answer: 1

Practice this interactively with instant feedback and an AI tutor.

Practice Piecewise Functions Take the free placement check

More Algebra II lessons