Modeling Situations with Piecewise Functions | Algebra 1

Master modeling real-world situations with piecewise functions: business, finance, physics, and practical scenarios with detailed solutions.

Solution: Exercises 1 to 3
1 Taxi Fare Model
Exercise 1
A taxi company charges $3 for the initial pickup, $2 per mile for the first 10 miles, and $1.50 per mile for every mile beyond 10 miles. Write a piecewise function C(d) for the cost where d is the distance in miles. Find the cost for a 15-mile trip.
Definition:

Cost modeling: Using mathematical functions to represent pricing structures in real-world scenarios

Tiered pricing: A pricing system with different rates for different usage levels or ranges

Modeling method:
  1. Identify the different pricing tiers and their conditions
  2. Define the variable (d = distance in miles)
  3. Write the cost formula for each tier
  4. Create the piecewise function with appropriate conditions
  5. Evaluate for specific values
Function
C(d) = {3+2d if d≤10, 23+1.5(d-10) if d>10}
Evaluate
C(15)
Result
C(15) = $30.50
Step 1: Identify the pricing structure

Initial charge: $3

First 10 miles: $2 per mile

Beyond 10 miles: $1.50 per mile

Step 2: Define the variable

Let d = distance in miles

Step 3: Write cost formulas for each tier

For d ≤ 10: Cost = $3 + $2 × d = 3 + 2d

For d > 10: Cost = $3 + $2 × 10 + $1.50 × (d - 10) = 3 + 20 + 1.5(d - 10) = 23 + 1.5(d - 10)

Step 4: Create the piecewise function

C(d) = {3 + 2d if d ≤ 10, 23 + 1.5(d - 10) if d > 10}

Step 5: Evaluate for d = 15

Since 15 > 10, use the second expression:

C(15) = 23 + 1.5(15 - 10) = 23 + 1.5(5) = 23 + 7.5 = 30.5

Step 6: Verify the result

Initial: $3, First 10 miles: $20, Next 5 miles: $7.50, Total: $30.50 ✓

C(15) = $30.50
Final answer:

The cost for a 15-mile trip is $30.50.

Applied rules:

• Tiered pricing: Base cost plus incremental cost for excess usage

• Linear function: Rate × (excess distance) for the additional portion

• Real-world modeling: Identify base and incremental costs

Tip: For tiered pricing, the excess portion is calculated as (actual - threshold).
Common mistake: Calculating the incremental cost on the full amount instead of just the excess.
2 Temperature Control System
Exercise 2
A heating system operates differently based on the temperature: it runs at full power (100%) when T < 65°F, at 70% when 65°F ≤ T < 75°F, and turns off (0%) when T ≥ 75°F. Write a piecewise function H(T) for the heating power where T is temperature in degrees Fahrenheit. Find H(60), H(70), and H(80).
Definition:

Control system: A system that responds differently based on input conditions

Step function: A piecewise function with constant values over each interval

Function
H(T) = {100 if T<65, 70 if 65≤T<75, 0 if T≥75}
Evaluate
H(60), H(70), H(80)
Results
H(60)=100%, H(70)=70%, H(80)=0%
Step 1: Identify the operating conditions

T < 65°F: Full power (100%)

65°F ≤ T < 75°F: Medium power (70%)

T ≥ 75°F: Off (0%)

Step 2: Write the piecewise function

H(T) = {100 if T < 65, 70 if 65 ≤ T < 75, 0 if T ≥ 75}

Step 3: Evaluate H(60)

Since 60 < 65, use first expression: H(60) = 100%

Step 4: Evaluate H(70)

Since 65 ≤ 70 < 75, use second expression: H(70) = 70%

Step 5: Evaluate H(80)

Since 80 ≥ 75, use third expression: H(80) = 0%

Step 6: Verify results

H(60) = 100% (cold, full heat) ✓

H(70) = 70% (moderate, medium heat) ✓

H(80) = 0% (warm, no heat) ✓

H(60) = 100%, H(70) = 70%, H(80) = 0%
Final answer:

H(60) = 100%, H(70) = 70%, H(80) = 0%

Applied rules:

• Step function: Constant value over each interval

• Boundary conditions: Pay attention to ≤ vs < for boundary points

• Control logic: Different responses based on input ranges

Tip: Step functions are common in systems with discrete states or modes.
Common mistake: Forgetting to include boundary points in the correct interval.
3 Income Tax Bracket
Exercise 3
A simplified tax system has these brackets: 10% on income up to $10,000, 15% on income from $10,001 to $40,000, and 20% on income above $40,000. Write a piecewise function T(I) for the tax amount where I is the income. Find the tax for incomes of $8,000, $25,000, and $50,000.
Definition:

Tax bracket system: A progressive taxation system with different rates for different income ranges

Cumulative taxation: Tax applied only to the portion of income in each bracket

