Basic Math

Piecewise-defined functions | Ninth Grade

Piecewise-Defined Functions - Ninth Grade Math

Introduction to Piecewise-Defined Functions

Piecewise-Defined Function: A function that has different rules (formulas) for different parts of its domain
Also Called: Piecewise function, split function, or function defined by cases
Key Characteristic: Different expressions apply depending on the input value
General Notation for Piecewise Functions:
$$f(x) = \begin{cases} \text{expression}_1 & \text{if condition}_1 \\ \text{expression}_2 & \text{if condition}_2 \\ \text{expression}_3 & \text{if condition}_3 \\ \vdots & \vdots \end{cases}$$

Each "piece" has:
• An expression (formula)
• A condition (domain restriction)
Why Use Piecewise Functions?
• Model real-world situations with different rules for different conditions
• Describe functions that behave differently in different intervals
• Examples: Tax brackets, shipping costs, parking fees, cell phone plans

Real-World Example:
Taxi fare: $5 base fee + $2 per mile up to 10 miles, then $1.50 per mile after
Simple Example: Temperature-based discount

$$f(x) = \begin{cases} 10 & \text{if } x \leq 2 \\ 5x & \text{if } x > 2 \end{cases}$$

Interpretation:
• When $x \leq 2$: The function always equals 10
• When $x > 2$: The function equals $5x$
• At $x = 2$: We use the first rule, so $f(2) = 10$

1. Evaluate Piecewise-Defined Functions

Evaluating a Piecewise Function: Finding the output value for a given input by determining which piece (rule) to use
Steps to Evaluate a Piecewise Function at $x = a$:
Step 1: Look at the given input value $x = a$
Step 2: Check each condition to determine which piece applies
Step 3: Select the correct expression based on the condition that's satisfied
Step 4: Substitute $x = a$ into that expression
Step 5: Simplify to find $f(a)$
Key Points:
• Only ONE piece applies for any given input value
• Pay close attention to $<$, $>$, $\leq$, $\geq$ symbols
• $\leq$ or $\geq$ means the boundary value IS included
• $<$ or $>$ means the boundary value is NOT included
• Always check which interval contains your input value

Basic Examples

Example 1: Evaluate the function at $x = -2$, $x = 3$, and $x = 5$
$$f(x) = \begin{cases} x + 4 & \text{if } x < 3 \\ 2x - 1 & \text{if } x \geq 3 \end{cases}$$

Find $f(-2)$:
• Check: Is $-2 < 3$? Yes! ✓
• Use first piece: $f(x) = x + 4$
• $f(-2) = -2 + 4 = 2$
Answer: $f(-2) = 2$

Find $f(3)$:
• Check: Is $3 < 3$? No
• Check: Is $3 \geq 3$? Yes! ✓
• Use second piece: $f(x) = 2x - 1$
• $f(3) = 2(3) - 1 = 6 - 1 = 5$
Answer: $f(3) = 5$

Find $f(5)$:
• Check: Is $5 \geq 3$? Yes! ✓
• Use second piece: $f(x) = 2x - 1$
• $f(5) = 2(5) - 1 = 10 - 1 = 9$
Answer: $f(5) = 9$
Example 2: Evaluate at $x = -5$, $x = 0$, and $x = 4$
$$g(x) = \begin{cases} x^2 & \text{if } x \leq 0 \\ 3x + 1 & \text{if } 0 < x < 5 \\ 20 & \text{if } x \geq 5 \end{cases}$$

Find $g(-5)$:
• Is $-5 \leq 0$? Yes! ✓
• Use: $g(x) = x^2$
• $g(-5) = (-5)^2 = 25$
Answer: $g(-5) = 25$

Find $g(0)$:
• Is $0 \leq 0$? Yes! ✓ (First condition applies)
• Use: $g(x) = x^2$
• $g(0) = 0^2 = 0$
Answer: $g(0) = 0$

Find $g(4)$:
• Is $4 \leq 0$? No
• Is $0 < 4 < 5$? Yes! ✓
• Use: $g(x) = 3x + 1$
• $g(4) = 3(4) + 1 = 13$
Answer: $g(4) = 13$
Example 3: Three-piece function
$$h(x) = \begin{cases} -x + 2 & \text{if } x < -1 \\ x^2 & \text{if } -1 \leq x \leq 2 \\ 2x + 3 & \text{if } x > 2 \end{cases}$$

