Piecewise Functions
Functions defined by different formulas on different intervals
Piecewise Functions
Definition
A piecewise function uses different formulas for different parts of the domain.
Example:
Evaluating
To find :
- Determine which condition satisfies
- Use the corresponding formula
Example: For the function above:
- (use since )
- (use since )
Graphing
- Graph each piece on its domain
- Use open circles for endpoints NOT included (< or >)
- Use closed circles for endpoints included (≤ or ≥)
Common Types
Absolute Value:
Step Functions: Different constant values on intervals
Continuity
Check if pieces "connect" at boundary points.
Continuous if:
📚 Practice Problems
1Problem 1easy
❓ Question:
Evaluate f(3) where f(x) = { x + 2, if x < 0 2x - 1, if x ≥ 0
💡 Show Solution
Step 1: Determine which piece to use: We need to evaluate f(3) Is 3 < 0? No Is 3 ≥ 0? Yes
Step 2: Use the appropriate formula: For x ≥ 0, use f(x) = 2x - 1
Step 3: Substitute x = 3: f(3) = 2(3) - 1 = 6 - 1 = 5
Answer: f(3) = 5
2Problem 2easy
❓ Question:
Evaluate and for
💡 Show Solution
For :
Since , use the first formula:
For :
Since , use the second formula:
Answer: ,
3Problem 3easy
❓ Question:
Evaluate f(-2) and f(0) where f(x) = { x², if x < 0 x + 1, if x ≥ 0
💡 Show Solution
Step 1: Evaluate f(-2): Is -2 < 0? Yes Use f(x) = x² f(-2) = (-2)² = 4
Step 2: Evaluate f(0): Is 0 < 0? No Is 0 ≥ 0? Yes Use f(x) = x + 1 f(0) = 0 + 1 = 1
Answer: f(-2) = 4, f(0) = 1
4Problem 4medium
❓ Question:
Write the absolute value function as a piecewise function.
💡 Show Solution
The absolute value changes behavior at the point where the inside equals zero.
when
When : the inside is positive or zero
When : the inside is negative
Answer:
5Problem 5medium
❓ Question:
Graph and identify the domain and range: f(x) = { -x, if x < 1 x - 2, if x ≥ 1
💡 Show Solution
Step 1: Graph first piece (x < 1): f(x) = -x for x < 1 This is a line with slope -1 At x = 0: f(0) = 0 At x = 1: f(1) = -1 (open circle, not included)
Step 2: Graph second piece (x ≥ 1): f(x) = x - 2 for x ≥ 1 This is a line with slope 1 At x = 1: f(1) = -1 (closed circle, included) At x = 3: f(3) = 1
Step 3: Identify domain: All real numbers (both pieces cover all x values) Domain: (-∞, ∞)
Step 4: Identify range: First piece goes from 1 down (as x approaches 1 from left) Second piece goes from -1 up Range: (-∞, ∞)
Answer: Domain: all real numbers, Range: all real numbers
6Problem 6medium
❓ Question:
Write a piecewise function for: y = |x - 2|
💡 Show Solution
Step 1: Recall absolute value definition: |a| = { a, if a ≥ 0 {-a, if a < 0
Step 2: Determine when (x - 2) ≥ 0: x - 2 ≥ 0 x ≥ 2
Step 3: Determine when (x - 2) < 0: x - 2 < 0 x < 2
Step 4: Write piecewise function: For x ≥ 2: |x - 2| = x - 2 For x < 2: |x - 2| = -(x - 2) = -x + 2
Step 5: Write in standard form: f(x) = { -x + 2, if x < 2 { x - 2, if x ≥ 2
Answer: f(x) = { -x + 2, if x < 2 { x - 2, if x ≥ 2
7Problem 7hard
❓ Question:
Is the function continuous at ?
💡 Show Solution
Check if the function value and limits match at .
From left: (use )
From right: (use )
Function value: (use since )
Since all three equal 2, the function is continuous at .
Answer: Yes, continuous at
8Problem 8hard
❓ Question:
A parking garage charges 3 for each additional hour up to 5 hours, and $20 flat rate for over 5 hours. Write and use a piecewise function for the cost.
💡 Show Solution
Step 1: Define the function C(t) for time t hours: For 0 < t ≤ 1: C(t) = 5 For 1 < t ≤ 5: C(t) = 5 + 3(t - 1) = 3t + 2 For t > 5: C(t) = 20
Step 2: Write complete piecewise function: C(t) = { 5, if 0 < t ≤ 1 { 3t + 2, if 1 < t ≤ 5 { 20, if t > 5
Step 3: Calculate cost for 3.5 hours: 3.5 is in range 1 < t ≤ 5 C(3.5) = 3(3.5) + 2 = 10.5 + 2 = 12.5
Step 4: Calculate cost for 6 hours: 6 > 5 C(6) = 20
Answer: C(t) = { 5, if 0 < t ≤ 1 { 3t + 2, if 1 < t ≤ 5 { 20, if t > 5 C(3.5) = 20
Practice with Flashcards
Review key concepts with our flashcard system
Browse All Topics
Explore other calculus topics