Introduction  Appetizer  Examples  Documentation  Applications  Work plan

 


Variables


 

The use of this tool is exemplified in Polar Coordinates and in The Derivative.

The configuration panel of the tool VARIABLES may have as many lines as desired. Each one defines a variable in terms of constants, parameters or other variables. Here are some examples:

aux=25
pi=3.1416:constant=true
s=sin(pi*(x+y)/4)

variables are numbers calculated from others that may be used in the definition of functions or graphics. The expression defining a variable may contain constants, parameters and previously defined variables, i.e. variables defined in previous lines. It may also contain arithmetic operators and the most common mathematical functions (trigonometric, inverse trigonometric, exponential and logarithmic functions).

variables which have the feature constant=true in their definition line (separated by  : ) are evaluated only once before the graphs are drawn. This feature may be used to speed up some graphs.

The variables are frequently used to save the result of some intermediate calculations and use them later on other calculations or on the equations and other graphs.

In the following example a constant variable pi and a non constant variable F=A*cos(w*pi*x) are defined. These two variables are then used to define the equations y=A*sin(w*pi*x) and y=F. The latter is an abreviation of y=A*cos(w*pi*x). With this setup the reader can verify that the changes in the value of the parameter x do not produce any effect on the graphs. The reader is invited to add the feature constant=true to the  variable  F and verify that F becomes a constant function (its graph is a horizontal line) that goes up and down when the parameters change, even when x changes. A constant variable can't be used as a function of x and/or y.

The example on Polar Coordinates shows a very interesting application of this tool in which two variables are defined in terms of x and y and then they are used as new coordinates to set up equations in these new variables (the polar coordinates). The variables that depend on x and y are evaluated in a more efficient way that the functions and thus should be used in preference to functions except when this is not possible or convenient.


Introduction  Appetizer  Examples  Documentation  Applications  Work plan

 
Ministerio de Educación, Cultura y Deporte. Aņo 2000