Evaluate $h(-3)$, $h(-1)$, $h(2)$, $h(4)$:

$h(-3)$: $-3 < -1$ ✓ → Use first piece
$h(-3) = -(-3) + 2 = 3 + 2 = 5$

$h(-1)$: $-1 \leq -1 \leq 2$ ✓ → Use second piece
$h(-1) = (-1)^2 = 1$

$h(2)$: $-1 \leq 2 \leq 2$ ✓ → Use second piece
$h(2) = (2)^2 = 4$

$h(4)$: $4 > 2$ ✓ → Use third piece
$h(4) = 2(4) + 3 = 11$

Special Functions as Piecewise

Example 4: Absolute Value Function
The absolute value function can be written as piecewise:
$$f(x) = |x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$

Evaluate:
• $f(5) = 5$ (since $5 \geq 0$, use $f(x) = x$)
• $f(-3) = -(-3) = 3$ (since $-3 < 0$, use $f(x) = -x$)
• $f(0) = 0$ (since $0 \geq 0$, use $f(x) = x$)

Word Problem Applications

Example 5: Cell Phone Plan
A cell phone company charges based on data usage:
$$C(g) = \begin{cases} 25 & \text{if } 0 \leq g \leq 2 \\ 25 + 10(g - 2) & \text{if } g > 2 \end{cases}$$
where $C$ is cost in dollars and $g$ is gigabytes used.

Find the cost for 1.5 GB and 5 GB:

$C(1.5)$:
• Is $0 \leq 1.5 \leq 2$? Yes! ✓
• $C(1.5) = 25$
Cost: $25

$C(5)$:
• Is $5 > 2$? Yes! ✓
• $C(5) = 25 + 10(5 - 2) = 25 + 10(3) = 25 + 30 = 55$
Cost: $55
Common Mistakes to Avoid:
• Using the wrong piece (check conditions carefully!)
• Confusing $\leq$ with $<$ (boundary inclusion matters)
• Forgetting to simplify after substitution
• Not checking which condition is satisfied
• Assuming continuity at boundaries (not always true)

2. Graph Piecewise-Defined Functions

Graphing Piecewise Functions: Creating a visual representation by plotting each piece on its specified domain
Open Circle (○): Point NOT included in the graph (use with $<$ or $>$)
Closed Circle (●): Point IS included in the graph (use with $\leq$ or $\geq$)
Steps to Graph a Piecewise Function:
Step 1: Identify all pieces and their domain restrictions
Step 2: For each piece:
    a) Graph the function WITHOUT restrictions (lightly)
    b) Identify the domain interval for this piece
    c) ERASE or darken only the part within the domain
Step 3: Mark endpoints with open or closed circles
    • Closed (●) for $\leq$ or $\geq$
    • Open (○) for $<$ or $>$
Step 4: Check for continuity at boundary points
Step 5: Label important points
Important Graphing Notes:
• Each piece is graphed ONLY on its specified domain
• Pieces may or may not connect at boundaries
• A function is continuous if all pieces connect without jumps
• A function is discontinuous if there are breaks or jumps
• At boundary points, only ONE piece can have a closed circle

Graphing Linear Pieces

Example 1: Graph the function
$$f(x) = \begin{cases} x + 2 & \text{if } x < 1 \\ -2x + 5 & \text{if } x \geq 1 \end{cases}$$

Step-by-Step:

Piece 1: $f(x) = x + 2$ for $x < 1$
• This is a line with slope 1, y-intercept 2
• Domain: $x < 1$ (all values less than 1)
• At boundary $x = 1$: $f(1) = 1 + 2 = 3$ (but NOT included)
• Plot: Line from left, ending at $(1, 3)$ with OPEN circle

Piece 2: $f(x) = -2x + 5$ for $x \geq 1$
• This is a line with slope -2, y-intercept 5
• Domain: $x \geq 1$ (1 and all values greater)
• At boundary $x = 1$: $f(1) = -2(1) + 5 = 3$ (IS included)
• Plot: Line from $(1, 3)$ with CLOSED circle, extending right

