Mathematica Article Index for
Mathematica
Articles about
Mathematica
Website Links For
Mathematica
 

Information About

Mathematica





Information

  developer Wolfram Research
  operating System Cross-platform (list)
  genre Computer Algebra , Numerical Computations , Information Visualization , Statistics , User Interface Creation
  license Proprietary
  website Mathematica homepage


Mathematica is a general computing environment, organizing many algorithmic, visualization, and user interface capabilities within a document-like user interface paradigm. It was originally conceived by Stephen Wolfram , developed by a team of mathematicians and programmers that he assembled and led, and it is sold by his company Wolfram Research of Champaign, Illinois .

Since version 1.0 in 1988, Mathematica has steadily expanded into more and more general computational capabilities. Besides addressing nearly every field of mathematics, it provides cross-platform support for a wide range of tasks such as giving computationally interactive presentations, a multifaceted language for data integration, graphics editing, and symbolic user interface construction. An organized index of its functionality can be found here .

Many major educational and research organizations have Mathematica site licenses, and individual licenses are also sold. With Mathematica 6, a free player is provided for running programs published on the Wolfram Demonstrations Project website.


OVERVIEW


The Mathematica system is very broad, and provides a systematic interface to all sorts of computations, from traditional numeric and symbolic computation, to visualization, to data format conversion, and the creation of user interfaces.

Mathematica is split into two parts, the "kernel" and the "front end". The kernel is the algorithmic engine for performing computations. The front end provides an interface for creating and manipulating programmatic structures, allowing graphics, mathematics, programs, text, and user interfaces to be freely edited and intermingled. It also provides debugging capabilities, a presentation environment, and interfaces to usb controllers like gamepads. The two communicate via the MathLink protocol. It is possible to use the kernel on one computer and the front end on another, although this is not common.

Mathematica attempts to uniformly capture all aspects of mathematics and computation, rather than just specialized areas. This is made possible by the idea of symbolic programming captured in the Mathematica programming language, emphasing the use of simple tree-like expressions to represent knowledge from a large number of domains. With Mathematica 6, the generality of this approach extends far beyond mathematics, allowing one, for example, to use graphics and even running programs and paste them in as arguments to functions in a piece of code.


Features


Some features of Mathematica include:
  • Several thousand mathematical, visualization, graphics, and general programming functions, many with state of the art implementations

  • Ability to create user interfaces to arbitrary computations by specifying parameters

  • Integrated computable data sources, from chemistry and pure mathematics to city locations and country statistics

  • General interface that allows the uniform manipulation and intermingling of graphics, programs, user interfaces, etc.

  • Support for efficient data structures such as sparse arrays, piecewise functions, etc.

  • Support for emerging fields such as graph plotting and analysis, alternate input devices, and new data formats

  • Ability to create and publish programs that run on the free Mathematica Player



LANGUAGE EXAMPLES

The following Mathematica sequence will find the Determinant of the 6×6 Matrix whose ''i'', ''j'''th entry contains ''ij'' with all zero entries replaced as 1.
In Det[Array[Times, {6, 6}, 0 /. 0 -> 1]
Out {Link without Title} = 0

So the determinant of such a matrix is 0 (i.e. it is Singular ).

The following numerically calculates the root of the equation ''e''''x'' = ''x''2 + 2, starting at the point ''x'' = -1.

