lesson

Updated 1 month ago Β· 6 views
Imagine ordering custom t-shirts: the first 10 shirts cost 15each,thenext40cost10 each, and any beyond that cost just $6. A single equation cannot describe this pricing model because the rule changes as the quantity grows.
To model situations with changing rules, mathematicians use a piecewise function β a function defined by multiple sub-functions, where each sub-function applies to a specific interval of the domain.
πA visual diagram dissecting piecewise function notation. Display the function f(x) = { 2x + 1 if x < 1; 4 if 1 <= x < 3; x^2 - 5 if x >= 3 } inside a large clean bracket. Use color-coded callouts with labels: 'Rule / Formula' pointing to the expressions on the left (blue accent #2563eb) and 'Domain Interval / Condition' pointing to the inequalities on the right (orange accent #ea580c). Clean light background (#ffffff), dark slate text (#1e2945), subtle rounded borders, responsive 350px width.
How do you find the output of a piecewise function without getting tangled up in all the different formulas?
Evaluating Branch by Branch
Evaluating a piecewise function is a two-step process: first, test your input x against each domain condition to find the active branch; second, substitute x into only that branch's formula.
πA flowchart showing how to evaluate f(-2), f(2), and f(4) for f(x) = { -x+1 (x < 0), 3 (0 <= x < 3), x^2 - 7 (x >= 3) }. Top row shows the input value x. An arrow passes through a condition check diamond, routing x to the one active formula, showing the computed output box below. Clean vector style, light background (#f8fafc), dark slate text (#1e2945), success green (#16a34a) and primary blue (#2563eb) accents.
Consider f(x) defined as:
f(x)=β©β¨β§ββ2xβ32(xβ3)2β1βifΒ x<β1ifΒ β1β€x<2ifΒ xβ₯2β
To find f(β3), check the conditions: since β3<β1, use the first linear rule: f(β3)=β2(β3)β3=6β3=3.
To find f(β1), look closely at the boundary: β1 satisfies β1β€x<2 (not x<β1), so the constant branch applies: f(β1)=2.
To find f(4), check the conditions: since 4β₯2, use the quadratic rule: f(4)=(4β3)2β1=12β1=0.
Evaluating points is straightforward, but what happens when you need to draw the entire picture on a coordinate plane?