Graph Defined in Cartesian Coordinates

The format of definition has one of the following forms:

F(x)

F(x);xmin

F(x);xmin,xmax

F(x);,xmax

 

where

F(x) – is an expression which (after evaluations) can contain only variable, corresponding to the abscissa axis. By default, variable name is x.

xmin –  left limit of the plotting interval

xmax –  right limit of the plotting interval

 

If neither xmin  nor xmax  are specified, the graph is plotted on its whole domain.

If xmax  is not specified, the graph is plotted right to xmin ; if xmin  is not specified, the graph is plotted left to xmax .

 

Examples:

sin(x)/x^2                                ; graph of function  y=sin(x)/x2 on the whole abscissa axis

ln(x);1                                     ; graph of function  y=ln(x) for x>1

cos(x);-pi/2,pi/2                       ; graph of function  y=cos(x) on the segment [-π/2,π/2]

cos(x)*le(abs(x),pi/2)             ; graph of function y=cos(x) inside [-π/2,π/2] and y=0 outside of it

2*cos(x)*gt(x,0)+2*le(x,0)     ; graph of function  y=cos(x) for x>0 and y=2 for x≤0

 

Remarks to the last two examples.  To specify a function by different formulas for different segments one can use so-called “indicator functions”. For instance,

lt(a,b) means “a is less then b”,

gt(a,b) means “a is greater then b”,

le(a,b) means “a is less or equal b”,

ge(a,b) means “a is greater or equal b”. 

eq(a,b) means “a is equal b”. 

Value of indicator functions is 1 if corresponding condition holds true and is 0 otherwise