Key Points:
• At $x = 1$: Open circle from piece 1, closed circle from piece 2
• Both pieces meet at point $(1, 3)$ → Function IS continuous
• Graph has no jumps or breaks
Example 2: Graph with discontinuity
$$g(x) = \begin{cases} 2x - 1 & \text{if } x \leq 2 \\ x + 3 & \text{if } x > 2 \end{cases}$$

Piece 1: $g(x) = 2x - 1$ for $x \leq 2$
• At $x = 2$: $g(2) = 2(2) - 1 = 3$ with CLOSED circle at $(2, 3)$
• Plot line ending at $(2, 3)$ ●

Piece 2: $g(x) = x + 3$ for $x > 2$
• At $x = 2$: $g(2)$ would be $2 + 3 = 5$ but NOT included
• Start with OPEN circle at $(2, 5)$ ○

Analysis:
• At $x = 2$: Closed circle at $(2, 3)$, open circle at $(2, 5)$
• There IS a jump/discontinuity at $x = 2$
• Function value at $x = 2$ is 3 (from first piece)

Graphing with Constant Pieces

Example 3: Graph with horizontal segments
$$h(x) = \begin{cases} 3 & \text{if } x < -1 \\ 1 & \text{if } -1 \leq x < 2 \\ -2 & \text{if } x \geq 2 \end{cases}$$

Piece 1: $h(x) = 3$ for $x < -1$
• Horizontal line at $y = 3$
• Extends left from $x = -1$ (open circle at $(-1, 3)$)

Piece 2: $h(x) = 1$ for $-1 \leq x < 2$
• Horizontal line segment at $y = 1$
• From $x = -1$ (closed ●) to $x = 2$ (open ○)
• Points: $(-1, 1)$ ● to $(2, 1)$ ○

Piece 3: $h(x) = -2$ for $x \geq 2$
• Horizontal line at $y = -2$
• Starts at $x = 2$ (closed circle at $(2, -2)$), extends right

Result: Step function with jumps at $x = -1$ and $x = 2$

Graphing Non-Linear Pieces

Example 4: Graph with quadratic piece
$$f(x) = \begin{cases} x^2 & \text{if } x \leq 1 \\ 2x - 1 & \text{if } x > 1 \end{cases}$$

Piece 1: $f(x) = x^2$ for $x \leq 1$
• Parabola opening upward
• Domain: all x up to and including 1
• Create table of values:
x-2-101
y4101
• Plot these points and connect with smooth curve
• Closed circle at $(1, 1)$ ●

Piece 2: $f(x) = 2x - 1$ for $x > 1$
• Linear function with slope 2
• At $x = 1$: would be $2(1) - 1 = 1$ (not included)
• Open circle at $(1, 1)$ ○
• Draw line extending from $(1, 1)$ to the right

Note: Both pieces approach $(1, 1)$, so function IS continuous

Absolute Value as Piecewise

Example 5: Graph $f(x) = |x|$ as piecewise
$$f(x) = \begin{cases} -x & \text{if } x < 0 \\ x & \text{if } x \geq 0 \end{cases}$$

Piece 1: $f(x) = -x$ for $x < 0$
• Line with slope -1 (negative x values)
• Points: $(-3, 3)$, $(-2, 2)$, $(-1, 1)$
• Open circle at $(0, 0)$ approaching from left

Piece 2: $f(x) = x$ for $x \geq 0$
• Line with slope 1 (positive x values)
• Closed circle at $(0, 0)$ ●
• Points: $(0, 0)$, $(1, 1)$, $(2, 2)$, $(3, 3)$

Result: Classic V-shaped graph, continuous at $x = 0$

Checking Continuity

A piecewise function is CONTINUOUS at $x = a$ if:
1. Both pieces approach the same y-value at $x = a$
2. $f(a)$ is defined (has a value)
3. The limit from left = limit from right = $f(a)$

