# Maxima (software)

Maxima (/ˈmæksɪmə/) is a powerful software package for performing computer algebra calculations in mathematics and the physical sciences. It is written in Common Lisp and runs on all POSIX platforms such as macOS, Unix, BSD, and Linux, as well as under Microsoft Windows and Android. It is free software released under the terms of the GNU General Public License (GPL).

## History

Maxima is based on a 1982 version of Macsyma, which was developed at MIT with funding from the United States Department of Energy and other government agencies. A version of Macsyma was maintained by Bill Schelter from 1982 until his death in 2001. In 1998, Schelter obtained permission from the Department of Energy to release his version under the GPL. That version, now called Maxima, is maintained by an independent group of users and developers. Maxima does not include any of the many modifications and enhancements made to the commercial version of Macsyma during 1982–1999. Though the core functionality remains similar, code depending on these enhancements may not work on Maxima, and bugs which were fixed in Macsyma may still be present in Maxima, and vice versa. Maxima participated in Google Summer of Code in 2019 under International Neuroinformatics Coordinating Facility.

## Symbolic calculations

Like most computer algebra systems, Maxima supports a variety of ways of reorganizing symbolic algebraic expressions, such as polynomial factorization, polynomial greatest common divisor calculation, expansion, separation into real and imaginary parts, and transformation of trigonometric functions to exponential and vice versa. It has a variety of techniques for simplifying algebraic expressions involving trigonometric functions, roots, and exponential functions. It can calculate symbolic antiderivatives ("indefinite integrals"), definite integrals, and limits. It can derive closed-form series expansions as well as terms of Taylor-Maclaurin-Laurent series. It can perform matrix manipulations with symbolic entries.
Maxima is a general-purpose system, and special-case calculations such as factorization of large numbers, manipulation of extremely large polynomials, etc. are sometimes better done in specialized systems.

### Numeric calculations

Maxima specializes in symbolic operations, but it also offers numerical capabilities such as arbitrary-precision integer, rational number, and floating-point numbers, limited only by space and time constraints.

### Programming

Maxima includes a complete programming language with ALGOL-like syntax but Lisp-like semantics. It is written in Common Lisp and can be accessed programmatically and extended, as the underlying Lisp can be called from Maxima. It uses gnuplot for drawing.
For calculations using floating point and arrays heavily, Maxima has translators from the Maxima language to other programming languages (notably Fortran), which may execute more efficiently.

## Interfaces

Various graphical user interfaces (GUIs) are available for Maxima:
* wxMaxima is high-quality graphical front-end using the wxWidgets framework. wxMaxima provides a cell structure similar to the Mathematica notebook as shown in the figure to the right. Sessions in wxMaxima can be saved in a variety of file formats for later use.
* There is a kernel for Project Jupyter, a flexible, notebook-style GUI written in Python.
* Cantor, using Qt, can interface with Maxima (along with SageMath, R, and KAlgebra)
* The GNU TeXmacs and LyX mathematical editor programs can be used to provide an interactive GUI for Maxima, as can SageMath. Other options include the Imaxima front end, as well as an Emacs and XEmacs interaction mode which is activated by Imaxima.
* Climaxima, a CLIM-based front-end.

## Examples of Maxima code
### Basic operations
#### Arbitrary-precision arithmetic

$1.41421356237309504880168872420969807857\cdot 10^{0}$

#### Function

$64$

#### Expand

$-b^{3}+3ab^{2}-3a^{2}b+a^{3}$

#### Factor

$(x-1)(x+1)$

### Solving equations

$x^{2}+a\ x+1=0$
$[x=-{\Biggl{\frac {{\sqrt {a^{2}-4}}+a}{2}}{\Biggr )},x={\frac {{\sqrt {a^{2}-4}}-a}{2}}]$

### Solving equations numerically

$\cos x=x$
$0.7390851332151607$
$7.3908513321516064165531208767387340401341175890076\cdot 10^{-1}$

### Indefinite integral

$\int x^{2}+\cos x\ dx$
$\sin x+{\frac {x^{3}}{3}}$

### Definite integral

$\int _{0}^{1}{\frac {1}{x^{3}+1}}\,dx$
${\frac {{\sqrt {3}}\log 2+\pi }{3^{\frac {3}{2}}}}$

### Numerical integral

$\int _{0}^{2}\sin(\sin(x))\,dx$
$1.247056058244003$

### Derivative

${d^{3} \over dx^{3}}\cos ^{2}x$
$8\cos {x}\sin {x}$

### Limit

$\lim _{x\to \infty }{\frac {1+\sinh {x}}{e^{x}}}$
${\frac {1}{2}}$

### Number theory

$[11,13,17,19]$
$55$

### Series

$\sum _{x=1}^{\infty }{\frac {1}{x^{2}}}$
${\frac {\pi ^{2}}{6}}$

### Series expansion

$x-{\frac {x^{3}}{6}}+{\frac {x^{5}}{120}}-{\frac {x^{7}}{5040}}+{\frac {x^{9}}{362880}}$
$\sum _{i=0}^{\infty }{\frac {(-1)^{i}x^{2i}}{(2i)!}}$

### Special functions

$-0.3205425089851214$
$0.07174949700810543$