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

How to properly set up this Sage Cell Server?

I have a question regarding the Sage Cell Server. It is a relatively general question, I don't have any code that I need fixed. I am trying to set up a server but I am finding the world of servers confusing. I've worked plenty with Java and…
user2391236
0
votes
2 answers

Strip double quotes from list

I'm using sage, python and CSV. Here is an example row from my csv file: "(4, 4)",0.921,1.512,1.718,"[[(0, 0, 1), (1, 0, 0)]]","[[(0, 0, 3), (1, 0, 0)]]" I also have: with open('log.csv', 'rt') as logFile: logreader = csv.reader(logFile) …
The Ref
  • 684
  • 2
  • 7
  • 20
0
votes
1 answer

Strange output of a very simple code?

I'm very new to python, but I found this strange: Code: I was typing in Sagemathcloud's sageworksheet file: x=y+1 def f(x): return y x=-1 print(x) print(f(x)) As an output, I kept getting 7 or sometimes 49, something quite randomnumbers no…
0
votes
2 answers

How to input a list of pairs of points in $R^2$ in sage corresponding to edges of a polygon, and to draw a picture of the corresponding polygon,?

Suppose I want to input in Sage a set of pairs of points corresponding to the set of edges of a polygon. For example, say I want to generate a (non-convex) polygon in $R^2$ with the set (list) V of vertices: V= [[0,0], [1,0], [2,1], [2, -1]]. and…
0
votes
2 answers

How to change frame and axes when save plot as eps in sage

I always use show command to change some parameters pic1=plot( Thermo_Cond_Sutra(por=0.4,lamb=2) ,(sw,0,1) ,color='black' ) pic1.show(legend_loc="upper right" ,fontsize=15, frame=True ,axes=False …
Chenming Zhang
  • 2,446
  • 2
  • 26
  • 34
0
votes
1 answer

How to solve discrete time Markov Chains in Sage in a short way

I'm new to Sage. I'm able to solve DTMC on Octave by using this short code: a = 0.2 s = 0.6 P = [ (1-a)*(1-a), (1-a)*a, a*(1-a), a*a; (1-a)*s, (1-a)*(1-s), a*s, a*(1-s); s*(1-a), s*a, (1-s)*(1-a), (1-s)*a; 0, …
Albert Vonpupp
  • 4,557
  • 1
  • 17
  • 20
0
votes
1 answer

How do I create an abstract function that has a given derivative in Sage?

I want to have abstract $f$ function that has a given derivative. But, when I try to substitute it to D[0](f)(t), Sage says: NameError: name 'D' is not defined R. = PolynomialRing(RR,3,'t' 'u1' 'u2') tmp1 =…
Gerard Domek
  • 89
  • 1
  • 6
0
votes
1 answer

Plot theta = pi/4 in sage

How can I plot theta = pi/4 in sage? I tried doing the following p4 = polar_plot(lambda x: pi/4, 0, 2*pi, rgbcolor=hue(0.6)) p4.show() but it doesn't show the desired figure. p4 = polar_plot(lambda x: x, 0, 2*pi, rgbcolor=hue(0.6)) p4.show() shows…
Mestica
  • 1,489
  • 4
  • 23
  • 33
0
votes
1 answer

How to allow for an arbitrary constant in Sage

I'm a calculus student, and I frequently use Sage to check work. Often, it's necessary to allow for a constant difference between two expressions. For instance, when finding an antiderivative, the two results ln(2*x) and ln(x) are equivalent, but of…
Matthew
  • 306
  • 4
  • 17
0
votes
1 answer

How to make nonsymbolic plot_vector_field in sage?

I have a function f(x,y) whose outcome is random (I take mean from 20 random numbers depending on x and y). I see no way to modify this function to make it symbolic. And when I run x,y = var('x,y') d = plot_vector_field((f(x),x), (x,0,1),…
Gerard Domek
  • 89
  • 1
  • 6
0
votes
1 answer

Python/Sage "Unable to coerce I to an integer" Error

My program (at this stage) is trying to use newtons method on a function with complex roots (z^3=2). My code looks like this: f(z)=(z^3-2) p(z)= f(z)-(f(z)/diff(f(z),z)) Where p(z) is Newton's Method var('q') i==1 q[i]=z for i in range (0,9): …
awaitkus
  • 3
  • 1
  • 3
0
votes
1 answer

Installing Sage 6 and opening it on windows 8 PC with 64 bit

This question is mainly about installation of Sage, but I figured I'd give here a try: also in general I'm a bit confused regarding installation of Sage: I went to the download page, after choosing the server close to my…
0
votes
1 answer

Python/Sage Graphing Error

I'm writing a program that has 2 equations and when the first equation,x, becomes equal to 0, I want to graph the original points (which i have set as p and q) picked. My code looks like this: for x in range (0,200): for y in range (0,200): …
awaitkus
  • 3
  • 1
  • 3
0
votes
0 answers

Python Graphing

I'm writing a program that has 2 equations and when the first equation x, becomes equal to 0, I want to graph the original points (which i have set as p and q) picked. My code looks like this: m = Matrix(200,200) n = 0 for x in range (0,200): …
awaitkus
  • 3
  • 1
  • 3
0
votes
2 answers

error in uninstalling emacs in ubuntu

I am new to Linux and using Ubuntu. I was trying to add the sage math mode in emacs. I did something wrong while editing the site-start.el file in ~/.emacs folder and emacs started to do some funny things. By mistake I deleted the emacs folder in…
Anil
  • 3
  • 2