Mathematica

from Wikipedia, the free encyclopedia
Wolfram Mathematica

MathematicaSpikeyVersion8.png
Mathematica logistic bifurcation.png
Basic data

developer Wolfram Research
Publishing year June 23, 1988
Current  version 12.1.0
(March 18, 2020)
operating system Windows , macOS , Linux , Solaris
programming language C , C ++ , Java
category Computer algebra system , information visualization , statistics software , graphic user interface
License Proprietary software
wolfram.com/products/mathematica

Mathematica is a proprietary software package from Wolfram Research and is one of the most widely used mathematical and scientific program packages . Mathematica 1.0 was launched in 1988.

Mathematica program package

The software package "Mathematica" contains among other things

Author and company founder Stephen Wolfram began development work in 1986, and the first version of Mathematica was released in 1988. According to Wolfram, the name Mathematica was suggested by Steve Jobs .

Use and working method

Dini area plotted with variable parameters

Mathematica differentiates between the kernel , which does the actual calculations, and the notebook , which is a pure graphical user interface . The program is usually used by the notebook, which displays the input / output formatted. The notebook also has word processing functions and allows graphics to be displayed and manipulated. A special feature is also the extensive support for special mathematical characters that can be used in Mathematica (in contrast to traditional programming languages) at any point (also as variable names).

The evaluation or processing of the program code usually takes place immediately after the entry by the kernel (as an interpreter ), results or programming errors are thus immediately apparent, and interactive programming can take place. If the program code is run through several times, for example when the program is called non-interactive, the program code is automatically compiled . The program code is independent of the operating system. Mathematica is offered for Windows , Linux and macOS , up to and including version 6.0.3 also for MS-DOS , NeXT , OS / 2 , Unix and VMS .

From version 8 onwards, the so-called free form input is available in Mathematica, which makes it possible to use "natural" English instead of entering the correct syntax for calculations and other commands. An internet connection is required for this. For example, the same result - the graph of the sine function with light red fill and dashed lines - is obtained if one

Show[
  Plot [Sin [x], {x, -6.6, 6.6},
    Filling -> Axis,
    FillingStyle -> Lighter [Red]
  ],
  GridLines -> Automatic,
  GridLinesStyle -> Dashed
]

as well as using the free form input

plot sin x with light red filling and dashed grid lines

as an order takes. After you have issued a command with free form input , you can have it translated into the exact syntax and make more precise changes, so that knowledge of the syntax is still a great advantage.

Mathematica is used in science or in the study of natural sciences or economics. It is also aimed at professional users in industry and business. For example, banks use Mathematica to simulate share price developments, evaluate derivatives , assess or convert risk, and so on. The requirement for the correctness of the results (analytical as well as numerical) is therefore high.

In addition to the basic arithmetic operations , derivation and integral calculations , solving systems of equations , matrix manipulation and numerical calculations in any precision (no restriction on machine precision), a large number of special functions, e.g. from the areas of combinatorics , are implemented. The Mathematica programming language includes implicit type assignment and conversion, automatic memory management, and pattern matching techniques . Since the end of 2013, the Wolfram Language programming language has been distributed independently of Mathematica.

language

The programming language of Mathematica ( Wolfram Language ) is closely based on the functional programming language Lisp . In addition, Mathematica is essentially based on pattern matching (like, for example, Haskell ). This causes confusion, especially for beginners, because patterns , i.e. pattern placeholders, appear as soon as you work with functions. Together with the almost constantly used square brackets, this creates a code appearance that is very different from the common C -like programming languages. For Mathematica, the following definition is not a function, but a replacement rule, where every occurrence of f[irgendwas]is irgendwas + irgendwasreplaced by, where irgendwasliterally anything can be:

f[x_] = x + x

A real function in the sense of functional programming / the lambda calculus , however, is Functiongenerated by: f = Function[x, x + x]

The advantage of pattern matching in computer algebra is that you can write complicated replacement rules in compact form. A function defined in sections could be defined using matching rules as follows:

g[x_ /; x < 7] = 2*x;
g[x_ /; x > 7] = 3*x;

Calls g[3]are thus 2*3=6evaluated as, whereas g[10]the evaluation 3*10=30results.

Representation of the expression Plus[a,Sin[Times[b,c]]]as a TreeForm

Like Lisp , Mathematica has the property of homonicity . This means that Mathematica code and the result of a calculation consist of the same type of data. Mathematica statements, like outputs, are actually trees , and evaluating an input is transforming such a tree. For this reason, the first element of a Mathematica expression is also called a head , in the following example the head is the plus statement :

Plus [a, Sin [Times [b, c]]]

Represented as a tree, this expression looks like the one shown on the right. The head (i.e. the root node) of the tree is the function Plus. Mathematica knows different ways of representing input / output. In natural notation, this expression corresponds to the more readable one a + Sin[b*c]

As a computer algebra system, Mathematica supports the processing of any symbols in such expressions. A list of replacement rules is used to transform these expressions into other trees. Complex invoices are possible when assembled in this way. Mathematica is thus typed dynamically . In contrast to other languages, a line that cannot be evaluated is generally not an error in Mathematica, but remains unchanged as a return.

The programmer is not tied to a single programming paradigm , but can also program imperative instructions. With tens of thousands of built-in functions, you can write large programs very quickly.

Language examples

Example 1: prime numbers

Several prime numbers are calculated by the function

In[1] := Prime /@ Range[5]
Out[1] = {2, 3, 5, 7, 11}

Example 2: Average value calculation

