Maxima/Getting Started Using Maxima

Getting Started Using Maxima - Some Essentials

This section is intended for those that are new to Maxima. It may or may not be of value or interest to those having prior experience.

The Maxima Way of doing Mathematics

Imagine that you want to create a computer application to perform some general mathematical tasks - not merely numerical calculations or "number crunching" as it is sometimes referred to somewhat pejoratively. It seems likely that it would be realized early on that, unlike humans that can interpret concepts and notation using context, computers and programming software generally are intolerant of any sort of ambiguity. Progress is being made in providing programming software with the ability to interpret based on context, but not here in Maxima. The Maxima expression syntax was created to be logical as well as unambiguous and precise in meaning and intention.

Another realization likely would be that mathematical expressions are the essential object on which mathematical concepts hinge, and that these concepts are conveyed using a conventional (if not entirely standard) system of notation. So, the means to compose mathematical expressions using some syntax for interpreting mathematical notation that your program could read and process as input would be essential. So Maxima is not a programming language in the conventional sense.

With the foregoing in mind, before starting to see examples of Maxima in action, keep the following in mind while learning and using Maxima:

  • Expressions of various types (especially mathematical expressions) are the input to Maxima
  • Every expression returns a value which is displayed as output unless the display is suppressed by some means
  • Expressions as input are entered using an expression syntax that Maxima can read and process

Maxima expressions are of three types:

  1. Mathematical expressions
  2. Object expressions
  3. Programming expressions

Maxima expressions are comprised of two "ingredients" so to speak:

  1. Atoms
  2. Operators

Atoms:

These are one type of the built-in basic expression ingredients of Maxima. They are:

  1. Literal numerals for numbers - integer, fraction, and floating point literals
  2. Identifiers - names used alone or to identify other expressions by name
  3. Strings - quoted strings of one or more characters

Operators:

These are the second type of the built-in expression ingredients of Maxima. Including:

  1. Mathematical operators such as + , - , * , /, ^ , ! for addition, subtraction, negation, multiplication, division, exponentiation, factorial and the like. Internally to Maxima these are short-hand symbols for operators. Maxima operators also include "functions" such as sin(x), log(x), etc.
  2. Operators that are used to accomplish something other than for mathematical purposes


Note: It is important to point out that there is a difference between operators, functions as used in the context of programming, and the mathematical concept of functions. In this book all Maxima functions in the programming sense of the word that are built-in to Maxima (that is "out-of-the-box" so to speak) will be referred to as operators, including those from loaded packages that are included with the Maxima distribution. Maxima functions in the programming sense of the word created by the user will be referred to as functions. The context should make it clear when the mathematical concept of a function is being referred to. It is unfortunately the case that the Maxima documentation refers to operators as functions. Like so much else, the word "function" has become overloaded.

Expressions - Identifiers, Atoms, and Operators

With the foregoing information in mind, Maxima can be used to provide some examples of these various aspects of working with Maxima. This will be accomplished in the spirit of providing some insight and clarity for how to interact with Maxima, and how to compose expressions for input and how to interpret the values of expressions as output.

Indentifiers