Whereas we are on the subject of function evaluation we have to now talk about piecewise functions. Actually we've already seen an instance of a piecewise function even if we didn't call it a function (or a piecewise function) at the time. Remind the mathematical definition of absolute value.
It is a function and if we employ function notation we can write it as,
It is also an instance of a piecewise function. A piecewise function is a function which is broken into pieces & which piece you use based upon value of x. Thus, in the absolute value example we will employ the top piece if x is positive or zero and we will employ the bottom piece if x is -ve.