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
4
votes
1 answer

Sage immutable vector error

I'm trying to implement something in sage and I keep getting the following error: *Error in lines 38-53 Traceback (most recent call last): File "/projects/42e45a19-7a43-4495-8dcd-353625dfce66/.sagemathcloud/sage_server.py", line 879, in execute …
Angela
  • 235
  • 3
  • 8
4
votes
1 answer

simpsum in maxima missing basic infinite series identities for : sum(k * x^k, 0, inf)

Maxima's simpsum seems to be lacking some basic identities for infinite series. It has : sum(x^k, k, 0, inf), simpsum=true; but doesn't even have identities for: sum(k * x^k, k, 0, inf), simpsum = true; Is there a more comprehensive series…
daj
  • 6,962
  • 9
  • 45
  • 79
4
votes
2 answers

sage math: how to combine or expand exponents in a symbolic expression?

How can I combine or expand the exponents in an expression in sage? In other words, how can I have sage rewrite an expression from (a**b)**c to a**(b*c), or vise versa? Examples: sage: var('x y') (x, y) sage: assume(x, 'rational') sage: assume(y,…
Oleg
  • 1,659
  • 13
  • 23
4
votes
1 answer

Sage Notebook server post/get

I followed the instructions to install sagenb. Once this was done I ran sage: import sagenb.notebook.notebook_object as nb sage: nb.notebook(directory="mynotebook") And got my server running. However, I want to be able to SEND data to the server…
user2391236
4
votes
1 answer

How to make "cases" or "if, then" depending on comparison operator used in Sage

I have some function which returns inequalies for example s= solve(x^(2)<4,x) s [[x>-2, 2
4
votes
2 answers

How does Sage's "var" work?

In trying to create a Python function similar to Sage's var() or function(), I've encountered an apparently not-so-trivial problem in Python. Essentially, calling var('x') in Sage not only returns a Sage symbolic expression, but does the equivalent…
Socob
  • 1,189
  • 1
  • 12
  • 26
4
votes
4 answers

IPython, Sage, Dependencies, Anaconda, and Package Integration?

I've just started using IPython for interactive development and exploratory research, which I've found really exciting with all the cool features and possibilities. I am using the Anaconda package manager to manage dependencies, which includes…
Stix
  • 159
  • 9
4
votes
2 answers

How do I change the version of R that Sage integrates with?

I'm on a Mac OSX 10.8.3 and running Saga 5.9. Sage uses R 2.15.2 as its default version of R, whereas in RStudio where I do most of my statistical work, I use R 3.0.1 (newest version), but Sage connects with R 2.15.2 in my Terminal. How do I make…
Brandon Sherman
  • 673
  • 1
  • 8
  • 25
4
votes
1 answer

Sage importing from csv and plotting numbers larger than 10

Okey, problem is simple: I try to draw a simple scatter plot: import csv a = csv.reader(open(DATA+'testi1.csv')) G = Graphics() for col in a: time = col[0] conversion = col[2] x_series = time y_series = conversion plot =…
4
votes
3 answers

Python sage: How do I computer a nullspace (kernel) for a stoichiometric matrix?

In a desperate attempt to switch from Matlab to python, I am encountering the following problem: In Matlab, I am able to define a matrix like: N = [1 0 0 0 -1 -1 -1 0 0 0;% A 0 1 0 0 1 0 0 -1 -1 0;% B 0 0 0 0 0 1 0 1 0…
Mark Anderson
  • 2,399
  • 3
  • 15
  • 21
4
votes
3 answers

How to add titles, axis label, and legend in sagemath?

I'm currently making some graphs using the online workbook hosted by sagemath. This is an example of some code I'm making to try and generate a graph: myplot = list_plot(zip(range(20), range(20)), color='red') myplot2 = list_plot(zip(range(20), [i*2…
Michael0x2a
  • 58,192
  • 30
  • 175
  • 224
3
votes
1 answer

What does a solution like r5 or c15415 mean when i use solve() from SageMath (Python)?

i implemented a system of complex valued functions and i solved it with sagemath's "solve" method. In my solutions array i find entries like: x1 == r5 or for different cases x1 == c15403. (and so on with diffent numbers) Does the r5 stand for an…
Bla Bla
  • 33
  • 4
3
votes
1 answer

Add SageMath to pylance

I am using VSCode to write some SageMath code in a Jupyter notebook. Everything works fine and I can run my code but Pylance underlines all Sage imports and reports them as missing I have tried adding the path…
3
votes
1 answer

Multivariate polynomial division using Sage

I'm just starting to learn Sage and I'm trying to find some method to do polynomial divisions in several variables. An example of the calculations that I want to do can be the division of the polynomial f(x)=x^2*y+x*y^2+y^2 with the polynomials…
user18933929
3
votes
1 answer

equality between symbolic vectors in sagemath

I am trying to solve an equation of type x = A x where x is a vector and A is a matrix, using sagemath. to do that, I wrote A = matrix(QQ, [[0, 4, 4], [1, 2, 2], [1, 2, 0]]) x = vector([var("x_1"), var("x_2"),…
tbrugere
  • 755
  • 7
  • 17