SageMath is a free and open-source application available through GPLv3 license. The application was first released on February 24, 2005. Furthermore, it combines the functionality of numerous open-source packages for study and research on different branches of Mathematics. At the time of writing, the latest stable release of SageMath is 9.0. In this article, we would discuss how to install SageMath in Ubuntu 20.04 LTS release.
The application is written in Python and Cython. And, William A. Stein is its lead developer.
Note: Following operations would require you to have superuser privileges. In case you don't have one, then contact your System Administrator for assistance.
Install SageMath in Ubuntu 20.04 LTS
Since the package is already available through standard Ubuntu repository. Therefore, first update the repository. It will help us get the latest version of the package available. Hence, issue the following in terminal -
sudo apt update
To install SageMath -
sudo apt install sagemath
It will install all the necessary dependencies. Now, we can access SageMath either through our Systems' main menu or from terminal (type sage).
Sage Jupyter Notebook server will start upon launching the applications' GUI, whereas if we try to access it from terminal - SageMath will start from the terminal itself.
In conclusion, we have discussed how to install SageMath in Ubuntu 20.04 LTS release.
Additional Info -
At the beginning, we talked of SageMath being used to work on various problems related to Mathematics. We will illustrate how we can solve simple mathematical problems through SageMaths' Command-line interface -
Problem 1: Solve equations with two variables -
sage: a, b = var('a, b') sage: solve([a+b==7, a-b==3], a, b)
It will return with the output -
[[a == 5, b == 2]]
sage: x = var('x') sage: solve([(5*x+10)/(x+4)==1], x)
[x == (-3/2)]
Problem 3: To plot graphs -
sage: plot(x^2, (x,-3,7))
It will show us the output through ImageMagick application.
Though we just introduced you to solve the most basic Mathematical problems through SageMath. But, it can do much more. It would not be possible for us to cover them all in just few articles. We will come up with more comprehensive ones some time soon.