Piecewise Functions
Graph each rule only where its interval permits, with exact open and closed endpoint control.
Guide roadmap
Piecewise functions pair each formula with an input interval. Correct work depends on honoring both pieces of information: the rule supplies outputs, while the interval controls where those outputs belong and which rule owns a breakpoint.
The Matplotlib visuals separate interval ownership before showing the combined graph. Algebraic boundary evaluation then distinguishes continuity, jump behavior, and familiar shapes such as absolute-value functions without relying on a compressed image.
- Evaluate and graph rules only on their stated intervals.
- Combine nonlinear and linear pieces with exact endpoint control.
- Derive familiar V-shapes from sign-based piecewise definitions.
Intervals and Endpoint Control
A piecewise graph is several restricted graphs, not one rule applied everywhere.
Build the idea
A piecewise definition assigns different rules to different input intervals. Evaluating or graphing requires two decisions: first choose the interval containing the input, then use only that interval's formula. The breakpoint inequality determines which rule owns the exact boundary value.
Continuity at a breakpoint is a three-part check: the left-hand outputs approach one value, the right-hand outputs approach the same value, and the included rule assigns that value to the function. Open and closed markers communicate ownership, while the numerical boundary outputs reveal whether the graph meets or jumps.
Read the structure
| Look for | What it tells you | How to verify |
|---|---|---|
| Input interval | Selects exactly one active formula. | Test the input against the inequalities before substituting. |
| Open versus closed symbol | Determines boundary ownership. | Use / for open and / for closed. |
| One-sided boundary outputs | Determine meeting or jumping. | Evaluate both formulas at the breakpoint for comparison. |
Mark the breakpoint on the x-axis.
Graph the first rule only on its interval.
Use an open or closed endpoint from its inequality.
Repeat for every piece, then combine.
Separate the two interval jobs
Draw only for with an open endpoint.
Draw only for with a closed endpoint.
Both endpoint calculations equal 2, so the final graph meets at .
The closed point determines the function value .
[Figure: Three-panel piecewise graph showing the constant rule, the linear rule, and the combined graph with endpoint control at x equals 1]
Identify a jump at the boundary
For , use the first rule and obtain .
At , the second rule owns the boundary, so .
The first rule approaches 1 as , while the second approaches 2 as .
Because the one-sided values differ, the graph has a jump at .
Try it, then check
For when and when , find and classify continuity.
Hint: Use the closed rule for the value and compare both boundary outputs.
The right-hand rule approaches 4, so the two pieces do not meet.
- The rule's formula does not override its interval restriction.
Nonlinear Pieces
A parabola or other nonlinear rule must stop exactly at its boundary just like a line.
Build the idea
A nonlinear piece is still restricted by its interval. Sketching the complete parent can help with orientation, but only the allowed segment belongs in the final graph. Endpoints must be calculated from the formula rather than placed by visual guesswork.
Domain may also be restricted by the formula itself. A square-root piece needs a nonnegative radicand in addition to its stated interval, while a polynomial piece accepts every input in its interval. The actual domain of a piece is the intersection of the formula's domain and the piecewise condition.
Read the structure
| Look for | What it tells you | How to verify |
|---|---|---|
| Parent-function shape | Guides the local curve. | Remove every segment outside the stated interval. |
| Formula domain | May further restrict the interval. | Intersect radicand or denominator conditions with the piece condition. |
| Boundary output | Locates the exact endpoint. | Evaluate the formula at the breakpoint even when the point is open. |
Sketch the full parent lightly in your reasoning.
Keep only the allowed interval.
Calculate the boundary output.
Apply the correct endpoint marker.
Restrict a parabola
Use only the part of left of .
Mark open for the parabola piece.
Draw right of with a closed point.
Combine without extending either rule through the wrong interval.
[Figure: Three-panel piecewise graph showing a restricted parabola and a constant branch meeting at 2 comma 4]
Combine a radical and a line continuously
The square-root piece begins at and approaches with an open endpoint.
The line piece begins at with closed point .
Both boundary calculations equal 2, so the pieces meet without a jump.
The combined domain is and .
Try it, then check
For when and when , determine and continuity.
Hint: Evaluate both formulas at the breakpoint, then use the closed rule for the value.
Both one-sided formulas approach 1, and the first rule includes the point.
- Do not draw the entire parent parabola and then add the second piece.
Building Familiar Shapes from Pieces
Piecewise definitions can reveal how familiar shapes are assembled from simpler rules.
Build the idea
Absolute-value graphs are piecewise linear because the sign of the inside expression determines whether it is preserved or negated. The breakpoint occurs where the inside equals zero, which becomes the vertex of the V-shaped graph.
Writing the piecewise form explains both slopes and the domain split. On one side the inside is negative, so absolute value multiplies it by ; on the other side it is nonnegative and remains unchanged. The included boundary may be assigned to either matching formula, but the standard form uses one open and one closed interval.
Read the structure
| Look for | What it tells you | How to verify |
|---|---|---|
| Inside expression | Locates the sign change and vertex. | Solve it before writing intervals. |
| Inside negative | Requires negating the complete expression. | Test one input from that interval. |
| Inside nonnegative | Keeps the expression unchanged. | Check that the two formulas agree at the breakpoint. |
Find the breakpoint.
Graph each linear rule on its side.
Control ownership of the shared endpoint.
Read the resulting domain, range, and turning point.
Assemble a shifted V
The breakpoint is .
The left rule approaches with an open point.
The right rule starts at with a closed point.
Together the rules form .
[Figure: Three-panel piecewise graph combining two lines into a V with vertex at negative 1 comma 0]
Build a shifted absolute-value graph
The inside expression changes sign at , giving vertex .
For , , so .
For , , so .
The pieces meet at and create slopes and .
Try it, then check
Write as a piecewise function.
Hint: Find where and negate the full expression on the negative side.
The two rules meet at vertex .
- Open and closed markers can occupy the same coordinate; the included rule determines the function value.
Read a Step Function
A step function holds the same output throughout an interval. The output can change all at once at the next boundary.
Trace a counter that updates once an hour
A display shows 2 completed transfers for the first hour, 5 for the second hour, and 8 from hour 2 through hour 3. Let \(t\) be the hours since the first reading.
\[C(t)=\begin{cases}2&0\leq t<1\\5&1\leq t<2\\8&2\leq t\leq3\end{cases}.\]
The left-hand height at 1 is 2 and the right-hand height is 5. They differ, so the graph has a jump there. No vertical segment connects those heights because writing one would assign more than one output to the same input.
Choose a Rule from a Threshold
A change in filling rate changes the slope of the depth graph. To model it, find the amount present at the moment the new rate begins.
Measure the depth after a valve adjustment
A tank starts at 18 cm and fills at 3 cm per minute for 4 minutes. The valve then lowers the filling rate to 1 cm per minute. It continues at that rate until minute 10.
The first rule is \(18+3t\), with \(t\) measured in minutes. At minute 4 the depth is \(18+3(4)=30\text{ cm}\). After that, the tank gains \(t-4\) more centimeters.
\[D(t)=\begin{cases}18+3t&0\leq t<4\\30+(t-4)&4\leq t\leq10\end{cases}.\]
To find when the depth reaches 34 cm, solve \(30+(t-4)=34\). This gives \(t=8\), which lies in the interval for that rule. Solving the first rule instead gives \(t=\frac{16}{3}\), which lies outside its interval.
Check the depth at minute 7
Three minutes have elapsed since the adjustment. The depth is \(30+3=33\text{ cm}\).