Below are three ways to use Mathematica to calculate the mean of a list of values. In interactive mode, Mathematica numbers the inputs and outputs and delivers the results directly.

Define list of values:

In [1]: = myData = Range [8]
Out [1] = {1, 2, 3, 4, 5, 6, 7, 8}

Use Mathematica's own function:

In [2]: = Mean [myData]
Out [2] = 9/2

Use list manipulation:

In [3]: = Plus @@ myData / Length [myData]
: Out [3] = 9/2

Procedural approach:

In [4]: ​​= '' 'sum = 0' ''
Out [4] = 0
In [5]: = For [j = 1, j <= Length [myData], j ++, sum + = myData [[j]]]
In [6]: = sum / length [myData]
Out [6] = 9/2

history

version publication
1.0 June 23, 1988
1.1 October 31, 1988
1.2 August 1, 1989
2.0 January 15, 1991
2.1 June 15, 1992
2.2 June 1, 1993
3.0 September 3, 1996
4.0 May 19, 1999
4.1 November 2, 2000
4.2 November 1, 2002
5.0 June 12, 2003
5.1 October 25, 2004
5.2 June 20, 2005
6.0 May 1, 2007
7.0 November 18, 2008
7.0.1 March 5, 2009
8.0 November 15, 2010
8.0.1 March 7, 2011
8.0.4 October 24, 2011
9.0 November 28, 2012
9.0.1 January 30, 2013
10 July 9, 2014
10.0.1 17th September 2014
10.0.2 15th December 2014
10.1 March 31, 2015
10.2 July 14, 2015
10.3 15th October 2015
10.3.1 December 16, 2015
10.4 March 2, 2016
10.4.1 April 18, 2016
11 August 9, 2016
11.0.1 September 28, 2016
11.1 March 16, 2017
11.1.1 April 25, 2017
11.2 September 14, 2017
11.3 March 8, 2018
12.0 April 16, 2019
12.1 March 18, 2020

Problems

In 2014, three mathematicians published that Mathematica gave incorrect results when computing determinants of certain matrices with quite large integers (10,000 digits). This error was reported in 2013 and was not rectified even after more than a year; however, the presentation by Wolfram Research contradicts this information in parts and assumes a new error. The calculation error ( CASE: 303438 ) has been corrected from version 11.1 and is no longer available.

See also

literature

  • Hans Benker: MATHEMATICA compact: Mathematical problem solutions for engineers, mathematicians and natural scientists. Springer, Berlin / Heidelberg 2016, ISBN 978-3-662-49610-7 .
  • Stephen Wolfram: An Elementary Introduction to the Wolfram Language. Wolfram Media, Inc., Champaign, IL. 2015, ISBN 978-1-944183-00-4 .
  • Knut Lorenzen: Introduction to Mathematica: Includes the free version 10 for the Raspberry Pi. Mitp Verlags GmbH & Co., 2014. ISBN 978-3-8266-9666-4 .
  • Axel Kilian: Programming with Wolfram Mathematica. Springer, Berlin / Heidelberg 2009, ISBN 978-3-642-04671-1 .
  • Michael Trott: The Mathematica GuideBook for Symbolics. Springer, 2006.
  • Michael Trott: The Mathematica GuideBook for Programming. Springer, 2004.
  • Michael Trott: The Mathematica GuideBook for Numerics. Springer, 2006.
  • Michael Trott: The Mathematica GuideBook for Graphics. Springer, 2004.
  • Stephen Wolfram: The Mathematica Book . 5th edition. Wolfram Media, 2004, ISBN 1-57955-022-3 .
  • Leonid Shifrin: Mathematica programming . ( mathprogramming-intro.org - free e-book).
  • David B. Wagner: Power Programming With Mathematica: The Kernel . McGraw-Hill Education, 1996, ISBN 0-07-912237-X ( dropbox.com [PDF] free e-book on Mathematica).

Web links

Commons : Mathematica  - collection of images, videos and audio files

Individual evidence

  1. ^ Mathematica 12.1. Wolfram.com, accessed March 18, 2020 .
  2. In Less Than a Year, So Much New: Launching Version 12.1 of Wolfram Language & Mathematica. https://blog.stephenwolfram.com , accessed on March 18, 2020 (English).
  3. ^ A b The Software Engineering of Mathematica . 2012 (accessed January 7, 2019).
  4. ^ Barak Katz: Introduction to Mathematica. (PDF; 1.6 MB) 2008, accessed on March 27, 2020 (English).
  5. Paritosh Mokhasi: Solving Differential Equations in Mathematica. In: WOLFRAM Computation meets knowledge. Retrieved March 27, 2020 (English, website with embedded video).
  6. Stephen Wolfram: Mathematica. A System for Doing Mathematics by Computer . Addison-Wesley Publishing Company, 1988, ISBN 0-201-19334-5 , pp. XVIII .
  7. Stephen Wolfram: Steve Jobs. A few memories. In: Stephen Wolfram. Writings. October 6, 2011, accessed March 6, 2020 .
  8. wolfram.com ( Memento of the original from April 14, 2012 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. Video about the free form input @1@ 2Template: Webachiv / IABot / www.wolfram.com
  9. wolfram.com free form linguistic input
  10. Heise, November 15, 2013: Mathematica boss Wolfram announces programming language , manufacturer link: Wolfram Programming Language
  11. wolfram.com Wolfram Language - knowledge-based programming
  12. Error outputs are still possible, e.g. B. when passing unsuitable arguments to a (built-in) function such as Plot.
  13. heise.de