Piecewise Functions

Grade 12 · algebra · 100 practice problems · read aloud

🔊 Listen to this explanation

Piecewise Functions: Your Complete Guide

🔍 What Are Piecewise Functions?

A piecewise function is a function defined by multiple sub-functions, each applying to a specific interval of the domain. Think of it as a mathematical chameleon 🦎—it changes its formula based on the input value (x).

Why it's useful: They model real-world situations where a rule changes suddenly, like tax brackets, shipping rates, or parking fees that increase after a certain time.

📝 How to Evaluate Piecewise Functions

  1. Identify the Input: Look at the x-value you need to evaluate.
  2. Find the Correct "Piece": Check the domain restrictions (the inequalities next to each piece) to see which formula applies to your x-value.
  3. Substitute & Calculate: Plug the x-value into the correct formula and simplify.
  4. Check the Domain: Ensure your x-value satisfies the inequality for that piece. If it's exactly at a "break point," check if the interval includes it (e.g., ≤ vs. <).

🧮 Worked Examples

Example 1: Evaluate f(2) for the function below.

f(x) =
{ 2x + 1, if x < 1
{ x² - 4, if x ≥ 1

  1. Our input is x = 2.
  2. Since 2 ≥ 1, we use the second piece: f(x) = x² - 4.
  3. Substitute: f(2) = (2)² - 4 = 4 - 4
  4. Answer: f(2) = 0

Example 2: Evaluate f(-1) and f(3) for the function below.

g(x) =
{ 5, if x ≤ -2
{ |x|, if -2 < x < 2
{ -x + 1, if x ≥ 2

For g(-1): -1 is between -2 and 2, so we use the second piece: g(-1) = |-1| = 1.

For g(3): 3 ≥ 2, so we use the third piece: g(3) = -(3) + 1 = -2.

⚠️ Common Mistakes to Avoid

  • Using the wrong piece: Always double-check the domain inequality. Is it "less than" (<) or "less than or equal to" (≤)? This matters at the breakpoints!
  • Misreading the domain: For an x-value like -2 in Example 2, it satisfies the first piece (x ≤ -2), not the second.
  • Forgetting to evaluate: Don't just identify the correct piece—remember to actually plug in the x-value and calculate the result.

💡 Tips & Tricks

  • Visualize it: Sketching a quick graph can help you see which piece to use.
  • Highlight the input: Circle or underline the x-value you're evaluating to stay focused.
  • Check the "edges": For x-values at the boundaries between pieces, carefully check the inequality symbol to see which piece includes that value.
  • Think in "pieces": Mentally break the function into its separate parts and solve each relevant part one at a time.

🎯 How to Practice

Master piecewise functions with these strategies:

  • Start with evaluation: Given a function and specific x-values, find f(x).
  • Move to graphing: Practice graphing each piece on its specified interval. Pay attention to open and closed circles at the endpoints.
  • Create your own: Invent a piecewise function that models a real-life scenario, like a cell phone plan with a data cap.
  • Use online resources: Find practice problems on sites like Khan Academy that provide instant feedback.

Practice problems

6 of the 100, worked through step by step — try them before opening the answer.

1 f(x) = {3x - 1 if x < 2; 7 if 2 ≤ x < 5; x² - 4 if x ≥ 5}. Evaluate f(1), f(3), f(7)

Hint: Identify which piece of the function applies to each input value based on the domain restrictions, then substitute and compute.

Show the answer

Answer: 2, 7, 45

  1. Evaluate f(1) Since 1 < 2, use the first piece: f(x) = 3x - 1 f(1) = 3(1) - 1 = 3 - 1 = 2
  2. Evaluate f(3) Since 2 ≤ 3 < 5, use the second piece: f(x) = 7 f(3) = 7
  3. Evaluate f(7) Since 7 ≥ 5, use the third piece: f(x) = x² - 4 f(7) = 7² - 4 = 49 - 4 = 45 Final answer: 2, 7, 45

2 f(x) = {x^2 - 7 if x < 3; 2x + 1 if 3 ≤ x < 8; 17 if x ≥ 8}. Evaluate f(2), f(3), f(7), f(9)

Hint: Determine which piece of the function applies to each x-value based on the domain conditions, then substitute and compute.

Show the answer

Answer: f(2) = -3, f(3) = 7, f(7) = 15, f(9) = 17

  1. Evaluate f(2) Since 2 < 3, use the first piece: f(x) = x^2 - 7 f(2) = (2)^2 - 7 = 4 - 7 = -3
  2. Evaluate f(3) Since 3 ≤ 3 < 8, use the second piece: f(x) = 2x + 1 f(3) = 2(3) + 1 = 6 + 1 = 7
  3. Evaluate f(7) Since 3 ≤ 7 < 8, use the second piece: f(x) = 2x + 1 f(7) = 2(7) + 1 = 14 + 1 = 15
  4. Evaluate f(9) Since 9 ≥ 8, use the third piece: f(x) = 17 f(9) = 17 Final answer: f(2) = -3, f(3) = 7, f(7) = 15, f(9) = 17

3 f(x) = {x² - 6 if x < 1; 4x - 1 if 1 ≤ x < 6; 16 if x ≥ 6}. Evaluate f(-1), f(1), f(6), f(8)

Hint: For each x-value, determine which piece's domain condition it satisfies. Substitute the x-value into the correct expression and compute carefully.

Show the answer

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

  1. Evaluate f(-1). Since -1 < 1, use the first piece: f(x) = x² - 6. f(-1) = (-1)² - 6 = 1 - 6 = -5.
  2. Evaluate f(1). Since 1 ≤ 1 < 6, use the second piece: f(x) = 4x - 1. f(1) = 4(1) - 1 = 4 - 1 = 3.
  3. Evaluate f(6). Since 6 ≥ 6, use the third piece: f(x) = 16. f(6) = 16.
  4. Evaluate f(8). Since 8 ≥ 6, use the third piece: f(x) = 16. f(8) = 16. Final answer: f(-1) = -5, f(1) = 3, f(6) = 16, f(8) = 16.

4 f(x) = {3x + 5 if x < -1; 2x^2 - 1 if -1 ≤ x < 3; 7 if x ≥ 3}. Evaluate f(-2), f(0), f(3), f(5)

Hint: Identify which piece of the function applies to each x-value based on the domain conditions, then substitute and compute.

Show the answer

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

  1. Evaluate f(-2) Since -2 < -1, use the first piece: f(x) = 3x + 5 f(-2) = 3(-2) + 5 = -6 + 5 = -1
  2. Evaluate f(0) Since -1 ≤ 0 < 3, use the second piece: f(x) = 2x^2 - 1 f(0) = 2(0)^2 - 1 = 0 - 1 = -1
  3. Evaluate f(3) Since 3 ≥ 3, use the third piece: f(x) = 7 f(3) = 7
  4. Evaluate f(5) Since 5 ≥ 3, use the third piece: f(x) = 7 f(5) = 7 Final answer: f(-2) = -1, f(0) = -1, f(3) = 7, f(5) = 7

5 f(x) = {4x - 6 if x < -2; 2x^2 - 8 if -2 ≤ x < 4; 10 if x ≥ 4}. Evaluate f(-3), f(0), f(4), f(6)

Hint: For each x-value, first check which domain condition it satisfies. Then use the corresponding expression to compute the output. Pay careful attention to the inequality signs to ensure you choose the correct piece.

Show the answer

Answer: f(-3) = -18, f(0) = -8, f(4) = 10, f(6) = 10

  1. Evaluate f(-3) Since -3 < -2, use the first piece: f(x) = 4x - 6 f(-3) = 4(-3) - 6 = -12 - 6 = -18
  2. Evaluate f(0) Since -2 ≤ 0 < 4, use the second piece: f(x) = 2x^2 - 8 f(0) = 2(0)^2 - 8 = 0 - 8 = -8
  3. Evaluate f(4) Since 4 ≥ 4, use the third piece: f(x) = 10 f(4) = 10
  4. Evaluate f(6) Since 6 ≥ 4, use the third piece: f(x) = 10 f(6) = 10 The final answers are: f(-3) = -18, f(0) = -8, f(4) = 10, f(6) = 10

6 f(x) = {3x + 5 if x < -1; 7 if -1 ≤ x < 3; x² - 2x + 1 if x ≥ 3}. Evaluate f(-2), f(0), f(3), f(4)

Hint: Identify which piece of the function applies to each input value based on the domain restrictions, then substitute and compute.

Show the answer

Answer: f(-2) = -1, f(0) = 7, f(3) = 4, f(4) = 9

  1. Evaluate f(-2) Since -2 < -1, use the first piece: f(x) = 3x + 5 f(-2) = 3(-2) + 5 = -6 + 5 = -1
  2. Evaluate f(0) Since -1 ≤ 0 < 3, use the second piece: f(x) = 7 f(0) = 7
  3. Evaluate f(3) Since 3 ≥ 3, use the third piece: f(x) = x² - 2x + 1 f(3) = (3)² - 2(3) + 1 = 9 - 6 + 1 = 4
  4. Evaluate f(4) Since 4 ≥ 3, use the third piece: f(x) = x² - 2x + 1 f(4) = (4)² - 2(4) + 1 = 16 - 8 + 1 = 9 Final answer: f(-2) = -1, f(0) = 7, f(3) = 4, f(4) = 9
Practise this topic — 10 free problems, no signup →