When to Use Piecewise Functions
A piecewise function is useful when one situation cannot be described well by one formula. The domain is split into intervals, and each interval uses its own rule.
For example, electricity cost can be cheaper for the first usage tier and more expensive after a certain boundary. A boundary like this is a sign that the model should be written in pieces.
Mathematical Definition
A piecewise function can be written in the form:
where are intervals that form a partition of the function's domain.
When reading or building a piecewise function, pay attention to three things:
- The formula on each row.
- The interval condition that decides when that formula is used.
- The function value at connection points, especially when an interval boundary uses , , , or .
Common Piece Shapes
Linear Pieces
A linear piecewise function uses a linear function on each interval. This form often appears when the rate of change is constant for a while, then changes after a certain point.
The function above can be written as:
The three rows are not three separate functions. They work together as one function, and the chosen formula depends on the value of .
Quadratic Pieces
Piecewise functions can also use quadratic pieces. This is helpful when one part of the model curves instead of following a straight line.
Connection Points and Continuity
Connections Without Jumps
A piecewise function is continuous if the graph does not jump at a connection point. The value from the left, the value from the right, and the function value at that point must match.
Condition for continuity at point :
Example of a continuous piecewise function:
For continuity at :
Connections With Jumps
Discontinuous piecewise functions have "jumps" or "holes" at certain points.
Modeling with Piecewise Functions
Progressive Rates
Many real-world situations can be modeled with piecewise functions because their rules change after certain boundaries. Progressive taxes, tiered parking fees, and tiered electricity rates are common examples.
Example: Electricity Rates
An electricity company applies tiered rates:
- :
- :
- :
The mathematical model:
The number in the second row comes from the first . The number in the third row comes from the cost up to the first . This keeps the cost from restarting at when the usage enters a new interval.
Electricity cost table:
| Usage (kWh) | |||||
|---|---|---|---|---|---|
| Cost (Rp) |
Staged Speed
Example: Multi-Modal Journey
Someone takes a journey with:
- Walking: for
- Cycling: for
- Driving: for
Distance function with respect to time:
The constants and keep the total distance moving forward from the last position, instead of returning to when the transportation mode changes.
Determining Piecewise Function Equations
To determine piecewise function equations from graphs or situations:
- Split the domain at every boundary where the rule changes.
- Determine the formula for each interval.
- Check the connection points so the interval signs and function values do not conflict.
- Write all pieces in piecewise notation.
Example:
From a graph showing:
- Line with slope from to
- Horizontal line from to
- Line with slope from to
The solution can be summarized like this:
| Interval | Graph information | Equation |
|---|---|---|
| Passes through with slope | ||
| Horizontal line | ||
| Passes through with slope |
Piecewise function:
Practice Problems
-
Determine the values of , , and for the function:
-
An online taxi company applies the following rates:
The base fare is for the first . Km costs . Above , the additional rate becomes .
Create a piecewise function model for the total cost!
-
Determine whether the following function is continuous at :
-
Sketch the graph of the function:
-
A worker is paid with the following system:
The first are paid at . Overtime from the th hour onward is paid at .
If the maximum work is , create a daily wage function!
Answer Key
-
Calculating function values:
For : since , use
For : since , use
For : since , use
-
Taxi fare model:
Let be the distance in km, then:
Or simplified:
-
Checking continuity:
At :
Since , the function is continuous at .
-
Sketch of graph :
Graph of FunctionPiecewise function with three parts: decreasing linear, quadratic, and constant -
Daily wage function:
Let be the working hours, then:
Or simplified: