Evaluate and analyze piecewise-defined functions at any x value
Define f(x) with two linear pieces and evaluate at x = p
f(x)={x+, x<
f(x)={x+, x>=2, x=
Result
Derivation
Piecewise Function Evaluation
1. Compare input x with the boundary value
2. Select the correct piece
3. Substitute x into that expression
4. Check continuity at the boundary
Piecewise functions use different formulas for different input ranges. To evaluate, find which interval x belongs to, then use the corresponding expression. The boundary condition determines which piece applies.
⚠Check the inequality carefully when the input equals the boundary value. The condition (x<a vs x>=a) determines which piece applies at the boundary.
What Is a Piecewise Function?
A piecewise function is defined by multiple sub-functions, each applying to a specific interval. Common examples include absolute value |x| = {x if x>=0, -x if x<0}, tax brackets, and step functions. Evaluation requires checking conditions first.
Branch Selection
Check which interval x falls into. Use the corresponding expression. Only one piece is active for any given x.
Boundary Points
At x=boundary, check which inequality applies. The < vs <= determines which piece to use at the exact boundary.
Continuity Check
A piecewise function is continuous at the boundary if both pieces give the same value when approaching from left and right.
Absolute Value
The classic piecewise: |x| = {x if x>=0, -x if x<0}. This function is continuous but not differentiable at x=0.
Teaching Example: f(x) = {2x if x<2, 3x-2 if x>=2}, evaluate at x=3. Since 3>=2, use second: f(3)=3*3-2=9-2=7. Check continuity at x=2: left=4, right=4, continuous!
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.