Eighth Grade Mathematics: Introduction to Step and Piecewise Relations

In elementary algebra, functions are typically represented by a single tidy algebraic formula like y = 2x + 3 that applies uniformly across all numbers. In the real world, however, rules frequently change depending on the magnitude of the input: tax brackets charge different percentages on different tiers of income; shipping rates jump abruptly when a package crosses a weight threshold; and parking garages charge flat rates for each discrete hour. Relations that are defined by different rules over different intervals are known as piecewise and step relations. In this chapter, you will explore the anatomy of piecewise rules, analyze step graphs, and interpret open and closed circle boundaries.

The Structure of a Piecewise Function

A piecewise function is a function whose mathematical rule changes depending on the specific interval of the input variable x.

General Algebraic Notation of a Piecewise Function:
        /  Rule 1,   if x is in Interval 1
f(x) = <
        \  Rule 2,   if x is in Interval 2

To evaluate a piecewise function for a specific input value, you must first inspect the interval conditions to determine which single rule applies to that input. You never evaluate an input using more than one rule.

Example: Evaluate the piecewise function:
        /  2x + 1,   if x < 3
f(x) = <
        \  -x + 10,  if x >= 3

Evaluate at x = 1:
Since 1 < 3, use Rule 1:  f(1) = 2*(1) + 1 = 3.

Evaluate at x = 5:
Since 5 >= 3, use Rule 2: f(5) = -(5) + 10 = 5.

Evaluate at boundary x = 3:
Condition "x >= 3" includes 3, so use Rule 2: f(3) = -(3) + 10 = 7.

Step Functions and Discontinuous Graphs

A step function is a special type of piecewise function whose output remains completely constant over discrete intervals, jumping abruptly from one flat value to another. The resulting graph resembles a staircase.

                    y (Cost in Dollars)
                  8 |                 o=====* (2 < x <= 3 hours: $8)
                  6 |           o=====*       (1 < x <= 2 hours: $6)
                  4 |     o=====*             (0 < x <= 1 hours: $4)
                  2 |
                  0 +-----+-----+-----+-----> x (Time in Hours)
                    0     1     2     3

Notice the combination of open circles (o) and closed circles (*) at the endpoints of each horizontal step:

A closed circle (*) indicates that the point IS included in that interval (represented by <= or >=). An open circle (o) indicates that the point is NOT included in that interval (represented by < or >).

In the parking garage graph above, parking for exactly 1.0 hour costs $4 (closed circle on the $4 line). If you stay for 1 hour and 1 second, your time enters the interval 1 < x <= 2, and the price jumps immediately to $6 (open circle at x = 1 on the $6 line).

The Greatest Integer (Floor) Function

A foundational step function in mathematics is the greatest integer function, often written as f(x) = [x] or floor(x). It rounds any real number down to the nearest integer less than or equal to that number.

Evaluating the Floor Function:
[2.0]  = 2
[2.4]  = 2
[2.99] = 2
[3.0]  = 3   <--- Jumps to next integer!
[-1.5] = -2  <--- Rounds DOWN to next lower integer!

The graph of the floor function consists of horizontal steps of length 1, each having a closed circle at its left endpoint and an open circle at its right endpoint.

Real-World Applications: Tiered Pricing Structures

Tiered pricing is universally employed in commerce and utilities to structure incentives or manage resource consumption.

Utility Water Billing Example:
Tier 1: First 500 gallons cost $0.02 per gallon (0 <= g <= 500)
Tier 2: Gallons above 500 cost $0.05 per gallon (g > 500)

Equation:
           /  0.02*g,               if 0 <= g <= 500
Cost(g) = <
           \  10 + 0.05*(g - 500),  if g > 500

Notice that the Tier 2 rule includes the 10 dollars charged for the first 500 gallons (0.02 * 500 = 10), ensuring that the total billing function is continuous without skipping dollars.

Chapter Exercises

Exercise 1: Evaluate the piecewise function f(x) given by: f(x) = 3x - 2 when x < 2, and f(x) = x^2 + 1 when x >= 2. Find the values of f(0), f(2), and f(4), stating which rule applies to each calculation.

Exercise 2: A post office charges 0.60 dollars to mail a first-class letter weighing up to 1 ounce. Each additional ounce (or fraction of an ounce) up to 4 ounces costs an extra 0.24 dollars. Construct a step table showing the mailing cost for letters weighing up to 4 ounces, and state the cost of mailing a 2.3-ounce letter.

Exercise 3: Explain in paragraph form why a step graph with vertical line segments connecting the horizontal steps would fail to be a function, referencing the vertical line test and the significance of open and closed endpoints.

Solutions and Explanations

Solution 1: To evaluate the piecewise function, examine the condition for each input value. For f(0), the input is 0, which satisfies 0 < 2; therefore, use the first rule: f(0) = 3*(0) - 2 = -2. For f(2), the input is 2, which satisfies the condition 2 >= 2; therefore, use the second rule: f(2) = (2)^2 + 1 = 4 + 1 = 5. For f(4), the input is 4, which satisfies 4 >= 2; therefore, use the second rule again: f(4) = (4)^2 + 1 = 16 + 1 = 17. The values are f(0) = -2, f(2) = 5, and f(4) = 17.

Solution 2: The postal pricing follows a step function where the cost jumps at each whole ounce threshold. For weights w satisfying 0 < w <= 1 ounce, the cost is 0.60 dollars. For weights satisfying 1 < w <= 2 ounces, the cost increases by 0.24 dollars to 0.84 dollars. For weights satisfying 2 < w <= 3 ounces, the cost increases by another 0.24 dollars to 1.08 dollars. For weights satisfying 3 < w <= 4 ounces, the cost increases by another 0.24 dollars to 1.32 dollars. A letter weighing 2.3 ounces falls into the interval 2 < w <= 3 ounces. Therefore, mailing a 2.3-ounce letter costs exactly 1.08 dollars.

Solution 3: In a step function, each horizontal step represents an output value that remains constant over an interval of inputs. At the threshold points where the output jumps from one level to the next, open and closed circles are used to maintain the definition of a function. For example, at an input of x = 1, a closed circle at y = 4 and an open circle at y = 6 indicates that the input 1 is paired exclusively with 4, because the open circle is not part of the graph. If you were to draw a solid vertical connecting line segment between the two steps, every point along that vertical segment would become part of the graph. That would mean the single input x = 1 would be paired with infinitely many output values between 4 and 6. A test vertical line drawn at x = 1 would intersect the graph along the entire vertical segment, completely failing the vertical line test. Therefore, the vertical connecting lines must never be drawn in a function graph.