Piecewise functions, those mathematical chameleons that change their behavior depending on the input, can seem daunting at first. But with a little practice and the right examples, understanding and mastering them becomes surprisingly straightforward. This guide provides a range of piecewise function examples with detailed solutions, designed to build your confidence and proficiency. We'll cover various scenarios, from simple to more complex, ensuring you develop a solid grasp of this important concept.
What is a Piecewise Function?
A piecewise function is defined by multiple sub-functions, each applying to a specific interval of the input's domain. Think of it as a function with multiple personalities – each personality (sub-function) is active only within its designated domain. These functions are typically defined using a combination of equations and conditions that specify the input range for each sub-function.
The general form of a piecewise function is:
f(x) = {
g(x), if a ≤ x < b
h(x), if b ≤ x < c
k(x), if x ≥ c
}
Where g(x), h(x), and k(x) are different functions, and a, b, and c define the intervals over which each sub-function is active. Note that the intervals may be open or closed, depending on the definition of the function.
Piecewise Function Examples with Solutions
Let's dive into some examples, starting with the simpler ones and progressing to more intricate scenarios. Each example will include a clear problem statement, step-by-step solution, and the final answer.
Example 1: A Simple Piecewise Function
Problem: Evaluate the piecewise function below for x = -2, x = 0, and x = 3:
f(x) = {
2x + 1, if x < 0
x² , if x ≥ 0
}
Solution:
- x = -2: Since -2 < 0, we use the first sub-function: f(-2) = 2(-2) + 1 = -3
- x = 0: Since 0 ≥ 0, we use the second sub-function: f(0) = 0² = 0
- x = 3: Since 3 ≥ 0, we use the second sub-function: f(3) = 3² = 9
Answer: f(-2) = -3, f(0) = 0, f(3) = 9
Example 2: Piecewise Function with Absolute Value
Problem: Graph the following piecewise function:
f(x) = {
|x|, if x < 2
x - 1, if x ≥ 2
}
Solution: This involves graphing each sub-function within its specified interval.
- For x < 2, we graph the absolute value function |x|. This will be a V-shape with the vertex at (0,0). However, we only graph the portion where x < 2.
- For x ≥ 2, we graph the linear function x - 1. This is a line with a slope of 1 and a y-intercept of -1. We only graph the portion where x ≥ 2.
(Note: A visual graph would be included here in a PDF version. This section would show a clear and labeled graph displaying both sub-functions and their respective domains.)
Example 3: A More Complex Piecewise Function
Problem: Find the value of f(1)
, f(3)
, and f(5)
for the function:
f(x) = {
x² + 1, if x < 2
5 , if 2 ≤ x ≤ 4
2x - 3, if x > 4
}
Solution:
- f(1): Since 1 < 2, we use the first sub-function: f(1) = 1² + 1 = 2
- f(3): Since 2 ≤ 3 ≤ 4, we use the second sub-function: f(3) = 5
- f(5): Since 5 > 4, we use the third sub-function: f(5) = 2(5) - 3 = 7
Answer: f(1) = 2, f(3) = 5, f(5) = 7
Further Exploration and Practice
These examples provide a foundation for understanding piecewise functions. To solidify your understanding, try working through additional problems, focusing on different types of sub-functions (linear, quadratic, absolute value, etc.) and varying the intervals. You can find many practice problems online or in textbooks. Remember, the key is to carefully identify which sub-function to use based on the input value. With practice, you’ll become adept at solving piecewise function problems. Consider exploring the concept of continuity and limits within piecewise functions for a more advanced understanding.