Function
T(I) = {0.1I if I≤10000, 1000+0.15(I-10000) if 10000<I≤40000, 5500+0.2(I-40000) if I>40000}
Evaluate
T(8000), T(25000), T(50000)
Results
T(8000)=$800, T(25000)=$3250, T(50000)=$7500
Step 1: Identify the tax brackets

Income ≤ $10,000: 10% on all income

$10,001 ≤ Income ≤ $40,000: $1,000 + 15% on excess over $10,000

Income > $40,000: $5,500 + 20% on excess over $40,000

Step 2: Calculate cumulative taxes

Bracket 1: Up to $10,000 at 10% = $1,000

Bracket 2: $10,000 to $40,000 at 15% = $4,500

Bracket 3: Above $40,000 at 20%

Step 3: Write the piecewise function

T(I) = {0.1I if I ≤ 10,000, 1,000 + 0.15(I - 10,000) if 10,000 < I ≤ 40,000, 5,500 + 0.2(I - 40,000) if I > 40,000}

Step 4: Evaluate T(8,000)

Since 8,000 ≤ 10,000: T(8,000) = 0.1 × 8,000 = $800

Step 5: Evaluate T(25,000)

Since 10,000 < 25,000 ≤ 40,000: T(25,000) = 1,000 + 0.15(25,000 - 10,000) = 1,000 + 0.15(15,000) = $3,250

Step 6: Evaluate T(50,000)

Since 50,000 > 40,000: T(50,000) = 5,500 + 0.2(50,000 - 40,000) = 5,500 + 0.2(10,000) = $7,500

Step 7: Verify results

T(8,000) = $800 ✓

T(25,000) = $1,000 + $2,250 = $3,250 ✓

T(50,000) = $5,500 + $2,000 = $7,500 ✓

T(8,000) = $800, T(25,000) = $3,250, T(50,000) = $7,500
Final answer:

T(8,000) = $800, T(25,000) = $3,250, T(50,000) = $7,500

Applied rules:

• Cumulative taxation: Tax only applies to income within each bracket

• Progressive system: Higher rates apply to higher income brackets

• Bracket calculation: Base tax + rate × (excess over bracket threshold)

Tip: For tax brackets, calculate tax on each portion separately and add them together.
Common mistake: Applying the highest rate to the entire income instead of just the excess.
Modeling with Piecewise Functions
\(f(x) = \begin{cases} \text{expression}_1 & \text{if } \text{condition}_1 \\ \text{expression}_2 & \text{if } \text{condition}_2 \\ \vdots & \vdots \\ \text{expression}_n & \text{if } \text{condition}_n \end{cases}\)
General Form
Tax Brackets
\( T(I) = \text{base} + \text{rate} \times (I - \text{threshold}) \)
Cumulative calculation
Step Function
\( f(x) = c_i \text{ for } x \in [a_i, b_i) \)
Constant values per interval
Piecewise Linear
\( f(x) = mx + b \text{ per interval} \)
Linear functions per interval
Key definitions:

Piecewise function modeling: Using mathematical functions to represent real-world scenarios with different behaviors in different ranges

Tiered pricing: A pricing structure with different rates for different usage levels or categories

Step function: A piecewise function with constant values over each interval

Threshold effect: A sudden change in behavior when crossing a specific boundary

Cumulative calculation: Adding previous amounts to calculate totals in progressive systems

Boundary conditions: Conditions that determine which interval a value belongs to

Complete modeling procedure:
  1. Scenario analysis: Understand what quantities vary and what remains constant
  2. Variable identification: Define input and output variables clearly
  3. Threshold detection: Identify points where behavior changes
  4. Expression development: Create formulas for each interval
  5. Condition specification: Define precise ranges for each expression
  6. Continuity verification: Ensure the function is well-defined
  7. Validation testing: Verify with known examples
Tip 1: Always consider the domain restrictions in real-world contexts (e.g., non-negative values).
Tip 2: Pay attention to boundary points to avoid gaps or overlaps in piecewise functions.
Tip 3: For cumulative systems, calculate the base amount for each bracket.
Tip 4: Draw sketches to visualize the function's behavior before writing equations.
Common errors: Misinterpreting boundary conditions, incorrect interval notation, forgetting domain restrictions, algebraic mistakes in piecewise evaluation, misunderstanding cumulative calculations.
Success strategies: Practice with diverse real-world scenarios, understand the context before modeling, verify results with common sense checks, pay attention to units and dimensions.
Essential modeling rules:

• Define the domain based on real-world constraints and context

• Ensure intervals are mutually exclusive and collectively exhaustive

• Pay attention to boundary conditions (≤ vs <) for continuity

• For tiered systems: base + rate × (excess beyond threshold)

• For cumulative systems: previous amounts + current bracket calculation

