b2KIT

Piecewise Function Grapher

Define and plot piecewise functions with domain intervals. Shows open/closed endpoints, continuity checks, and limits.

Tested tool guide Tested browser tools Checked August 16, 2026

What Piecewise Function Grapher does, with a checked example

A piecewise function is one formula on part of its domain and a different formula on the rest, and all of its interesting behavior sits at the seams between the parts. This tool takes each branch as a formula plus a domain interval, draws it only over that interval, marks boundary points with filled or hollow circles, and computes the one-sided limits at every breakpoint to report whether the function is continuous there. The point people most often miss: the value at a breakpoint belongs to whichever branch includes it, so a jump, a hole, or an isolated point can all hide at the same x-value.

Worked example

A concrete input and expected output from the current implementation.

Input

f(x) = x^2 for x < 1; 3 - x for x >= 1

Expected output

Two branches plotted: the parabola y = x^2 drawn only left of x = 1, ending in a hollow circle at (1, 1); the line y = 3 - x drawn from x = 1 onward, starting with a filled circle at (1, 2). Limits report: left limit 1, right limit 2, value 2, so the limit at x = 1 does not exist and the function is discontinuous there (a jump from height 1 to height 2).

As x approaches 1 from below, x^2 approaches 1, while the branch that owns x = 1 gives 3 - 1 = 2. Because the two sides approach different heights, the graph jumps and continuity fails at x = 1.

How the result is produced

1

Branches draw only on their own interval

Each row pairs an expression with an x-interval, and the graph evaluates that expression only at x-values inside the interval. A closed boundary (<= or >=) plots a filled circle at the branch's value; an open boundary (< or >) plots a hollow circle at the value the branch approaches; where no interval applies, nothing is drawn, so the function visibly ends at its outermost bounds.

2

Breakpoint checks

At every x where the interval list changes, the tool forms the one-sided limits from the branches on either side and compares them with each other and with the function's defined value there. Matching limits with a matching value mean the function is continuous; matching limits with a missing or different value mean a hole (removable discontinuity); unequal limits mean a jump. The verdict for each breakpoint is reported alongside the graph.

Good uses

  • Checking a homework or textbook piecewise function at its breakpoints to confirm where it is continuous, where it jumps, and whether the endpoints are drawn open or closed.
  • Reviewing a piecewise business model - price tiers, tax brackets, shipping thresholds - at the cutoff values, where a small change in the input can switch the output to a different branch.
  • Seeing how familiar functions decompose into branches, like |x| as -x for x < 0 and x for x >= 0, to build intuition for endpoint conventions before writing one's own.

Limits and checks

  • Endpoint ownership: with < on both sides of a breakpoint, no branch owns the point, so the function has no value there and the graph shows a hole even if both branches approach the same height. Assign the point with <= or >=, or add a separate single-point branch, to fill it.
  • Overlapping intervals: if two branches claim the same x-values, the graph can only show one value at each x, so one branch may be missing from the plot while the other looks fine. Make the intervals disjoint and adjacent to be sure every formula you entered is visible.
  • The continuity verdict covers only the breakpoints you listed. Inside an interval the graph follows the branch's own formula - a branch like 1/x still has its asymptote - and the tool does not label issues the branch has away from interval boundaries.

Common questions

Both of my pieces meet at the same height, but the graph still shows a gap at the breakpoint. Why?

Because neither branch owns the breakpoint. With strict inequalities on both sides the function has no value at x equal to the boundary, so even though the left and right limits agree, continuity fails at an undefined point. Change one inequality to <= or >=, or add an explicit single-point branch, and the gap closes.

Does the tool plot the branches beyond the intervals I entered?

No. Each branch is confined to its own interval, and x-values covered by no interval are outside the function's domain, so nothing is drawn there. If the curve stops abruptly at an edge, that is correct behavior; extend that interval or add another branch rather than expecting the tool to extrapolate.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools