Piecewise Function

Evaluate and graph piecewise-defined functions

One piece per line as expr:lo:hi (e.g. x^2:0:2). Bounds may be numbers, inf, -inf, or blank for open-ended. Intervals are inclusive; where pieces meet, the earlier one applies.

Optional. Compute f(x) at this point.

f(x) = -x [x ≤ 0] ; x^2 [0 ≤ x ≤ 2] ; 1 [x ≥ 2]
f(x) at x = 1
1
Active piece: x^2
Domain
all x
Pieces
3
Junctions
  • at x = 0: continuous
  • at x = 2: jump ‎-3
Definition
  • -x [x ≤ 0]
  • x^2 [0 ≤ x ≤ 2]
  • 1 [x ≥ 2]
Graph of the piecewise function, one coloured segment per pieceGraph of the piecewise function, one coloured segment per piecexy-1-0.50.511.522.5312341