VNHS Mathematics General Mathematics
Piecewise Functions
Prepared by: Jeramil M. Redoble
Learning Competency
Illustrate a piecewise function in practical contexts (i.e., fare rates, purchasing, and income
tax).
1 Introduction to Piecewise Functions
A piecewise function is a function defined by multiple sub-functions, each applying to a
certain interval of the main function’s domain. The general form is:
f1 (x) if x ∈ D1
f2 (x) if x ∈ D2
f (x) = .
..
f (x) if x ∈ D
n n
2 Practical Applications
2.1 1. Fare Rates
Public transportation often uses piecewise functions for fare computation.
A jeepney fare is charged as follows:
• First 4 km: $0.50
• Each additional km: $0.15
The piecewise function is:
(
0.50 if 0 < d ≤ 4
F (d) =
0.50 + 0.15(d − 4) if d > 4
Distance (km) Fare ($)
2 0.50
4 0.50
5 0.65
8 1.10
12 1.70
1
VNHS Mathematics General Mathematics
1.5
Fare ($)
1
0.5
0
0 2 4 6 8 10 12 14
Distance (km)
2.2 2. Purchasing (Bulk Discounts)
Stores often offer discounts for purchasing larger quantities.
A store sells notebooks with the following pricing:
• 1-10 notebooks: $15 each
• 11-20 notebooks: $12 each
• More than 20 notebooks: $10 each
The cost function is:
15n if 1 ≤ n ≤ 10
C(n) = 12n if 11 ≤ n ≤ 20
10n if n > 20
Number of Notebooks Total Cost ($)
5 75
10 150
15 180
25 250
30 300
2
VNHS Mathematics General Mathematics
400
300
Total Cost ($)
200
100
0
0 5 10 15 20 25 30 35
Number of Notebooks
2.3 3. Income Tax
Progressive tax systems use piecewise functions.
A simplified tax system:
• Income up to $20,000: 10% tax
• Income from $20,001 to $50,000: 15% tax on amount over $20,000 + $2,000
• Income over $50,000: 25% tax on amount over $50,000 + $6,500
The tax function is:
0.10I
if 0 < I ≤ 20, 000
T (I) = 2, 000 + 0.15(I − 20, 000) if 20, 000 < I ≤ 50, 000
6, 500 + 0.25(I − 50, 000) if I > 50, 000
Income ($) Tax ($)
15,000 1,500
20,000 2,000
35,000 4,250
60,000 9,000
80,000 14,000
3
VNHS Mathematics General Mathematics
20,000
15,000
Tax ($)
10,000
5,000
0
0 20,000 40,000 60,000 80,000 1 · 105
Income ($)
3 Exercise Problems
1. Water Bill Problem
A water utility company charges customers as follows:
• First 20 cubic meters: $150 flat rate
• Next 10 cubic meters: $12 per cubic meter
• Above 30 cubic meters: $15 per cubic meter
(a) Write the piecewise function for the water bill.
(b) Create a table of values for consumption: 15, 25, 35, and 45 cubic meters.
(c) Graph the function.
2. Parking Fee Problem
A parking lot charges:
• First 3 hours: $30
• Each additional hour or fraction thereof: $10
• Maximum daily charge: $100
(a) Write the piecewise function for parking fees.
(b) Calculate the fee for 2, 5, 8, and 12 hours.
(c) Graph the function.
4
VNHS Mathematics General Mathematics
3. Cellphone Plan Problem
A cellphone plan includes:
• First 500 minutes: $299 monthly
• Additional minutes: $0.50 per minute
• Plus a fixed service fee of $50
(a) Write the piecewise function for the total monthly bill.
(b) Create a table for 400, 600, and 800 minutes used.
(c) Graph the function.
4. Shipping Cost Problem
A courier service charges for package delivery:
• Packages up to 2 kg: $100
• Packages 2.1 kg to 5 kg: $150
• Packages 5.1 kg to 10 kg: $200
• Packages over 10 kg: $200 + $20 per kg over 10 kg
(a) Write the piecewise function for shipping costs.
(b) Calculate costs for packages weighing: 1.5 kg, 3 kg, 7 kg, and 15 kg.
(c) Graph the function.
Answer Key
1. Water Bill Problem
150
if 0 < c ≤ 20
W (c) = 150 + 12(c − 20) if 20 < c ≤ 30
150 + 120 + 15(c − 30) if c > 30
2. Parking Fee Problem
30
if 0 < h ≤ 3
P (h) = 30 + 10⌈h − 3⌉ if 3 < h ≤ 10
100 if h > 10
3. Cellphone Plan Problem
(
349 if 0 < m ≤ 500
B(m) =
349 + 0.50(m − 500) if m > 500
5
VNHS Mathematics General Mathematics
4. Shipping Cost Problem
100 if 0<w≤2
150 if 2<w≤5
S(w) =
200 if 5 < w ≤ 10
200 + 20(w − 10)
if w > 10