From String Theory Wiki
Revision as of 16:25, 21 August 2007 by Tom (talk | contribs) (spelling)
Jump to navigation Jump to search

Maxima is an open source computer algebra system, similar to Mathematica. It is available for GNU/Linux, MacOS X and Windows.

installation on a GNU/Linux system

There should be pre-compiled packages available for most distributions. For example in Debian-based distributions such as Ubuntu install the maxima and maxima-share packages by typing

sudo apt-get install maxima maxima-share

sample usage


tensor manipulation

The ctensor module is useful for tensor manipulation (in Ubuntu GNU/Linux this is included in the maxima-share package).

Sample usage:

dim: 5;
ct_coords: [t,rho,chi1,chi2,chi3];
lg: matrix([-(R^2)*(cosh(rho)^2),0,0,0,0],[0,R^2,0,0,0],[0,0,(R^2)*(sinh(rho)^2),0,0],[0,0,0,(R^2)*(sinh(rho)^2)*sin(chi1)^2,0],[0,0,0,0,(R^2)*(sinh(rho)^2)*(sin(chi1)^2)*(sin(chi2)^2)]);

This finds the Christoffel symbols, the Ricci tensor and the Ricci curvature scalar of the 5-dimensional Anti de Sitter spacetime metric.

plotting with Maxima

Maxima integrates well with gnuplot to provide graph plotting. (Note that in Ubuntu GNU/Linux you need the addition package gnuplot-x11 to use gnuplot's full graphical output.)

A selection of examples:

plot2d([parametric, (1+cos(t))*cos(t), (1+cos(t))*sin(t), [t,-%pi,%pi], [nticks,80]],[x, -1,2]);
plot3d (atan (-x^2 + y^3/4), [x, -4, 4], [y, -4, 4], [grid, 50, 50]);

For more examples see Maxima manual: plotting.

integration with GNU Emacs

There is a Maxima-mode for GNU Emacs. For Ubuntu GNU/Linux simply install the maxima-emacs package. So that GNU Emacs knows to use this mode when you edit files with the .max extension, add the following lines to your .emacs file in your home directory:

(setq auto-mode-alist (cons '("\\.max" . maxima-mode) auto-mode-alist))
(setq load-path (cons  "/usr/share/maxima/5.9.2/emacs" load-path ))
(autoload 'maxima "maxima" "Running Maxima interactively" t)
(autoload 'maxima-mode "maxima" "Maxima editing mode" t)


Maxima website

Maxima manual

Maxima tutorial

Introduction to Maxima