• Verify that the mathematical model makes practical sense

Solution: Exercises 4 to 5
4 Water Utility Rates
Exercise 4
A water utility charges $10 for the first 1,000 gallons, $0.05 per gallon for usage from 1,001 to 5,000 gallons, and $0.08 per gallon for usage above 5,000 gallons. Write a piecewise function W(g) for the cost where g is gallons used. Find the cost for 3,000 and 7,000 gallons.
Definition:

Utility rate structure: A pricing model with increasing rates for higher consumption levels

Progressive pricing: Higher rates applied to higher usage tiers

Function
W(g) = {10 if g≤1000, 10+0.05(g-1000) if 1000<g≤5000, 210+0.08(g-5000) if g>5000}
Evaluate
W(3000), W(7000)
Results
W(3000)=$100, W(7000)=$370
Step 1: Identify the rate structure

First 1,000 gallons: $10 (flat rate)

1,001 to 5,000 gallons: $0.05 per gallon for the excess

Above 5,000 gallons: $0.08 per gallon for the excess

Step 2: Calculate base amounts for each tier

First tier: $10

Second tier (up to 5,000): $10 + $0.05 × 4,000 = $210

Step 3: Write the piecewise function

W(g) = {10 if g ≤ 1,000, 10 + 0.05(g - 1,000) if 1,000 < g ≤ 5,000, 210 + 0.08(g - 5,000) if g > 5,000}

Step 4: Evaluate W(3,000)

Since 1,000 < 3,000 ≤ 5,000: W(3,000) = 10 + 0.05(3,000 - 1,000) = 10 + 0.05(2,000) = $100

Step 5: Evaluate W(7,000)

Since 7,000 > 5,000: W(7,000) = 210 + 0.08(7,000 - 5,000) = 210 + 0.08(2,000) = $370

Step 6: Verify results

W(3,000): $10 + $0.05 × 2,000 = $100 ✓

W(7,000): $210 + $0.08 × 2,000 = $370 ✓

W(3,000) = $100, W(7,000) = $370
Final answer:

W(3,000) = $100, W(7,000) = $370

Applied rules:

• Progressive pricing: Higher rates for higher consumption levels

• Cumulative calculation: Previous tier amounts + current tier calculation

• Excess calculation: Amount beyond the threshold for each tier

Tip: Calculate the total cost at each threshold to establish the base for the next tier.
Common mistake: Applying the highest rate to the entire usage instead of just the excess.
5 Fitness Center Membership
Exercise 5
A fitness center offers three membership tiers: Basic ($25/month) for 0-2 visits per week, Standard ($45/month) for 3-6 visits per week, and Premium ($75/month) for 7+ visits per week. Write a piecewise function M(v) for the monthly cost where v is weekly visits. If someone visits 5 times per week for 4 weeks, what is their monthly cost? What if they visit 8 times per week?
Definition:

Membership tier system: A pricing structure with different rates based on usage frequency

Fixed-rate pricing: A constant rate within each usage category

Function
M(v) = {25 if 0≤v≤2, 45 if 3≤v≤6, 75 if v≥7}
Evaluate
M(5), M(8)
Results
M(5)=$45, M(8)=$75
Step 1: Identify the membership tiers

0-2 visits/week: Basic membership at $25

3-6 visits/week: Standard membership at $45

7+ visits/week: Premium membership at $75

Step 2: Write the piecewise function

M(v) = {25 if 0 ≤ v ≤ 2, 45 if 3 ≤ v ≤ 6, 75 if v ≥ 7}

Step 3: Evaluate M(5)

Since 3 ≤ 5 ≤ 6, use the Standard tier: M(5) = $45

Step 4: Evaluate M(8)

Since 8 ≥ 7, use the Premium tier: M(8) = $75

Step 5: Interpret the results

Monthly cost for 5 visits/week: $45

Monthly cost for 8 visits/week: $75

Step 6: Verify results

5 visits/week falls in Standard tier (3-6) → $45 ✓

8 visits/week falls in Premium tier (7+) → $75 ✓

M(5) = $45, M(8) = $75
Final answer:

The monthly cost for 5 visits per week is $45, and for 8 visits per week is $75.

Applied rules:

• Fixed-rate tiers: Constant price within each usage category

• Step function: Different constant values for different intervals

• Frequency-based pricing: Cost determined by usage frequency

Tip: Fixed-rate piecewise functions (step functions) are common for membership or service tiers.
Common mistake: Confusing the input variable (frequency) with the output (cost).
Comprehensive Summary: Modeling with Piecewise Functions
\(f(x) = \begin{cases} \text{expression}_1 & \text{if } x \in \text{interval}_1 \\ \text{expression}_2 & \text{if } x \in \text{interval}_2 \\ \vdots & \vdots \\ \text{expression}_n & \text{if } x \in \text{interval}_n \end{cases}\)
General Form
Key definitions:

