Creating a function
to create a function:
create new function by typing it's name, arguments (listed in parentheses) and assigning expression:
you can use any number of arguments. After function was created, it can be used in calculations:
it is possible to define piecewise continuous function by typing initializing expression and logical condition:
if condition is true, function will return calculated specified expression. Function will return zero otherwise. For current example result will be -0.5, when x < -2PI, or 0, when x >= -2PI.
using the same function name and similar list of arguments enter:
when plotted this function will look like this:
you can add any number of intervals to the function. In this case every new expression must be followed with logical condition. If you add expression without condition - it will overwrite all previously added expressions. Also avoid intersections between intervals, this can lead to unexpected results (for intersection areas results from conflicting expressions will be summed together).
variables can be defined by using logical expression in the same way.