# Software for physics calculations

What is some good free software for doing physics calculations?

I'm mainly interested in symbolic computation (something like Mathematica, but free).

-
Related question: Which software(s) handle units and unit conversion best? –  sigoldberg1 Nov 4 '10 at 14:50
Community wiki? (Also: sigoldberg1, can we have a link?) –  David Z Nov 4 '10 at 17:41
@sigoldberg: Google Calculator can perform unit conversion. –  KennyTM Nov 4 '10 at 19:19
Converted to community wiki, as this is the most appropriate question form here. –  Noldorin Dec 24 '10 at 23:45

Some software I have used or has been recommended to me for physics-related work:

• WolframAlpha -- when I don't have Maple around, I use it for simple symbolic calculations
• Maxima -- free open source alternative to Maple/Mathematica
• Sage -- quite an interesting open source symbolic/numerical package, you can try it online at sagenb.org
• Scilab/GNU Octave -- alternatives to Matlab, best if you want to any numerical computations
• R -- powerful programming language used for statistical analysis
• OpenOffice Calc -- I'll put it here for completeness as Excel and its variants seem to be the software of choice for most experimental calculations.
-
Maxima has a units package, as do the commercial software systems. –  sigoldberg1 Dec 24 '10 at 19:17
Maybe throw Gnuplot into the mix? I love it for quick and easy plots of functions and data series, and when I then need something more polished I can very easily reuse the gnuplot code from other examples. Better than pointing and clicking to get results. –  Lagerbaer Apr 3 '11 at 16:11
SymPy should also probably be added to this list. –  Simon Jun 25 '11 at 6:59

It is probably worth your while to buy Mathematica, Maple, or Matlab, depending on your needs. I wish it weren't so, but this is one area in which the commercial tools are still vastly better than their free counterparts.

If you are a student, you can buy these at fairly afforable prices. Maple 14 Student Edition is only $99. Mathematica for Students is \$140, and Matlab/Simulink is \\$99 for students. It is also possible that your school or department already has a site license, allowing you to obtain and use this software for no additional cost.

For symbolic calculations, you want either Mathematica or Maple, with Maple being more user-friendly, and Mathematica being more prevalent (in my experience) in actual research environments. Matlab's focus is on numerical calculations.

-
Not to mention that your institution can probably provide you shared licences (licence server) of Mathematica or Matlab. –  Cedric H. Nov 4 '10 at 23:18

A field-theory motivated approach to computer algebra

I'm really impressed.

-
didn't knew it, +1 –  lurscher Apr 3 '11 at 16:13
Cadabra uses many of the same index algorithms as the Mathematica package xAct. Although xAct is more focused on General Relativity calculations, while Cadabra is more field theory oriented. –  Simon Jun 25 '11 at 6:56

Sage is a Python based system (including Numpy and Scipy) which includes a symbolic computation module.

From the Sage homepage:

Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface. Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.

-
Do you have any experience with it? If so, how does it compare in usefulness to Mathematica? –  nibot Nov 4 '10 at 21:52
I tend to use Python with Numpy barebones as it were, without the Sage environment around it. I prefer the combination of interactive and scripting methodologies which I can use with Python rather than the notebook methodology of Mathematica. Sage (at least through the web interface) is more like Mathematica and does cover many of the things you might do in Mathematica. I do sometimes crank up Mathematica to plot a quick graph (Manipulate is a great exploratory tool) but tend to get aggravated by things I would know how to do easily in Python. –  ihuston Nov 4 '10 at 23:45
If you are into Python, the combination of NumPy, SciPy and matplotlib will cover any need for numerical or scientific computing or graphing you may have. There also is a SymPy for symbolic calculations, but I have never used it. A friend of mine has his own open-source Python library for unit management: juanreyero.com/open/magnitude –  Jaime Dec 27 '10 at 23:34

I'd like to add that GNU Octave is a very good free alternative to Matlab.

Contrary to Scilab which does not aim at being compatible with Matlab, you can practically run your Matlab scripts with Octave with very few modifications (at least with their latest version).

-

GiNaC is a c++ symbolic manipulation framework oriented to high-energy physics computations. It has a couple of interactive frontends, although its main usage is as part of the Root framework at CERN.

A derivative of GiNaC is Pynac, which forms the backend for symbolic expressions in Sage.

-
Can you provide links/descriptions of its frontends? –  Simon Jun 25 '11 at 6:53
i think the most used is "gTybalt" wwwthep.physik.uni-mainz.de/~stefanw//gtybalt.html although i can't asess its usability because i've used ginac mostly as a library in my own code –  lurscher Jun 25 '11 at 11:55
Thanks - I'll have a look at it. I spent some time playing with GiNaC about 1 year ago, but never really used it, since I couldn't justify learning it for my one off calculation. Instead, I took the computationally slow but familiar route of using Mathematica. –  Simon Jun 25 '11 at 13:04