Questions tagged [sagemath]

For questions concerning the mathematical software system SageMath.

Filter by
Sorted by
Tagged with
1
vote
1answer
49 views

How does “substituting $x=x$” change the behavior of this Sage function?

TL/DR: Why do the Sage functions defined below behave differently? Consider the following recursively-defined sequence of functions, $g_n: \mathbb{R}\to\mathbb{R}$: $$ g_0(x) = 1, $$ and for $n\geq 1$...
1
vote
0answers
41 views

How to avoid nested loops intelligently with the computer when solving Diophantine equations with finite range of variables?

I have 59 quadratic equations in 59 variables $\{x_1, ..., x_{59}\}$ and I'm interested in the integer solutions of this equation system, where all $x_i$ can have values only between $-100$ and $+100$....
0
votes
0answers
23 views

Mordell Weil group (and other elliptic curves) computations using SageMath(jupyter or offline version)

I apologise in advance if the question of this sort is not appropriate for this site. I am new to SageMath and have been exploring computations related to elliptic curves with it, this hasn't been a ...
2
votes
0answers
56 views

Is there a CAS that can compute a direct product decomposition of modular group algebras?

Let $G$ be a finite group and $k$ be a finite field of characteristic $p>0$ such that $p\mid |G|$. Is there a computer algebra system which can compute a direct product decomposition of such ...
1
vote
2answers
58 views

Find $a, b, c$ such that element $x=a\alpha^2+b\alpha+c \in \mathbb{Q}[x]/\langle x^3+x+11 \rangle$

I'm trying to generate a fundamental unit of the number field $K=\mathbb{Q}(\alpha)$, where $\alpha^3+\alpha+11$. I found a non-trivial unit and I need to find $a,b,c\in\Bbb{Q}$ such that $$\frac{(-...
0
votes
0answers
33 views

Partial sums of the Dedekind zeta function

Is there a way to find the partial sums of the Dedekind zeta function? In particular, I would like to find the sum $$\sum_{0 \neq I \subset\mathcal{O}_K \\N(I) \le n} \frac{1}{N(I)^s}$$ for a given $n$...
0
votes
0answers
35 views

Inf and sup methods in Sage

In an exercice using Sage, I would need a method that returns the sup/inf of an interval, in such a way as to be able to use that value futher down in the code. Someting like $\mathtt{inf}([x>3])$ ...
4
votes
1answer
115 views

Having trouble computing some minimal polynomial of a complicated primitive element over $\mathbb{Q}_3(i,\sqrt[4]{-3})$

Let $K = \mathbb{Q}_3(i,\sqrt[4]{-3})$, $L$ and $F$ be the extensions of $K$ given by $L = K(\sqrt[3]{2})$ $F = K(\zeta_7)$ where $\zeta_7$ is the primitive $7$-th root of unity given by $$\min_K x^3 ...
2
votes
1answer
49 views

What are matrix spaces used for in Sage?

What are some computations/ calculations in Sagemath which are done better/ more elegantly because of the existence of matrix spaces? Most of the times it seems to me that constructing matrices with <...
1
vote
1answer
22 views

Casting and Partial Fractions for symbolic generating function?

This is probably a silly question, but I can't seem to find an answer anywhere. It seems odd to me that Sage should allow us to get a series expansion for a generating function, but won't allow us to ...
5
votes
1answer
69 views

Are results found of an Elliptic Curve by SageMathCell proven (does there exists no more solutions)?

Well, I have for example the following SageMathCell-code: ...
1
vote
1answer
31 views

Strange outcomes for ring of integers in Sage

The number field is $K=\mathbb{Q}(\alpha)=\mathbb{Q}[x]/(f)$ with $\alpha=\sqrt[4]{24}$ and $f=x^4-24$. Now Sage tells me that $\Delta(f)=-2^{17}\cdot3^3$ and $\Delta_K:=\Delta(\mathscr{O}_K)=-2^{11}\...
1
vote
1answer
52 views

Sage/Python program to compute irreducible characters of symmetric groups

Is there a Sage/Python/ Octave program to compute the irreducible characters of symmetric groups corresponding to different conjugacy classes? The irreducible characters can be calculated using the ...
0
votes
1answer
35 views

Membership in an ideal

I have just started reading Cox, Little, and O'Shea's book Ideals, Varieties, and Algorithms, and I am working through exercise 1.4.1 and am confused. I am hoping someone here will be able to spot ...
0
votes
0answers
40 views

Show the following points are independent on elliptic curve $y^2=x^3-82x$ using Sage. [duplicate]

How to show that the following points are independent on elliptic curve $y^2=x^3-82x$ using Sage or any other software. There is some determinant of certain matrix which I need to compute ...
0
votes
0answers
12 views

sagemath 3d plot tumble (enhanced spin)?

I am experimenting with SageMath today; I am new to SageMath. In cocalc.com I found this demo: show(icosahedron(color='green', opacity=.5, mesh=3), spin=1) Are ...
0
votes
0answers
105 views

Genus of a curve equals to -1 in SageMath

What does it mean when Sage computes genus of a projective plane curve to be -1? Input: ...
0
votes
0answers
13 views

How to use a string in a symbolic expression with SageMath?

I would like to use a string as part of a symbolic expression. For instance: function('P') var('x1 x2 x3 y1 y2 y3') st = eval('y1,0,1') sum(P(x1,y1,y2,y3),st) ...
1
vote
1answer
88 views

Help with elliptic curve experiments in SageMath

This question may be quite basic but I'm learning about applied cryptography and abstract math isn't my strongest point. I was just hoping for a little help to confirm a couple of things and help me ...
2
votes
1answer
110 views

Elliptic curve generator in SageMath for curve25519

I'm trying to learn more about elliptic curves by playing with the math objects in sage. I'm getting weird results and wonder what I'm doing wrong... I'm trying to get the generator of the cyclic ...
1
vote
0answers
28 views

Equation seems to violate transitive property

I have some function, $f(x)=\sin(mx)\cos(nx)$. I've tried rewriting this using Euler's formula. $$ \begin{aligned} f(x) &= \sin mx \cos nx \\ &= \frac{e^{imx} - e^{-imx}}{2i} \times \frac{e^{...
0
votes
0answers
20 views

Sage automatically/unnecessarily rounds ratio of two integers inside double loop.

I am not very familiar with Sage so maybe it is obvious. Input to Sage: ...
1
vote
0answers
36 views

How can I get right solution in sagemath?

I want to find the intersection of the cylinders given parametrically: FC1 = vector([cos(alpha), sin(alpha), z]) FC2 = vector([z, cos(alpha), sin(alpha)]) FC3 = FC2-FC1 The program gives a ...
2
votes
0answers
49 views

Hyperbolic Geometry - Calculating curvature of hyperboloid embedded in pseudo-Riemannian manifold

Please go easy on me, I have just been trying to learn sagemath and one of the results I got went against my expectation. I am pretty sure this is a fairly basic math question, I am just curious where ...
1
vote
1answer
83 views

How to generate all unique acyclic graphs (trees) given n nodes.

I'd like to generate the complete set of unordered acyclic graphs (trees) given n nodes. By "unique", I mean that for every graph in the set, no two graphs can be isomorphic. Below I have the set of ...
4
votes
1answer
118 views

A property involving two commuting 3-by-3 matrices with non-negative entries

Consider real numbers $m,n,p,q\ge 0$ and the following two matrices $$M_1= \left(\begin{matrix} 0&0&1\\0&m&n\\1&n&q \end{matrix} \right), \ \ M_2= \left(\begin{matrix} 0&1&...
0
votes
2answers
47 views

Patterns from an Algorithm

Consider the following algorithm: pick an integer $n> 0$. If $n$ is even, divide by 2. If $n$ is odd, find the least perfect square $m^2$ greater then $n$ and add $m^2$+n. Repeat step 2. with ...
0
votes
0answers
61 views

Problem with a system of equation

What is the solution of these equations $\begin{align}a1 - 2*b1*b3 - b2^2 - b4^2 - 2*b5*b6=0 \\ a2=0 \\ a3 - b3^2=0 \\ a4 - 2*b3*b4 - b6^2=0 \\ a5=0 \\ a6=0 \\ b1^2=0 \\ b1*b2=0 \\ b1*b4 + 1/2*b5^2=0 ...
0
votes
3answers
94 views

Numerical Integration over region with singularities

I am trying to integrate the following $$\int_0^{2\pi}\frac{1}{\sqrt{1-\cos(x)}}dx$$ and I am stuck on how to proceed using Matlab or Sage.
0
votes
1answer
83 views

Numerical Integration with constants

I am having trouble trying to integrate the following integral numerically because of the constant z $$\int_{-5}^5(x^2+z^2)^{-1}(x^2+25+z^2)^{-0.5}dx$$ Is there any way to evaluate this integral on ...
1
vote
2answers
53 views

Irreducibility criterions for polynomials over $\mathbb{Z}$ or $\mathbb{Q}$

Given a polynomial with "large" coefficients and powers over $\mathbb{Z}$ or $\mathbb{Q}$, how can we check the irreducibility of it? For example, let us have the following polynomial in $\mathbb{Z}[...
1
vote
1answer
36 views

matrix of multiplication by primitive element of number field in SageMath

I never used Sage and I would like to check some results on Sage but I really don't know how. First I need to create a number field ($\Bbb Q[\sqrt 2]$ for instance). Then I would like to find or ...
1
vote
1answer
55 views

singular.invariant_ring in Sagemath

I am trying to use Singular through Sagemath, to compute an the invariant subring of a finite group. Here is a minimal example where the error I get occurs: ...
3
votes
1answer
98 views

The infinite sum $\sum_{n=1}^\infty (-1)^{n+1} \frac{2n-1}{n^2-n+1}$

My (rather old) version of Mathematica cannot compute $$\sum_{n=0}^\infty (-1)^{n+1}\frac{2n-1}{n^2-n+1}$$ other than re-writing it as a hypergeometric function as follows: $$\mbox{...
-2
votes
1answer
69 views

How do I find the code for the $c$ values where $x^2 + x + c + 1$ has a double root? [duplicate]

Sage question: Define the polynomial ring $\Bbb Q[c][x]$.Find the $c$ values where $x^2 + x + c + 1$ has a double root. Sage code I have used to answer the first part "Define the polynomial ring $\...
0
votes
1answer
65 views

Define the polynomial ring $\Bbb Q[c][x]$.Find the $c$ values where $x^2 + x + c + 1$ has a double root.

Sage question: Define the polynomial ring $\Bbb Q[c][x]$.Find the $c$ values where $x^2 + x + c + 1$ has a double root. Sage code I have used. ...
1
vote
0answers
147 views

Remainder of multivariate division of polynomials

Consider a homogeneous polynomial of several variables $f(x_1,x_2,\ldots,x_n)$ with the leading term (with respect to lex ordering) having the maximum degree of any $x_i$s to be $k$. Take the ideal I ...
1
vote
1answer
22 views

Create a Matrix in RREF with indeterminates in Sage

This quesetion is moreso a programming question involving Sage. I would like to be able to create a Matrix over a multivariable polynomial ring (in particular over R = PolynomialRing(QQ, 'x',(n-k)*n))...
0
votes
0answers
33 views

Kerr metric in SageMath causal visualization

I am studying the Kerr Metric via the SageMath manifolds module and would like to visualize the casual surfaces generated by light cones. Like the circles in this picture: Can anybody provide clues ...
1
vote
0answers
94 views

Cauchy Integral in Sage Math

I am relatively new to complex analysis and I am trying to write down the following integral in Sage Math: $$ I(k) = \frac{1}{2i\pi}\oint\frac{(1-t^2)}{(1-t)^n}\frac{dt}{t^{k+1}} $$ from a paper that ...
0
votes
1answer
41 views

Going backwards from derivative value, to retrieve point and order.

Using Sage let's say I do the following. Take the $4^{th}$ order derivative of $\sin(x)$ about the point $2$: ...
0
votes
1answer
34 views

Cartesian Product of Graphs Algorithm

I am not quite sure what I am asking but I am having trouble finding the proper context in Google. I wanted to take the Cartesian Product of a certain graph using Sagemath; however, I think either I ...
0
votes
1answer
42 views

Plotting graph in sage

Is there a way to plot a (graph theory) graph in sage in such a way that physical distance between vertices is at least a threshold (say 1cm)? Graph layouts should be the way to do it. I am looking ...
1
vote
1answer
77 views

Help with sage math defining function of two variables

Hello I need help regarding sage math, since I cant find anything about it on the manuals. So I have a function of the form $F(r,t) = 2r H(t)$ and then i want to perform an operation on it ...
0
votes
0answers
37 views

Plotting complicated function on sagemath

I am not sure if this is the right place to ask about coding a program sagemath. But it is the only math online community I know, so I hope I can get some suggestions here. The problem is I want to ...
1
vote
1answer
33 views

SageMath curve from Weierstrass normal form cubic over finite field

I have a cubic equation that I think represents a valid Weierstrass normal form in SageMath. ...
1
vote
0answers
93 views

A group theoretic interpretation of Lagarias inequality

Let $G$ be a finite group, $S \subset G$ a generating set. Set $\sigma(G):=\sum_{U \subset G} |U| $, where the sum runs over all subgroups $U$ of $G$. Set $H_G := \sum_{g \in G} \frac{1}{|g|+1}$, ...
2
votes
1answer
396 views

Presentations of subgroups of S6 as permutations

Computer science professor, self-taught abstract algebraist. Beginner with GAP and SAGE. Can someone show me the quickest way to, when given the description of a subgroup of S6, obtain its ...
0
votes
0answers
38 views

Algebra using sage

Can anyone help in writing a code to find the list of idempotent and primitive elements of a group algebra, the examples goes like this. Let $p$ be an odd prime such that $\bar2$ generates $U(\mathbf{...
0
votes
0answers
99 views

Find the Order of an Elliptic Curve

I have an Elliptic Curve represented by the following equation and values: Elliptic Curve: y^2 = x^3 + A*x + B mod M ...

1
2 3 4 5