Piecewise function modeling: Using mathematical functions to represent real-world scenarios with different behaviors in different ranges

Tiered pricing: A pricing structure with different rates for different usage levels or categories

Step function: A piecewise function with constant values over each interval

Threshold effect: A sudden change in behavior when crossing a specific boundary

Cumulative calculation: Adding previous amounts to calculate totals in progressive systems

Boundary conditions: Conditions that determine which interval a value belongs to

Progressive system: Systems where higher rates apply to higher input values

Complete modeling methodology:
  1. Scenario analysis: Understand the real-world situation and identify key variables
  2. Variable definition: Assign appropriate variables to inputs and outputs
  3. Threshold identification: Determine where the behavior changes significantly
  4. Expression formulation: Develop formulas for each distinct behavior
  5. Condition specification: Define precise ranges for each expression
  6. Continuity verification: Ensure the function covers all inputs without gaps
  7. Validation testing: Verify the model with known examples
Tip 1: Always consider real-world constraints when defining the domain (e.g., non-negative values for physical quantities).
Tip 2: Pay careful attention to boundary points to avoid gaps or overlaps in piecewise functions.
Tip 3: For cumulative systems, calculate the total at each threshold to establish the base for the next tier.
Tip 4: Draw diagrams or graphs to visualize the function's behavior before solving.
Common errors: Misinterpreting boundary conditions, incorrect interval notation, forgetting domain restrictions, algebraic mistakes in piecewise evaluation, misunderstanding cumulative calculations, applying rates to entire amounts instead of excess portions.
Success strategies: Practice with diverse real-world scenarios, understand the context before modeling, verify results with common sense checks, pay attention to units and dimensions, calculate base amounts for each tier in progressive systems.
Essential modeling rules:

• Define domain based on real-world constraints and context

• Ensure intervals are mutually exclusive and collectively exhaustive

• Pay attention to boundary conditions (≤ vs <) for continuity

• For tiered systems: base + rate × (excess beyond threshold)

• For cumulative systems: previous amounts + current bracket calculation

• Verify that the mathematical model makes practical sense

• Calculate total amounts at thresholds for progressive systems

\(f(x) = \text{base} + \text{rate} \times (x - \text{threshold})\)
Tiered Pricing Formula
Memory aids: Think of piecewise functions as "different rules for different zones" and remember that in tiered systems, only the excess amount is charged at the higher rate.
Real-world applications: Tax brackets, shipping costs, phone plans, utility rates, insurance premiums, membership fees, performance bonuses, error penalties, commission structures.

Questions & Answers

Question: How do I know when to model a situation with a piecewise function versus a regular function?

Answer: Use a piecewise function when the relationship between variables changes at specific thresholds or intervals. Ask yourself:

  • Are there different rates/rules for different input ranges? (Yes → piecewise)
  • Does the behavior change abruptly at certain values? (Yes → piecewise)
  • Is there a single formula that works for all inputs? (No → piecewise)

Examples where piecewise functions are needed:

  • Shipping costs: different rates for different weight ranges
  • Tax brackets: different rates for different income levels
  • Phone plans: base cost plus additional charges for extra usage
  • Membership fees: different rates based on usage frequency

Regular functions are used when the relationship is consistent across all inputs.

Question: When modeling tax brackets or utility rates, why don't we apply the highest rate to the entire amount?

Answer: Progressive tax systems and utility rates are designed to be cumulative, not marginal for the entire amount. Here's why:

  • Only excess is taxed at higher rate: Each bracket applies only to the portion of income/utility usage within that range
  • Fairness principle: Lower portions of income/utilization are taxed at lower rates
  • Mathematical structure: This creates a continuous, increasing function

Example with 10% on first $10,000 and 15% on income above $10,000:

  • For $15,000 income: Tax = $1,000 (10% of first $10,000) + $750 (15% of next $5,000) = $1,750
  • Not: $15,000 × 15% = $2,250 (incorrect)

This ensures that moving to a higher bracket doesn't penalize you for your entire income.

Question: How do I handle problems where I need to find the input that gives a specific output in a piecewise function?

Answer: To find the input that gives a specific output in a piecewise function:

  1. Start with the first piece and solve for the input
  2. Check if the solution falls within the piece's domain
  3. If yes, that's your answer; if no, move to the next piece
  4. Repeat until you find a valid solution

Example: If f(x) = {2x if x ≤ 3, x + 3 if x > 3} and f(x) = 5:

  • First piece: 2x = 5 → x = 2.5, and 2.5 ≤ 3 ✓ (valid solution)
  • Second piece: x + 3 = 5 → x = 2, but 2 > 3 ✗ (invalid)

Always check that your solution satisfies the domain condition for that piece.