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
- Identify the Input: Look at the x-value you need to evaluate.
- Find the Correct "Piece": Check the domain restrictions (the inequalities next to each piece) to see which formula applies to your x-value.
- Substitute & Calculate: Plug the x-value into the correct formula and simplify.
- 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
- Our input is x = 2.
- Since 2 ≥ 1, we use the second piece: f(x) = x² - 4.
- Substitute: f(2) = (2)² - 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.