FunPlot Help


FunPlot evaluates expressions of a single variable x and plots the corresponding function: use arithmetical binary operations +, -, *, /, ^ with the usual precedence rules to write your expressions. For example x+2*x^3 corresponds to x+2x3 and it is evalued first computing x3, next multiplying by 2 and finally adding x. As usual, parentheses may alter precedence rules. A special kind of parentheses are |...| which return the absolute value of the expression they enclose. Numbers are usual floating point numbers of the form integer.digitsEinteger.

Notice that exponentiation has lower precedence than negation, so that -x2 which is usually understood as -(x2) should be typed as -(x^2).

A special syntax is provided for function whose definition depends on the input variable x: namely, use the notation { cond1 : expr1 , ..., condn : exprn } to define a function which evalues to the expression corresponding to the condition. A condition is of the form x rel expr being rel a relation among: =, <, >, <>, <=, >= (where <>means "different from").

For example { x < 0 : -1, x >=0 : 1 } will plot the usual Heaviside function.


Functions of one variable may be used and defined: they do not require parentheses when invoked, for example type sin x instead of sin(x), but be aware that sin 2*x is the same as (sin 2)*x, not the same as sin(2*x).

Built-in functions are: abs (absolute value), acos (arc cosine), asin (arc sine), atan (arc tangent), ceil (round to ceil integer), cos (cosine), exp (exponential function), floor, (round to floor integer), log (natural logarithm), round (round to nearest integer), sin (sinus) , sqrt (square root), tan (tangent). Also two symbolic constants are provided: pi for pi greek and e for Euler constant.

The interpreter is case insensitive, and spaces and tabs may appear anywhere and are skipped.


Variables may be defined via the syntax name = expression, where name is alphanumerical and may contain _. The x name is reserved as dummy argument in a function, and in general built-in or already defined names cannot be shadowed by new definitions. Moreover, that the expression which defines a variable is not evalued until the variable is used: for example it is correct to define y = sin x and when trying to plot y the graph of sin x will be plotted.

Similarly, functions of one variable may be defined via the syntax name(x)= expression. One can evaluate a function providing an actual argument, by name(argument).

Trying to redefine a variable or a function will raise an error. To delete a variable of runction use del name, while to drop all defined symbols use del *. To list the name of all defined symbol use list.


Expressions representing functions of the variable x to be plotted may be inserted into the text form at the top of the page.Each time a function is inserted it is plotted in the graph arew without deleting previously plotted functions: the app tries to plot each new function in a different color. To clear the screen use the cls command.

Since a graph may be shifted via finger gestures, by means of center command the center of Cartesian coordinates will be restored to the center of the plotting area.

When the application is opened on a browser running on a device equipped with a keyboard, one can shift the graph via arrow keys (the input area has to be cleaned to the empty string) and one can zoom via pgup/down keys.

(c) 2012 by Paolo Caressa. Back to the application.