Define a function with different rules for different intervals and evaluate it at a specific point.
Function Definition
ELSE
Evaluation Result
2.0000
f(x) =
Active Rule-x
Condition satisfiedx < 0
f(-2) = 2.0000
About this calculator
What is a Piecewise Function?
A piecewise function is a function that is defined by multiple sub-functions, each applying to a certain interval of the main function's domain. The absolute value function |x| is a classic example: it equals -x when x < 0 and x when x ≥ 0.
💡
Pro Tips
Continuity: A piecewise function is continuous at the boundary if the limit from the left equals the limit from the right.
Domain: Make sure all real numbers are covered if you want a complete domain.
!
Fun Facts
"Tax brackets are a real-world example of a piecewise (step) function."
"Splines used in computer graphics are piecewise polynomials."
Formula: f(x) = \begin{cases} f_1(x) & \text{if } x < a \\ f_2(x) & \text{if } x \ge a \end{cases}