Skip to content
Calcrivo

Piecewise Function Calculator

Evaluate a piecewise-defined function at x by selecting the matching interval branch.

Inputs

Expression for the first piece

x value where the function switches

Expression for the second piece

f(x)

7.00000000

Branch Used

f₂(x) = 2*x + 1 (x ≥ 0)

Left limit at boundary

0.000000

Right limit at boundary

1.000000

Step by step

  1. Values used

    f₁(x) (when x < boundary) = x^2; Boundary value = 0; f₂(x) (when x ≥ boundary) = 2*x + 1; x value to evaluate = 3

  2. Piecewise definition

    f(x) = { f₁(x) if x < c ; f₂(x) if x ≥ c }

  3. f(x)

    = 7.00000000

  4. Branch Used

    = f₂(x) = 2*x + 1 (x ≥ 0)

  5. Left limit at boundary

    = 0.000000

  6. Right limit at boundary

    = 1.000000

How it works

A piecewise function uses different expressions on different intervals. This calculator evaluates a two-piece function: f₁(x) when x < boundary, and f₂(x) when x ≥ boundary. It also checks the one-sided limits at the boundary to indicate continuity.

Formula

Piecewise definition

f(x) = { f₁(x) if x < c ; f₂(x) if x ≥ c }

c
Boundary value
f₁
Left branch
f₂
Right branch

Frequently Asked Questions

Can I have more than two pieces?

This calculator supports two pieces. For more complex piecewise functions, evaluate each piece separately using the Function Calculator.

How do I check if the function is continuous?

Compare the left limit and right limit at the boundary. If they are equal, the function is continuous at that point.

You might also need