Piecewise - Notation and Interpretation

Notation and Interpretation

Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated subdomains. Crucially, in most settings, there must only be a finite number of subdomains, each of which must be an interval, in order for the overall function to be called "piecewise". For example, consider the piecewise definition of the absolute value function:

|x| = \begin{cases} -x, & \mbox{if } x < 0 \\ x, & \mbox{if } x \ge 0
\end{cases}

For all values of x less than zero, the first function (−x) is used, which negates the sign of the input value, making negative numbers positive. For all values of x greater than or equal to zero, the second function (x) is used, which evaluates trivially to the input value itself.

Consider the piecewise function f(x) evaluated at certain values of x:

x f(x) Function used
−3 3 x
−0.1 0.1 x
0 0 x
1/2 1/2 x
5 5 x

Thus, in order to evaluate a piecewise function at a given input value, the appropriate subdomain needs to be chosen in order to select the correct function and produce the correct output value.

Read more about this topic:  Piecewise