GCalc 3 Manual
1. Quick Tutorial
Running the application
Assuming that Java 1.4 is installed on your computer, you can start GCalc 3 by clicking on the button labeled, "GCalc 3 Beta". If you do not have Java 1.4 (or higher) installed, please do that now.
When you launch GCalc 3, the interface shown (Figure 1) will show up. On the right, there is a list of plugins that is available. As you browse through the list, the description on the right will change.
Starting a plugin
Select the plugin you want to start. Double click on its name which is displayed on the left side of the main screen. Then the plugin window should come up.
For the rest of the tutorial, let's assume that we started the Graph Plugin.
To graph a function, type in the desired function into the Input section of the window at the top of the window. Notice that you only need to put in the 'left-hand side' of the function definition since the right hand side 'f(x)=' is already provided. The following examples are valid inputs:
For a more detailed description of available functions can be found in later section.
sin(pi x)+e^x-(x+1)^3 mixed
When ready, click on the Graph! button. Or more directly, press enter. If the input is well-formed, a color will be picked and the graph of the function will be shown on the Graph screen.
In the following sections, unary means that the function takes one argument. Unless noted otherwise, unary functions have the general form Binary infix operations are functions which take two arguments on either side of the function name.
function(x). Binary, tertiary, and multi-ary functions are natural extensions of this idea, each having two, three and more than two arguments respectively.
Constants & Variables
To GCalc, any consecutive string of alphabetic characters that isn't a function name is a variable name. GCalc 3 is case sensitive (unlike GCalc 2).
The most common variable name is
x, but you may have the occasion to use others, such as
r, or even
There are currently two reserved variables names
e, which represent the numbers 3.14159265... and 2.7182818..., respectively.
These are the 5 basic functions of arithmetic. Standard order of operations apply, i.e. Exponentiation, then multiplication and division, then addition and subtraction.
Exponentiation is right associative while the rest are left-associative. This means that
x^y^z is the same as
a+b+c is equivalent to
These are the trignometric functions (and their inverses) found in any self-respecting pre-calculus textbook. Angles are always expressed in radians.
These are the hyperbolic functions (and their inverses) found in any self-respecting calculus textbook.
These are unary functions which deal with the sign of the given argument. The expressions
neg(x) are equivalent way to express the negation of
x. The expression
abs(x) is the absolute value of
x. The expression
sgn(x) is 1 if
x>0, -1 if
x<0, and 0 if
sqrt is a unary function that evaluates the the square root of the argument.
root is a binary function that calculates the nth root. The general format is
root(x, n), where
n is an integer. This is preferred to
x^(1/n) since you'll notice that if
n is odd, the
x^(1/n) is undefined for negative
|Log base b|
exp is a unary function that evaluates the the exponential of the argument. It is equivalent to
ln are unary functions that evaluate the the common and natural logarithm of the argument.
logb(x,b) evaluates the logarithm base
x. It is mathematically equivalent to
ln(x) are equivalent to
Each of the three wave functions (
swwave) take three arguments. The general format is
t is a time function, 0<
d<1 is the duty cycle, and
T is the period. For example,
will produce the graph shown (Figure 3).
Each of the three pulse functions (
swpulse) take two arguments. The general format is
t is a time function. The pulse will 'turn on' at t=0 and 'turn off' at t=
a. For example,
4 trpulse(t+3,6) will produce the graph shown (Figure 4).
Step function is also known as the Heavyside function.
step(x) is 1 if
x is positive, and 0 otherwise.
Finally the stair function
stair(x,a) is 0 when
x is negative. There is a rise of 1 (starting at
x=0) and a run of
The rounding function,
floor are both unary functions which return a rounded value of the argument.
ceil(x) is the smallest (closest to negative infinity) integer that is not greater than
floor(x) is the largest (closest to positive infinity) integer that is not less than
Maximum and Minimum
min are multi-ary functions which respectively compute the maximum and minimum of the given parameters. For example
max(cos(x),sin(x)) will generate the graph shown (Figure 5). Both
min can take many inputs.
Sum and Product
prod are multi-ary functions which respectively compute the sum and product of the given parameters. For example
sum(1,-2x,x^2) is equivalent to
1-2x+x^2. Both these functions can take many inputs.
|Taylor Series Approximation|
diff has the format
diff(f,x), where the first argument is a multivariable function. Differentiation is always with respect to some variable, which is named in the other argument of
diff. One can also name multiple variables, to take multiple derivatives with respect to those variables. For example,
diff(x^2 y^2, x, y) will be the same as
int has the general format
GCalc utilizes an adaptive Simpson's rule algorithm for numerical integration. Be careful when integrating nonsmooth or discontinuous functions.
f is a function of one variable,
x is variable of integration,
b are the lower and upper end point, respectively, and
tol is the tolerance of the numerical integration algorithm.
Given a function
f with independent variable
x, the taylor polynomial approximation of
f of degree
x0 can be found with
|Greater than or equal|
|Less than or equal|
These operations take two numbers and does a comparison. If the inequality or equality evaluates to true, then the operation returns
1. Otherwise, the operation returns a
NaN (Not A Number).
|Logical Negation ('not')|
These standard logical operation take inequalities or other boolean operations as arguments. The operation
not is unary, while
|| are (infix) binary. For example,
is a valid expression.
not(x>1 && x<=y)
Be sure to use parentheses with
not to minimize confusion about order of precedence.
case, one can define a piecewise function. The general format is
case(t1,v1,t2,v2,...,[default]). If the test
tN evaluates to true, then the function value is the value
vN at that point. At any given point, if multiple tests evaluate to true, then the function value is the value corresponding to the first test that evaluates to true. If no test evaluates to true, then either the function takes on the optional
default or is undefined.
case(x^2<=pi^2,sin(x),0) corresponds to the graph shown (Figure 6).
3. Graph Plugins
This section contains features that are common to the 2D graph plugins. Currently, there are 6 graph plugins. In addition to the vanilla 2D Cartesian plane graphing, there are plugins for:
We'll get into the specifics of each plugin later, but first, we begin with a broad overview.
- Implicit Functions
- Direction Fields
- Polar Graphs
- Parametric Graphs
Graph plugins share a similar GUI (Graphical User Interface). The window is split into two boxes. The lower one contains the graph, and the upper one input interface.
The window also features the menu bar (above, usually) and the status bar beneath.
Hiding the plugin
GCalc comes with a myriad of plugins. If you ever wish to make one
invisible, you can select Hide Plugin from the Plugin
menu. The state of the plugin will persists until you quit GCalc.
Starting the plugin again while GCalc is still running will restore
the state of the plugin.
Printing is an experimental feature that will print the current
graph. To graph Select the Print... option under the
Plugin menu. You will be asked to provide a dot-per-inch
parameter, the default is 72 dots-per-inch, which approximately
corresponds to most computer screens. But most printers are able to
print 300 dots-per-inch or more. Of course, greater the
dots-per-inch, smaller the graph.
After that you will see a standard interface for printing. This might
be system dependent.
More to come...
4. System Requirements
There are no formal hardware requirements. Since GCalc is built on Java technology, it is cross-platform. Anywhere that Java runs, GCalc should work also.
GCalc 3 does work on a Pentium II 300 MHz machine that I have with 128 MB RAM. I would suggest that people have at least 128 MB RAM, especially if you use the more intensive plugins. With computers you buy these days, this shouldn't be a problem.
GCalc 3 is developed on Eclipse 3.0, running on Gentoo Linux running on a Celeron 2.4 with 512 MB RAM. The machine's name is Fantine.
GCalc 3 is developed using Java 1.4. You should have Java 1.4 (or higher) installed on your machine.
Although not strictly necessary, a web browser is helpful. (Firefox, Internet Explorer, Safari, and others are viable options.)
This is subject to change without notice. (I might switch to Java 1.5.)
The user must have the willingness to think critically about what GCalc is doing. If you're the type to shut of your brain while graphing, this is not the tool for you. As it's often said, do not operate heavy (graphing) machinery...