In FindRoot[Exp[x == x^2 + 2, {x, -1}]
Out {Link without Title} = {x -> 1.3190736768573652}

Integral and differential Calculus is a strong point, in particular evaluation of integrals in terms of Special Functions . For example:

In Integrate[x/Sin[x , x]//OutputForm
Out x (Log[1 - EI x - Log + EI x ) + I (PolyLog -EI x - PolyLog EI x )

Here, E and I are the base of the Natural Logarithms and \sqrt{-1} respectively, and PolyLog {Link without Title} is the Polylogarithm Function \mathrm{Li}_s\left(z ight).

Many symbolic sums can be calculated. For example:

In Sum[z^k/k^s, {k, 1, Infinity}
Out PolyLog[s, z


Multiple paradigms, one language

Mathematica permits multiple Programming Paradigm atic approaches to programming. Consider a simple example: we want a table of values of gcd(''x'', ''y'') for 1 ≤ ''x'' ≤ 5, 1 ≤ ''y'' ≤ 5.

The most concise approach is to use one of the many specialized functions:

In Array[GCD, {5, 5}
Out {Link without Title} =

There are at least three other approaches to this:
In Table[GCD[x, y , {x, 1, 5}, {y, 1, 5}]
Out {Link without Title} =

An APL -style approach:
In Outer[GCD, Range[5 , Range[5]]
Out {Link without Title} =
Outer corresponds to the outer product operator, Range corresponds to the Iota Operator . The Outer function permits any function, whether it be named, or ''anonymous'', which are functions specified on the fly by using #''n'' to specify the function argument and appending an &. The above function could be equivalently specified as Outer #2 &, Range Range[5 ], but Mathematica permits the above shortcut as well.

An iterative approach:
  • initialize as empty list, since we want a list in the end ---)

  • For[i = 1, i <= 5, i++,

l2 = {};
For[j = 1, j <= 5, j++,
l2 = Append GCD[i, j ]
];
  • append the sublist, that is, the row ---)

  • ]; l1

Out {Link without Title} =
Observe that this solution is considerably larger than the previous ones.


Common structures, common manipulations

One guiding principle in Mathematica is a unified structure behind almost all objects representable in Mathematica. For example, the expression x^4+1 if entered will be represented as if it were written:
In {Link without Title} := x^4 + 1
Out {Link without Title} = 1+x4

If the FullForm command is used on this expression however:
In FullForm[x^4 + 1
Out Plus[1, Power[x, 4 ]

Nearly all objects in Mathematica have the basic form ''head'' ''e''2, ''...'' (which may be displayed or entered in some other fashion). For example, the head of the above example is Plus, and symbols such as ''x'' have form Symbol["x"]. Lists have this structure too, where the head is List.

The principle permits ordinary expressions unrelated to lists to be operated on with list operators:
In Expand[(Cos[x + 2 Log[x^11])/13] 2, 1
Out {Link without Title} = 2/13
The reverse can also occur -- lists can be modified to behave like ordinary expressions:
In Map[Apply[Log, # &, ]
Out {Log[x /Log Log[x /Log Log[x /Log[4]}
where the Apply function changes the head of its second argument to that of the first, and Map behaves like the map Higher-order Function found in many functional languages. Note that Log is the base b logarithm, which is Converted to Log[x /Log[b] on input.

Because of this equivalence between a regular mathematical object represented in Mathematica to that of a simple list structure, some built-in Mathematica functions permit ''threading'', where functions map themselves over lists without much further specification. Indeed, Apply threads itself over lists when invoked as
In Apply[Log, , 1
Out {Log[x /Log Log[x /Log Log[x /Log[4]}
where the third argument being a 1 specifies that Apply replaces the heads of its argument only at the first level in the list, which is what we want, and is equivalent to the above example.


FRONT ENDS


The default Mathematica front end features extensive layout and graphical capabilities. It allows for the formatting of mathematical expression, performs Prettyprint ing (automatic indentation) and provides Mathematica documents in a form called a notebook. In a notebook, user input (both text and Mathematica input) as well as results sent by the kernel (including graphics, sound and interactive interfaces) are placed in a hierarchy of cells which also allows for outlining and sectioning of a document. All notebook contents can be placed in-line within text regions or within input. Starting with version 3.0 of the software, notebooks are represented as expressions that can be created, modified or analysed by the kernel.

Mathematica Player is a front end provided by the manufacturer free of charge, which can read notebooks and perform most of the other functions of the licensed front end. It includes a Mathematica kernel so that calculations can be updated in response to interactive elements. It does not, however, allow new documents to be created.

Mathematica additionally includes a command line front end. An example of a command line session is shown below:

% math
Mathematica 5.2 for Sun Solaris (UltraSPARC)
Copyright 1988-2005 Wolfram Research, Inc.
-- Terminal graphics initialized --

In Solve[x^2 + 2 x - 9 == 0, x

Out {Link without Title} =

The standard Mathematica front end is the most popular, but several alternative front ends are available:

IPAQ PDA accessing a Mathematica kernel is shown. ]]

  • webMathematica allows a web browser to act as a front end to a remote Mathematica server. This allows Mathematica to be used on devices like PDA's (e.g. Pocket PC or similar) for which there is no version of Mathematica available.


  • GUIKit Allows the construction of custom interfaces to Mathematica using the JAVA Swing libraries.


  • JMath is a third party front end based on GNU Readline that runs on UNIX-like operating systems.


  • MASH makes it possible to run self contained Mathematica programs (with arguments) from the UNIX command line.



CONNECTIONS WITH OTHER APPLICATIONS

Communication with other applications occur through a protocol called MathLink . It allows not only communication between the Mathematica kernel and front-end, but also provides a general interface between the kernel and arbitrary applications. Wolfram Research distributes freely a developer kit for linking applications written in the C Programming Language to the Mathematica kernel through ''MathLink''. Two other components of Mathematica, whose underlying protocol is ''MathLink'', allow developers to establish communication between the kernel and a Java or .NET program: ''J/Link'' and ''.NET/Link''.

Using ''J/Link'', a Java program can ask Mathematica to perform computations; also, a Mathematica program can load any Java Class , manipulate Java objects and perform method calls, making it possible, for instance, to build Java Graphical User Interface s from Mathematica. Similarly, a .NET software can invoke the kernel to perform calculations and send results back, and Mathematica developers can easily have access to .NET's functionality.

Communication with SQL databases is achieved through built-in support for JDBC .

Mathematica can install Web Services from a WSDL description.


HIGH PERFORMANCE COMPUTING

In the first versions of Mathematica, performance for large numerical computations lagged way behind specialized software, but recent versions saw great improvement in this area with the introduction of packed arrays in version 4 (1999), sparse matrices in version 5 (2003).

Version 5.2 (2005) added automatic multi threading when computations are performed on modern multi-core computers. This release included CPU specific optimized libraries. In addition Mathematica is supported by third party specialist acceleration hardware such as ClearSpeed .

In 2002 gridMathematica was introduced to allow user level Parallel Programming on heterogeneous clusters and multiprocessor systems and supports grid technology such as the Microsoft Compute Cluster Server .


MATHEMATICA ON THE WEB

Mathematica is used as an input language or as webMathematica to power many websites including:



LICENSING AND PRICING


Mathematica is Proprietary Software protected by both Trade Secret and Copyright law.

A regular single-user license for Mathematica 6.0 for use in the USA costs $2,495 for the Windows, Macintosh, or Linux. Mathematica pricing at Wolfram.com; this includes one year of updates and technical support, a home use license, and a WebMathematica Amateur license. Educational licenses are much cheaper and are fully functional. There are also various network and multi-user licenses.

Comparisons of the prices vary in the international markets depending on the type of license.


ADVANTAGES

The standard Mathematica front end makes laying out computations very simple. For example, users may re-evaluate code by clicking on it and hitting shift-enter. Users may re-evaluate hierarchically-nested blocks of code by clicking on a set of braces and hitting shift-enter. This makes Mathematica ideal for tasks such as doing Homework , as one error early in a computation can be fixed easily and the intermediate computations automatically redone.

Additionally, Mathematica is able to handle arbitrary-precision numbers and rational numbers, as compared to other mathematics programs such as Matlab , Excel , and most standard programming languages.

Mathematica also has very generalized functions (for example, an outer product which takes any type of function), as well as a great variety of functions. As a higher-level multi-paradigm programming language, it requires much less code than most programming languages in order to write the same thing.


CRITICISMS


Mathematica code has been criticized as hard to debug; before version 6, the most common way of debugging programs written for Mathematica was the use of print statements. Version 6 is the first version to include an integrated debugger, as well as syntax highlighting and other typical features of software developing environments. Mathematica's user interface and graphics support was not nearly as intuitive and advanced as its competitors, but version 6 introduced a large variety of new features and integration that may assuage these concerns.

Mathematica has effectively no Undo function as of v6.0. Activating Undo will delete much more code than expected (sometimes the entire document), and there is no Redo function. Thus, anyone who fails to save before hitting Undo may find they have deleted all their work and are unable to get it back.


VERSION HISTORY


Mathematica built on the ideas in Cole and Wolfram's earlier Symbolic Manipulation Program (SMP).

Wolfram Research has released the following versions:
  • Mathematica 1.0 (1988)

  • Mathematica 1.2 (1989)

  • Mathematica 2.0 (1991)

  • Mathematica 2.1 (1992)

  • Mathematica 2.2 (1993)

  • Mathematica 3.0 (1996)

  • Mathematica 4.0 (1999)

  • Mathematica 4.1 (2000)

  • Mathematica 4.2 (2002)

  • Mathematica 5.0 (2003)

  • Mathematica 5.1 (2004)

  • Mathematica 5.2 (2005)

  • Mathematica 6.0 (2007)



SEE ALSO





FOOTNOTES




EXTERNAL LINKS