Piecewise

Piecewise Functions

Evaluating

Consider the piecewise function below. It consists of two functions with different domains. It says that if x is smaller than or equal to 2, the formula for the function is f(x) = -x. If x is greater than 2, the formula is f(x) = x.

Piecewise1

The domain of function f is the set of all real numbers, since f is defined everywhere for all real numbers. In other words, there is not one value for x that could not be substituted into the function.

To evaluate a function when there are multiple functions, look at the intervals on the right of the functions. To evaluate f (3), use the lower function as that is the one to use for all values of x greater than 2. f (3) = x = 3. To evaluate f (-4) use the upper function f(x ) = - x . Replacing x with -4: f (-4) = -(-4) = 4.