Simple Check:
• Evaluate the point from both pieces
• If values match AND point is included → continuous
• If values don't match OR neither included → discontinuous
Example 6: Check continuity
$$f(x) = \begin{cases} x + 1 & \text{if } x < 2 \\ 2x - 1 & \text{if } x \geq 2 \end{cases}$$

At $x = 2$:
• From left (using first piece): $\lim_{x \to 2^-} (x + 1) = 2 + 1 = 3$
• From right (using second piece): $f(2) = 2(2) - 1 = 3$
• Both equal 3, and $f(2) = 3$ is defined
Function IS continuous at $x = 2$

Real-World Applications of Piecewise Functions

Example 1: Parking Garage Fees
A parking garage charges:
• $5 for up to 2 hours
• $5 plus $3 per hour after 2 hours

$$C(h) = \begin{cases} 5 & \text{if } 0 < h \leq 2 \\ 5 + 3(h - 2) & \text{if } h > 2 \end{cases}$$

Find cost for 1.5, 2, and 5 hours:
• $C(1.5) = 5$ dollars
• $C(2) = 5$ dollars
• $C(5) = 5 + 3(5-2) = 5 + 9 = 14$ dollars
Example 2: Tax Brackets (Simplified)
Income tax rate:
• 10% on income up to $10,000
• 15% on income over $10,000

$$T(x) = \begin{cases} 0.10x & \text{if } 0 \leq x \leq 10000 \\ 1000 + 0.15(x - 10000) & \text{if } x > 10000 \end{cases}$$

where $x$ is income and $T(x)$ is tax owed
Example 3: Shipping Costs
$$S(w) = \begin{cases} 5 & \text{if } 0 < w \leq 1 \\ 8 & \text{if } 1 < w \leq 5 \\ 8 + 2(w - 5) & \text{if } w > 5 \end{cases}$$

where $w$ is weight in pounds, $S(w)$ is shipping cost in dollars

Quick Reference Guide

Piecewise Function Notation:
$$f(x) = \begin{cases} \text{formula}_1 & \text{if condition}_1 \\ \text{formula}_2 & \text{if condition}_2 \\ \text{formula}_3 & \text{if condition}_3 \end{cases}$$
Evaluation Process:
1. Identify which condition is satisfied
2. Use the corresponding formula
3. Substitute and simplify
Graphing Symbols:
Closed circle (●): Point IS included ($\leq$ or $\geq$)
Open circle (○): Point is NOT included ($<$ or $>$)
• Only one circle can be closed at any boundary point
Condition TypeSymbolBoundary PointGraph Marking
Less than$x < a$NOT includedOpen circle (○) at $x = a$
Less than or equal$x \leq a$IS includedClosed circle (●) at $x = a$
Greater than$x > a$NOT includedOpen circle (○) at $x = a$
Greater than or equal$x \geq a$IS includedClosed circle (●) at $x = a$
Continuity Check:
At boundary point $x = a$:
• Evaluate left piece approaching $a$
• Evaluate right piece approaching $a$
• If values match AND point included → Continuous
• If values differ → Discontinuous (jump)

Common Examples of Piecewise Functions

Famous Piecewise Functions:

1. Absolute Value: $f(x) = |x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$

2. Greatest Integer (Floor): $f(x) = \lfloor x \rfloor$ = largest integer $\leq x$

3. Sign Function: $\text{sgn}(x) = \begin{cases} 1 & \text{if } x > 0 \\ 0 & \text{if } x = 0 \\ -1 & \text{if } x < 0 \end{cases}$

4. Unit Step Function: $H(x) = \begin{cases} 0 & \text{if } x < 0 \\ 1 & \text{if } x \geq 0 \end{cases}$
Success Tips for Piecewise Functions:
✓ Always check which condition applies before evaluating
✓ Pay attention to $<$, $>$, $\leq$, $\geq$ symbols
✓ Use closed circles for $\leq$ or $\geq$, open for $<$ or $>$
✓ Graph each piece only on its specified domain
✓ Check continuity at boundary points
✓ Make a table of values for curved pieces
✓ Label all important points and circles clearly
✓ Verify your graph matches the function definition
✓ For word problems, identify the different "cases" or conditions
✓ Practice with real-world examples to understand applications
Shares: