Maxima is an open source computer algebra system whos origins formed the foundation for many of its commerical counterparts including, for example, Maple and Mathematica. A computer algebra system is a software application that is designed to perform symbolic mathematical computations as opposed to numerical applications which perform all computations using fixed or floating point arithmetic. In layman’s terms, computer algebra systems provide exact answers to problems but at a cost of being computationally expensive as opposed to numerical applications which produce approximate answers very efficiently.
Since Maxima is open source, it is completely free to use and distribute. Currently, the student version of Maple and Mathematica costs $99 and $140, respectively, and a single academic license of Maple and Mathematica costs $995 and $1,095, respectively. Both Maple and Mathematica have many bells and whistles that many users do no need, and thus, from an economic point of view, Maxima is a natural choice for individuals and institutions with relatively small budgets.
Most Maxima users will want to interact with Maxima using a graphical user interface (GUI). The most popular GUI is wxMaxima, and this GUI is available for each of the most popular operating systems including Micro$oft Windows, Mac O$ X, and Linux. As previously mentioned, Maxima is completely free, and it can be downloaded from Maxima’s website at http://maxima.sourceforge.net. The Windows installer of Maxima is packaged with wxMaxima; however, users of other operating system users may need to download wxMaxima from http://wxmaxima.sourceforge.net.
Figure 1 shows a screenshot of wxMaxima. Input to wxMaxima is entered in the box labeled INPUT, and once input is entered, an echo of the input as well as the output is displayed in the preview window pane. Common commands are available via the buttons below the input field, and many other commands may be accessed via window menus. A complete list of available commands may be found in wxMaxima’s the help file, and a list (as well as several examples) of common commands used for calculus problems will be discussed here.
The 5 basic numerical operations are addition, subtraction, multiplication, division, and exponentiation and are performed in Maxima using +, -, *, /, and ^, respectively. For example, in order to add 3 and 5 with Maxima, simply enter
3+5
into the INPUT field, and the output will be
Notice that the input is echoed as (%i1) which is synonymous with “input 1” and the evaluation of this input, namely 8, is shown in (%o1) which is synonymous with “output 1”. As more inputs are entered, the input and output fields are incremented accordingly. For example, the following illustrates the other 4 basic operations.
Notice that (%o4) returns the fraction {3\over 5} as opposed to 0.6, say. The reason for this is that 0.6 is assumed to a floating point approximation (even though in this case the approximation would be exact) of the exact answer. This example illustrates the primary difference between computer algebra systems and numerical applications.
Maxima follows the standard order of operations, and parenthesis are used as delimiters for individual terms in an expression. For example, notice (because of order of operations) that the following two inputs generate the same output.
There are several built-in constants in Maxima, but these constants are used symbolically unless (or until) a floating point representation of them is requested. Several of these constants are found in Table 1.
|
So, in order to illustrate the use of these constants, consider the following example.
Notice that (%o8) is the exact result when dividing π by 4. The input (%i9) is used to perform a floating point evaluation of (%o8), and this is accomplished using float(%). The float() function performs a floating point evaluation of an expression, and % represents the “last output” which, in this case, is (%o8).
A calculuator would just not be a calculator without several built-in functions. Table 2 shows several functions provided by Maxima.
|
Table 2 is far from a complete list of functions in Maxima, but it does contain some of the most commonly used mathematical functions. The following example is an illustration of several of these functions in action.
It is often desired to store the value of a particular output so that this value may be resused later. Simple variable assignmetns are achieved using the : assignment operator. In order to illustrate the use of this assignment operator, consider the following example.
In this example the value of {9\over 5} is stored into x, and then the expression 5x{}^{2}-24x+27 is evaluated to 0. The value of an output can also be assigned to a variable by using % to refer to the previous output or by referring to the specific output. The following example illustrates this.
Notice that the expression was first evaluated and then the answer was assigned to a. Finally the expression a+4 was evaluated to {1\over 6} and this value is then stored into the variable b.