next up previous index
Next: Simple Plots Up: The Playsome Threesome: Maxima, Previous: The Book Mode

Becoming Familiar with Maxima, Maple, and Mathematica

But let us return to Maxima.

The Maxima command limit can be used to evaluate limits  of various real-variable expressions. For example

limit (x - 7, x, 3); produces - 4
This stands for

\begin{displaymath}\lim_{x\rightarrow 3} x - 7 = -4

In Maple the synopsis for limit is a little different. There you have to say
limit (x-7, x=3);
Whereas in Mathematica, the corresponding phrase would be:
Limit [x-7, x->3]

In Mathematica we don't use semicolons  to terminate expressions. In Maxima and in Maple we do. In Mathematica, as in Fortran, the command terminator is a new-line. But when you work with a Mathematica worksheet, a newline merely transfers you to another line. In this case you must either type the Enter key, on the far right of your keyboard, or Shift-Return in order to terminate a Mathematica command.

Unlike Mathematica's and Maple's own worksheet interfaces, the Bill Schelter's book-mode does not have section boxes . When you work with the book-mode, you must remember the scope of anything you send to Maxima or to Maple. You get more freedom, but you also have to think more about what you do. This is usually the case with freedom anyway.

You can also work with Maxima, Maple and Mathematica directly, without worksheets or the book-mode, that, sometimes, do tend to get in the way . Here is a Maxima example:

(C1) limit(x-7,x,3);
(D1) - 4\end{verbatim}\end{tex2html_preform}}

Here is how you'd do the same with Maple:
> limit(x-7,x=3);

And here is the same with Mathematica:
...-7,x->3]Out[1]= -4In[2]:=\end{verbatim}\end{tex2html_preform}}

Ctrl-D, which means ``End-of-Text'' will  get you safely out of all three.

Maple and Maxima share a number of similarly named functions with quite similar syntax. For example, both can expand  expressions. This is Maxima:

\begin{tex2html_preform}\begin{verbatim}expand((a + b)^3); yields
3 2 2 3
B + 3 A B + 3 A B + A\end{verbatim}\end{tex2html_preform}\end{figure}

And here is Maple doing the same:
\begin{tex2html_preform}\begin{verbatim}> expand((a+b)^3);
3 2 2 3
a + 3 a b + 3 a b + b

Both can also solve  algebraic equations, assuming that they are easily solvable. Maxima:
\begin{tex2html_preform}\begin{verbatim}solve(a*x^2 = 4, x); eval...
...-, X = -------]
SQRT(A) SQRT(A)\end{verbatim}\end{tex2html_preform}\end{figure}

and Maple:
\begin{tex2html_preform}\begin{verbatim}> solve(a*x^2 = 4, x);
2 2
----, - ----
1/2 1/2
a a>\end{verbatim}\end{tex2html_preform}\end{figure}

In Mathematica all predefined functions have names that begin with capital letters, square brackets are used for function arguments and commands themselves are terminated with a newline: 

\begin{tex2html_preform}\begin{verbatim}In[1]:= Expand[(a+b)^3]...
... 3
Out[1]= a + 3 a b + 3 a b + b\end{verbatim}\end{tex2html_preform}\end{figure}

We can see more differences between Mathematica and the other two when we invoke its function Solve: 
\begin{tex2html_preform}\begin{verbatim}In[3]:= Solve[ a x^2 == 4...
Sqrt[a] Sqrt[a]In[4]:=\end{verbatim}\end{tex2html_preform}\end{figure}

In summary, here the differences between Mathematica  on one side and Maple and Maxima on the other are as follows:
the function name begins with the capital ``S''
square brackets are used to enclose function arguments
there is no * between a and x^2: Mathematica tries to immitate a standard mathematical notation. When two algebraic symbols are put together, as in ab, it is understood as ``a times b''
logical == is used instead of =, which in Mathematica is used for a value assignment only.

Mathematica is an odd-man-out in this company.

next up previous index
Next: Simple Plots Up: The Playsome Threesome: Maxima, Previous: The Book Mode
Zdzislaw Meglicki