Questions tagged [sage]

SageMath, the Sage Mathematical Software System: free software for Computational Mathematics, based on Python. See longer description for links to other similar-sounding tags.

SageMath

SageMath, formerly SAGE, then Sage, is computational mathematics free software. It includes

SageMath uses the Python language, with a tiny bit of syntactic sugar to ease definition of mathematical objects such as symbolic functions, number fields, polynomial rings. Some parts are written in or C/C++ for speed, but a typical user would only use Python syntax. Python wrappers help call other software included in SageMath pythonically.

It is possible to use SageMath using .

External links

Similar-sounding but unrelated tags

Many other things are called Sage. Please use the appropriate tags.

Only use the tag for questions about SageMath, the Sage mathematics software system.

The TeX.SE website has a [sagetex] tag for SageTeX questions.

MathOverflow also has a [sage] tag for Sage questions.

Note also that Ask Sage, SageMath's questions-and-answers site, and sage-support, the user support mailing list, are very active and that questions asked there typically get answered faster than on the StackExchange network.

934 questions
7
votes
2 answers

solving equations and using values obtained in other calculations - SAGE

the function solve() in SAGE returns symbolic values for the variables i solve the equations for. for e.g: sage: s=solve(eqn,y) sage: s [y == -1/2*(sqrt(-596*x^8 - 168*x^7 - 67*x^6 + 240*x^5 + 144*x^4 - 60*x - 4) + 8*x^4 + 11*x^3 + 12*x^2)/(15*x +…
Harry
  • 71
  • 1
  • 2
7
votes
2 answers

3D scatterplots in sage

Is it possible to create 3D scatterplots in sage? By scatterplot I mean graph like this:
Boris Gorelik
  • 29,945
  • 39
  • 128
  • 170
7
votes
2 answers

using a sage function standalone within python

There is a function within sage, latex, that I want to use in directly from the command line, without dropping into sage the sage client. one way I think this may be possible is to include that sage module into my python script. using pip install…
tipu
  • 9,464
  • 15
  • 65
  • 98
6
votes
1 answer

How to use sagemath on python?

I would like to use cubegroup of sagemath. I did as follows. python -m pip install sagemath and then import sagemath.cubegroup; in python script. But I got the following error. ImportError: No module named cubegroup I tried both python2 and…
nemy
  • 519
  • 5
  • 16
6
votes
1 answer

Is there any way to use SageMath on macOS Big Sur?

I downloaded SageMath-9.2 on my mac, but every time I try to use the notebook by running "sage -n jupyter" on my terminal I get the following massage: Please wait while the Sage Jupyter Notebook server starts... Traceback (most recent call last): …
Safa Amasha
  • 63
  • 1
  • 5
6
votes
3 answers

No module named 'sage.all'

Im going to use sage module in my Django web application so in my python virtualenv v3.6 I installed sage using pip. when I run my script to use sage I get the following error: Exception Value: No module named 'sage.all' I read some posts that…
Nima
  • 490
  • 2
  • 10
  • 19
6
votes
0 answers

KEM/DEM using cryptosystem NTRU on Sage

First of all I must say my knowledge with using Sage math is really very limited, but I really want to improve and to be able to solve these problems I'm having. I have been asked to implement the following: Use an Sage implementation of the…
sharp_c-tudent
  • 463
  • 5
  • 17
6
votes
2 answers

Defining a family of variables in sage

I am trying to migrate my scripts from mathematica to sage. I am stuck in something that it seems elementary. I need to work with arbitrarily large polynomials say of the form a00 + a10*x + a01*y + a20 *x^2 + a11*x*y + ... I consider them…
tst
  • 1,117
  • 2
  • 10
  • 21
6
votes
4 answers

Python (1..n) syntax?

I see in the code on this Sage wiki page the following code: @interact def _(order=(1..12)): Is this (1..n) syntax unique to Sage or is it something in Python? Also, what does it do?
exupero
  • 9,136
  • 8
  • 47
  • 63
6
votes
1 answer

sage math: how to check if two expressions are equivalent?

How can I determine in sage whether two expressions are equivalent? For example: sage: var('x') x sage: e1 = 1 + x sage: e2 = x + 1 sage: e3 = x + 2 sage: is_equivalent(e1, e2) True sage: is_equivalent(e1, e3) False sage: var('y') y sage: e4 = x *…
Oleg
  • 1,659
  • 13
  • 23
6
votes
2 answers

Taking advantage of Sage and IPython notebook in the same page? Or, rather combining them?

I'm new to both Sage and Python. For writing sage program, I went to sagemath cloud, and when I tried to create a new file, I had, among others, two options: sage worksheet and IPython notebook. I noticed both does coloring and indentation. But I…
6
votes
2 answers

Solving Symbolic Boolean variables in Python

I need to solve a set of symbolic Boolean expressions like: >>> solve(x | y = False) (False, False) >>> solve(x & y = True) (True, True) >>> solve (x & y & z = True) (True, True, True) >>> solve(x ^ y = False) ((False, False), (True,…
hola
  • 930
  • 1
  • 17
  • 35
6
votes
3 answers

An algorithm for randomly generating integer partitions of a particular length, in Python?

I've been using the random_element() function provided by SAGE to generate random integer partitions for a given integer (N) that are a particular length (S). I'm trying to generate unbiased random samples from the set of all partitions for given…
klocey
  • 314
  • 5
  • 12
5
votes
1 answer

Installing sage in conda

So I have anaconda installed on windows which I assume is just as good as miniconda and after following the instructions here https://doc.sagemath.org/html/en/installation/conda.html I get the following output. The following packages are not…
Hao S
  • 295
  • 1
  • 2
  • 15
5
votes
1 answer

How to understand suspicious syntax application by the Sagemath library in Python

I'm using Sagemath / Cocalc (feel free to run it in your browser, no sign-up no nothing required). As far as I understand, Sagemath is just a library on top of Python and the Sagemath notebook implicitly imports many things from the Sagemath…
user719220
  • 71
  • 2
1
2
3
62 63