Piecewise Functions
Defining and evaluating functions with different rules on different intervals
Piecewise Functions
What is a Piecewise Function?
A piecewise function is defined by different formulas on different parts of its domain.
General Form
\text{formula 1} & \text{if condition 1} \\ \text{formula 2} & \text{if condition 2} \\ \vdots & \vdots \end{cases}$$ ### Example $$f(x) = \begin{cases} x^2 & \text{if } x < 0 \\ 2x + 1 & \text{if } x \geq 0 \end{cases}$$ This means: - Use $f(x) = x^2$ when $x$ is negative - Use $f(x) = 2x + 1$ when $x$ is zero or positive ## Evaluating Piecewise Functions To evaluate $f(a)$ for a piecewise function: 1. Determine which condition $a$ satisfies 2. Use the formula for that piece 3. Calculate the value ### Example For the function above: - $f(-2) = (-2)^2 = 4$ (use first piece since $-2 < 0$) - $f(0) = 2(0) + 1 = 1$ (use second piece since $0 \geq 0$) - $f(3) = 2(3) + 1 = 7$ (use second piece since $3 \geq 0$) ## Continuity of Piecewise Functions A piecewise function is **continuous** at $x = a$ if: 1. $f(a)$ is defined 2. $\lim_{x \to a} f(x)$ exists 3. $\lim_{x \to a} f(x) = f(a)$ **Practical check:** The function is continuous if the pieces "connect" (no jump or gap). ### Checking Continuity at a Boundary For continuity at $x = c$ (a boundary point): - Evaluate the left piece at $x = c$: $\lim_{x \to c^-} f(x)$ - Evaluate the right piece at $x = c$: $\lim_{x \to c^+} f(x)$ - Check which piece includes $c$ to find $f(c)$ - If left limit = right limit = $f(c)$, the function is continuous ## Absolute Value as a Piecewise Function The absolute value function is a common piecewise function: $$|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$ ## Domain and Range - **Domain**: Usually all real numbers, unless specified otherwise - **Range**: Combine the ranges from all pieces (may need to sketch or analyze) ## Graphing Piecewise Functions 1. Graph each piece on its specified interval 2. Use open circles ($\circ$) for excluded endpoints 3. Use closed circles ($\bullet$) for included endpoints 4. Check for continuity at boundary points๐ Practice Problems
1Problem 1easy
โ Question:
Evaluate the piecewise function at , , and .
๐ก Show Solution
Evaluate at each point:
For : Check which condition: โ (first piece)
For : Check which condition: โ (second piece)
For : Check which condition: โ (third piece)
Answers:
2Problem 2medium
โ Question:
Determine whether the piecewise function is continuous at .
๐ก Show Solution
Check continuity at :
Step 1: Find (which piece includes ?) Since includes 1, use second piece:
Step 2: Find left-hand limit as (use first piece):
Step 3: Find right-hand limit as (use second piece):
Step 4: Compare
- Left limit: 4
- Right limit: 2
Since the left limit () right limit (), the overall limit does not exist.
Answer: The function is NOT continuous at because there is a jump discontinuity (the two pieces don't connect).
3Problem 3hard
โ Question:
Find the value of that makes continuous at .
๐ก Show Solution
For continuity at , we need:
Step 1: Find (use second piece since ):
Step 2: Find right-hand limit (use second piece):
Step 3: Find left-hand limit (use first piece with unknown ):
Step 4: Set left limit equal to right limit:
Verify: With :
- Left limit: โ
- Right limit: โ
- โ
Answer: makes the function continuous at .
4Problem 4medium
โ Question:
A function is defined as f(x) = { xยฒ + 1, if x < 0; 2x + 1, if x โฅ 0 }. Evaluate f(-2), f(0), and f(3).
๐ก Show Solution
Step 1: Evaluate f(-2): Is -2 < 0? Yes Use f(x) = xยฒ + 1 f(-2) = (-2)ยฒ + 1 = 4 + 1 = 5
Step 2: Evaluate f(0): Is 0 < 0? No Is 0 โฅ 0? Yes Use f(x) = 2x + 1 f(0) = 2(0) + 1 = 1
Step 3: Evaluate f(3): Is 3 < 0? No Is 3 โฅ 0? Yes Use f(x) = 2x + 1 f(3) = 2(3) + 1 = 7
Answer: f(-2) = 5, f(0) = 1, f(3) = 7
5Problem 5hard
โ Question:
For f(x) = { -x + 2, if x โค 1; xยฒ - 2, if x > 1 }, determine if f is continuous at x = 1.
๐ก Show Solution
Step 1: Find f(1) using the appropriate piece: Since 1 โค 1, use f(x) = -x + 2 f(1) = -1 + 2 = 1
Step 2: Find the left-hand limit as x approaches 1: lim(xโ1โป) f(x) = lim(xโ1โป) (-x + 2) = -1 + 2 = 1
Step 3: Find the right-hand limit as x approaches 1: lim(xโ1โบ) f(x) = lim(xโ1โบ) (xยฒ - 2) = 1ยฒ - 2 = -1
Step 4: Check continuity conditions: For continuity at x = 1: โข lim(xโ1โป) f(x) = 1 โข lim(xโ1โบ) f(x) = -1 โข f(1) = 1
Step 5: Conclusion: Since lim(xโ1โป) f(x) โ lim(xโ1โบ) f(x), the function is NOT continuous at x = 1. There is a jump discontinuity at x = 1.
Answer: Not continuous (jump discontinuity at x = 1)
Practice with Flashcards
Review key concepts with our flashcard system
Browse All Topics
Explore other calculus topics