You can define functions of one variable that are described by different expressions on different parts of their domain. These functions are referred to as piecewise-defined functions, case functions or multicase functions. Most of the operations introduced in calculus are now supported for piecewise-defined functions. You can evaluate, plot, differentiate, and integrate piecewise-defined functions in Scientific Notebook.
To define a piecewise-defined function
Note the strict conditions concerning the definition of piecewise-defined functions. Such functions must be specified by a three-column matrix with at least two rows. The function values must be in the first column, and the range conditions must be in the third column. Also, the matrix must be enclosed by a left brace and a ``null'' right delimiter, as in the following examples f and g. (The null right delimiter appears as a red dashed line on the screen when Matrix Lines is checked on the View menu, and does not appear when the document is printed or when Matrix Lines is not checked.)
With the insertion point in expressions such as the preceding ones (or with the entire equation selected with the mouse), click the New Definition button on the Compute toolbar, or go to the Define submenu and choose New Definition. Choose Evaluate to get results such as
dtbpFU2.0609in1.382in0ptf (x) or fpiecews1.wmf
For the function y = g(x) which is not continuous, you can plot with or without vertical connecting lines by using either the expression g(x) or the function name g to generate the plot. See Plotting Defined FunctionsDM6-4.tex#Plot piecewise-defined function for guidelines to plotting piecewise-defined functions.