Computing for mathematics
=========================
- Should you use computers (for mathematics)?
- Overview of relevant computing domains
- Getting started
- Features of 5 popular computer algebra systems
1. Mathematica
2. Maple
3. Macaulay2
4. Sage
5. LiE
- Examples
1. (Geogebra) How do you draw cubes in perspective?
2. (Mathematica) Which smooth plane curves are conics?
3. (Mathematica) What is the outline of a torus?
4. (Macaulay2) Conditions for matrix factorization
5. (Processing) What do closed geodesics on hyperbolic surfaces look like?
6. (LiE)
\
\
\
Should you use computers (for mathematics)?
-------------------------------------------
For many years I explicitly avoided learning how to use computers for mathematics calculations, experimentation, or research.
It is just incorrect to regard technology as a neutral means. [Technological instrumentalism](https://en.wikipedia.org/wiki/Instrumental_conception_of_technology) has been thoroughly debunked.
If you make computing technology convenient and available to yourself, or if you spend time learning how to interact with it, **it will change how you think** about your study and research.
**+** Computers can save you an enormous amount of time
**-** Computers can inhibit deep thinking
\
\
\
Overview of relevant computing domains
-----------------------------
- General purpose computing
- Documents, presentation
- TeX, Latex, BibTeX, ConTeXt, beamer, HTML
- Organization, collaboration (text editors, browsers, blogging, networking)
- e.g. ssh->lynx->MathSciNet
- emacs, git, databases
- Not just for office people; personal administration
- Numerics and statistics
- Engineering, physical simulation
- Probabilistic experimentation
- e.g. MATLAB, or general purpose programming languages (C, Java, Python, Lisp)
- many, many platforms
- Visualization
- Low-dimensional algebraic and differential geometry, analysis
- e.g. Mathematica, Maple, (Sage, Processing, ...CAD?)
- Synthetic geometry
- Geogebra ...
- Computer algebra systems (slight misnomer)
- Symbolic mathematics
- Linear and polynomial algebra, rings, ideals
- Arithmetic geometry
- Combinatorics
- e.g. Macaulay, Sage, Maple, LiE, Mathematica ...
\
\
\
Getting started
---------------
**Macaulay2**, **Sage**, and **LiE** are free and open-source software. Just download/compile. (Sage is even available for Windows).
**Mathematica** and **Maple** are proprietary. They are licensed to SBU for your personal use; Stony Brook "Softweb".
If you have an internet connection and a terminal emulator, you can access Mathematica, Maple, or Macaulay2 remotely on
the math department servers:
```
$ ssh jmath@math.sunysb.edu
$ jmath@math.sunysb.edu's password:
...
$ /opt/mathematica10.3/wolfram
$ M2
$ maple
```
\
\
\
Features
-----------
### Mathematica
- Though the preferred usage is with the notebook-style graphical frontend, it has a powerful text-mode backend
- Big project. Well funded, documented, and maintained
- "Lingua franca" effect
- General purpose, no fixed paradigm: Numerical, Visualization, Symbolic
- "Intelligent" solvers, extensive implementation of calculus, special functions
- Efficient, capable, and customizable 2d/3d visualization and animation
- Not *great* for tensor algebra or combinatorics
### Maple
- Only major competitor with Mathematica
- Graphical frontend less emphasized than in Mathematica, pretty good text-mode backend
- Also a big project, and well funded, documented, and maintained
- Also general purpose: Numerical, Visualization, Symbolic
- Some "intelligent" solvers
- Ok for tensor algebra or combinatorics
- My impression is that the ring-theoretic and differential systems support is better than Mathematica
### Macaulay2
- Very small group of official creators/maintainers (Daniel Grayson, Michael Stillman); lots of community extensions
- Mainly symbolic matrix and polynomial algebra, rings, ideals, algebraic geometry
- A real programming environment: Control structures, functions, and variables are intuitive
### Sage
- Becoming a serious competitor of the proprietary big two, Mathematica and Maple
- More extensible than the big two (more likely to have a wacky user-contributed library you want)
- Big project, well-funded (!), but free/open and mainly community-maintained
- General purpose: Visualization and symbolic computer algebra, linear algebra, group theory
- Like M2, a real programming environment (in fact, it is based on Python)
### LiE
- Small stable project, dating to 2000
- Special purpose: Representation theory combinatorics. Lie algebras, weights, roots, plethysms
- Mini-programming environment, with charming little Lie theory glossary (`learn ...`)
\
\
\
Examples
--------
### Geogebra
### Mathematica examples
Which smooth plane curves are conics?
```
EQ=a+b*x+c*f[x]+d*x^2+e*f[x]^2+k*x*f[x]
EQ1=D[EQ,x]
EQ2=D[EQ1,x]
EQ3=D[EQ2,x]
EQ4=D[EQ3,x]
EQ5=D[EQ4,x]
Eliminate[EQ1==0 && EQ2==0 && EQ3==0 && EQ4==0 && EQ5==0,{a,b,c,d,e}]
```
What's the outline of a torus?
![](torus2PointsOfView.png)
Some animations:
- [Quadrics tangent to torus](http://www.math.stonybrook.edu/~jmath/pill.mp4)
- [Quadrics tangent to two spheres](http://www.math.stonybrook.edu/~jmath/cd.mp4)
### Macaulay2 example
Which matrices have a factorization [(orthogonal) x (anti-symmetric)](https://en.wikipedia.org/wiki/Essential_matrix)?
### Processing (Java) example
What do the closed geodesics look like on surfaces of constant negative curvature?
Matt Genkin wrote a program this summer 2016 that shows you in the case of the 3-punctured sphere. [Its on GitHub](http://github.com/mgenkin/geodesics_on_pants).
### LiE example