Piecewise and step functions (advanced graphing)
Piecewise and Step Functions
Piecewise and Step Functions is a topic in Functions in the Common Core State Standards. It is aligned to Standard F-IF.7b, which requires students to graph piecewise-defined functions, including step and absolute value functions.
A piecewise function is defined by different rules on different intervals; a step function, such as the floor \(\lfloor x\rfloor\), is a special piecewise function that jumps between constant values.
Theory
A piecewise function is defined by different rules on different parts of its domain, written with a brace:
To evaluate, pick the single branch whose condition the input satisfies.
A step function is a special piecewise function that is constant on each interval and jumps between values. The most important is the floor (greatest integer) function \(\lfloor x\rfloor\), the greatest integer \(\le x\).
Piecewise notation and the floor function:
How to work with a piecewise function
- To evaluate: check which condition the input meets, then use only that branch's rule.
- To graph: draw each branch only over its interval.
- Mark endpoints: closed dot where the branch includes the boundary, open dot where it doesn't.
- Check coverage: every \(x\) in the domain should satisfy exactly one condition.
Choose the branch whose condition the input satisfies.
| \(-3<0\Rightarrow f(-3)\) | \(=\) | \(-1\) |
| \(2\ge 0\Rightarrow f(2)\) | \(=\) | \(2+1=3\) |
The boundary \(x=0\) belongs to the branch whose condition includes it. Here \(x\ge 0\) uses \(x+1\).
| \(f(0)\) | \(=\) | \(0+1=1\) |
On the graph this is the closed dot at \((0,1)\); the other branch has an open dot at \((0,-1)\).
The floor \(\lfloor x\rfloor\) is the greatest integer that is \(\le x\).
| \(\lfloor 2.7\rfloor\) | \(=\) | \(2\) |
| \(\lfloor -1.3\rfloor\) | \(=\) | \(-2\) |
For \(-1.3\), the largest integer not exceeding it is \(-2\), not \(-1\) — watch the negatives.
Absolute value leaves nonnegative inputs alone and negates negative inputs.
Both pieces are lines that meet at the origin, giving the familiar V shape.
Common pitfalls
Frequently asked questions
What is a piecewise function?
A function defined by different rules on different parts of its domain. You evaluate it by using the branch whose condition the input satisfies.
How do you evaluate a piecewise function?
Find which interval the input falls in, then apply only that branch's formula.
What is the floor (greatest integer) function?
\(\lfloor x\rfloor\) is the greatest integer less than or equal to \(x\). For example \(\lfloor 2.7\rfloor=2\) and \(\lfloor -1.3\rfloor=-2\).
When do you use an open versus a closed dot?
Closed when the endpoint is included in that branch (\(\le\) or \(\ge\)); open when it is excluded (\(<\) or \(>\)).