Table of Contents |
A job pays $24 per hour as long as an employee works at most 40 hours in a week. If an employee works more than 40 hours, they still get $24 for each of the first 40 hours, but they also get $36 for every extra hour beyond 40.
How would we calculate an employee’s earnings?
There are two rules, depending on the number of hours worked:
40 hours or less |
Earnings = 24 ![]() |
More than 40 hours |
Earnings = 24 ![]() ![]() |
If the goal is to calculate several employees’ earnings, a piecewise function is needed since there are two rules to calculate the same output (earnings).
Let’s take this situation and try to represent it mathematically. Let x = the number of hours an employee works in a week.
Each entry in the table above can be translated into a mathematical statement involving the variable x.
Mathematical Statement | Statement in Words |
---|---|
![]() |
“40 hours or less” |
![]() |
“More than 40 hours” |
Earnings = 24x |
Earnings = 24 ![]() |
Earnings = 24(40) + 36(x – 40)
Note: “x – 40” is the number of extra hours. If someone works more than 40 hours, then you subtract 40 from the hours they worked to get the number of extra hours. |
Earnings = 24*40 + 36 ![]() |
In this situation, notice also that the weekly earnings depend on the number of hours worked. That is, the earnings is a function of the number of hours worked. Using function notation, let represent the earnings after x hours.
Since there are two rules to find , we can express
as a piecewise function. Here is how it would be written:
After addressing these things, the function could be written as:
The purpose of the function we built in the previous section is to calculate earnings for employees. In order to do so, remember that the input determines which rule is used:
EXAMPLE
Let’s use the function to compute earnings for several employees:Employee, Hours | Hours written in terms of x | Which Rule Should We Use? | Calculate E (x ) |
---|---|---|---|
Holly, 42 hours |
![]() |
Since 42 satisfies ![]() ![]() |
![]() |
George, 36 hours |
![]() |
Since 36 satisfies ![]() ![]() |
![]() |
Israel, 40 hours |
![]() |
Since 40 satisfies ![]() ![]() |
![]() |
Savannah, 50 hours |
![]() |
Since 50 satisfies ![]() ![]() |
![]() |
SOURCE: THIS TUTORIAL HAS BEEN ADAPTED FROM CHAPTER 0 OF "CONTEMPORARY CALCULUS" BY DALE HOFFMAN. ACCESS FOR FREE AT WWW.CONTEMPORARYCALCULUS.COM. LICENSE: CREATIVE COMMONS ATTRIBUTION 3.0 UNITED STATES.