Extensive open-source scientific package
SageMath is a giant project in the field of open source scientific packages. It is a collection of more than 80 different open source projects integrated into a single user interface with Python as the language that connects everything. SageMath was to be used for research and teaching of pure and applied mathematics, but that does not mean that it can not be used in other areas of science and engineering.
Additional information
SageMath is a free open-source mathematics software system licensed under the GPL. It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more.Access their combined power through a common, Python. Next, we will have Sage create graphs p1, p2, p3, and p4, for four solutions to the differential equation, with an initial condition from each quadrant.
To install Sage Math, enter the command sudo apt install sagemath. Sagemath-common (which you installed) is one of the dependencies of the whole package. When you install sagemath, it would install all the required dependencies. SageMath ebuilds are not present in the Funtoo portage tree. Instead these are available through separate overlays (repositories). To install SageMath on Funtoo Linux the overlay sage-on-gentoo is required, together with dependencies found in the overlay science.
- 8.9
- 2019-10-26
- 672
- Free
- 863.8MB
- Windows 7+
- Free Developer Tools/ Programming languages
- filename
Download SageMath latest version
You may like
Other versions
Old versions SageMathSagemath Online
SageMath (formerly Sage) is a program for numerical and symbolic mathematical computation that uses Python as its main language. It is meant to provide an alternative for commercial programs such as Maple, Matlab, and Mathematica.
SageMath provides support for the following:
- Calculus: using Maxima and SymPy.
- Linear Algebra: using the GSL, SciPy and NumPy.
- Statistics: using R (through RPy) and SciPy.
- Graphs: using matplotlib.
- An interactive shell using IPython.
- Access to Python modules such as PIL, SQLAlchemy, etc.
Installation
- sagemath contains the command-line version;
- sagemath-doc for HTML documentation and inline help from the command line.
- sagemath-jupyter includes a kernel for the Jupyter notebook interface.
sage -i
, in fact this command will not work if you installed SageMath with pacman.Usage
SageMath mainly uses Python as a scripting language with a few modifications to make it better suited for mathematical computations.
SageMath command-line
SageMath can be started from the command-line:
For information on the SageMath command-line see this page.
The command-line is based on the IPython shell so you can use all its tricks with SageMath. For an extensive tutorial on IPython see the community maintained IPython Cookbook.
Note, however, that it is not very comfortable for some uses such as plotting. When you try to plot something, for example:
SageMath opens the plot in an external application.
Jupyter Notebook
SageMath also provides a kernel for the Jupyter notebook in the sagemath-jupyter package. To use it, launch the notebook with the command
and choose 'SageMath' in the drop-down 'New...' menu. The SageMath Jupyter notebook supports LaTeX output via the %display latex
command and 3D plots if jmol is installed.
Sage Notebook
A better suited interface for advanced usage in SageMath is the Notebook (sage-notebookAUR).
To start the Notebook server from the command-line, execute:
The notebook will be accessible in the browser from http://localhost:8080 and will require you to login.
However, if you only run the server for personal use, and not across the internet, the login will be an annoyance. You can instead start the Notebook without requiring login, and have it automatically pop up in a browser, with the following command:
Cantor
Cantor is an application included in the KDE Edu Project. It acts as a front-end for various mathematical applications such as Maxima, SageMath, Octave, Scilab, etc. See the Cantor page on the Sage wiki for more information on how to use it with SageMath.
Sagemathcloud
Cantor can be installed with the cantor package or as part of the kde-applications or kde-education groups, available in the official repositories.
Optional additions
SageTeX
If you have TeX Live installed on your system, you may be interested in using SageTeX, a package that makes the inclusion of SageMath code in LaTeX files possible. TeX Live is made aware of SageTeX automatically so you can start using it straight away.
As a simple example, here is how you include a Sage 2D plot in your TEX document (assuming you use pdflatex
):
- include the
sagetex
package in the preamble of your document with the usual
- create a
sagesilent
environment in which you insert your code:
- create the plot, e.g. inside a
float
environment:
- compile your document with the following procedure:
- you can have a look at your output document.
The full documentation of SageTeX is available on CTAN.
Troubleshooting
TeX Live does not recognize SageTex
If your TeX Live installation does not find the SageTex package, you can try the following procedure (as root or use a local folder):
Sagemathcell
- Copy the files to the texmf directory:
- Refresh TeX Live: