←
Grade 12 Calculus · Lesson 1 · Pieces of a function · about 4 minutes
One function, several rules
score 0

One function, several rules

A piecewise function is one function written with more than one rule, each rule in charge of part of the number line. The rule is chosen by the input: f(x)={x+1x<23x−5x≥2f(x) = \begin{cases} x + 1 & x < 2 \\ 3x - 5 & x \ge 2 \end{cases}, read aloud: f of x equals x plus one when x is less than two, and three x minus five when x is at least two. Here ff is the function, xx is the input, and the conditions on the right decide which rule does the work. To evaluate f(5)f(5), find the condition that 5 satisfies (5≥25 \ge 2), then use that rule and no other: 3(5)−5=103(5) - 5 = 10. The other rule is not consulted, not averaged in, not added.

The one place to be careful is the boundary, the x where the rules change. Exactly one rule owns it, and the inequality signs say which: ≤\le or ≥\ge includes the boundary, << or >> stops just short of it. On a graph that is the difference between a closed dot (the point is on the graph) and an open dot (the piece ends there without including it). In the example, f(2)=3(2)−5=1f(2) = 3(2) - 5 = 1: the line x+1x + 1 arrives at height 3 with an open dot, and the line 3x−53x - 5 starts at height 1 with a closed dot. Two heights at one x is what a jump looks like, and the dots say which height the function actually takes.