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.
Definition of a Piecewise Function
A piecewise function can be written in the form:
In this definition, are non-overlapping intervals that partition 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
A piecewise function is built from simple pieces, and each piece keeps its own rule on its own interval. A linear piece and a quadratic piece are the two shapes that appear most often, because each one is easy to read from the conditions and easy to draw.
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. A quadratic piece can describe a part of the model that curves.
Connection Points and Continuity
At every boundary you meet two rules, and the graph may have a gap or a jump there.
The pieces meet at the interval boundaries, and what happens there decides whether the function is continuous.
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.
For example, the two rules below meet at but approach different output values:
Modeling with Piecewise Functions
A situation whose rule changes at a threshold fits a piecewise model. Progressive rates and staged speeds both switch the rule at a point you can name, and that point becomes the boundary between two pieces.
Progressive Rates
Piecewise functions model rules that change at specified thresholds. Progressive taxes, tiered parking fees, and tiered electricity rates all apply a different rule after a boundary is crossed.
Example: Electricity Rates
An electricity company applies tiered rates:
- kWh:
- kWh:
- kWh:
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 equal the distance already traveled at the start of each new interval. They keep continuous 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 . The distance above through 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 . Each additional hour is paid at .
If the employee may work at most , 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: