Piecewise Function

Piecewise Function

Top  Previous  Next

A piecewise function or expression can be created using the Piecewise symbol:

piecewise symb 

or the built-in function - piecewise({expression1, domain1},{expression2,domain2}...,{last expression, otherwise}).  The reserved word, "otherwise" is an option available for the last condition.

Here we show how to enter the sequence of values, followed by conditions:

  • Create a function draw_function_button .
  • Double click the equation to edit.

piecewise2 

  • From the edit box click the Piecewise icon in the Symbols toolbox. Four small gray boxes will appear, including the one containing the original equation.

piecewise3 

  • Fill in your piecewise parameters - equations in the left column and their domain in the right column.  To expand the function, click the Piecewise icon again  for an additional row.

piecewise4 

Here's the finished piecewise function:

piecewise whole