ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 05 Jan 2020 14:21:01 -0600Singular Implementation for Multivariable Polynomial Rings in v7.3http://ask.sagemath.org/question/49382/singular-implementation-for-multivariable-polynomial-rings-in-v73/ Hi all,
I am running SageMath version 7.3, Release Date: 2016-08-04 on a university computer.
When I try to run the code:
S = PolynomialRing(QQ, 5, "x", implementation="singular")
I get in return:
ValueError: The singular implementation is not known for multivariate polynomial rings
However, on my personal laptop, where I run version 8.1, I do not have this error. Is there anyway to fix this on 7.3 without updating, since I do not have administrator permissions. Thank you for your time!BarkSun, 05 Jan 2020 14:21:01 -0600http://ask.sagemath.org/question/49382/error while assigning variableshttp://ask.sagemath.org/question/49155/error-while-assigning-variables/ Hi. I have the following coding of iteration where I want to find the values of u[1,1], u[1,2], u[1,3] and u[1,4].
u,t,x = var('u t x')
u[1]=x;u[1]
u[2]=x^2-1;u[2]
u[3]=2*x^2+3;u[3]
u[4]=x^3-5;u[4]
g[1]=-x^3-x;g[1]
g[2]=(1/4)*x^5-(1/4)*x^4-(1/2)*x^3-3*x^2-1;g[2]
g[3]=(1/2)*x^6-(31/6)*x^3+2*x^2+3;g[3]
g[4]=x^3-5;g[4]
K2[1,1]=1;K2[1,1]
K2[1,2]=0;K2[1,2]
K2[1,3]=1;K2[1,3]
K2[1,4]=1;K2[1,4]
K2[2,1]=x-1;K2[2,1]
K2[2,2]=t;K2[2,2]
K2[2,3]=0;K2[2,3]
K2[2,4]=-x;K2[2,4]
K2[3,1]=x-t;K2[3,1]
K2[3,2]=0;K2[3,2]
K2[3,3]=0;K2[3,3]
K2[3,4]=-3*t^2;K2[3,4]
K2[4,1]=2*x-3;K2[4,1]
K2[4,2]=0;K2[4,2]
K2[4,3]=0;K2[4,3]
K2[4,4]=0;K2[4,4]
for i in range(1,4):
u[i,1]=-h*sum(integrate(K2[i,j]*g[j]),j,1,4);u[i,1]
for i in range(1,4):
u[i,2]=(1+h)*u[i,1]-h*sum(integrate(K2[i,j]*u[j,1]),j,1,4);u[i,2]
But it gave me an error saying that: 'sage.symbolic.expression.Expression' object does not support item assignment Can someone explain to me what I might be doing wrong here.ShaMon, 23 Dec 2019 23:37:57 -0600http://ask.sagemath.org/question/49155/Valuation error when composing power serieshttp://ask.sagemath.org/question/43999/valuation-error-when-composing-power-series/ I'm trying to work with power series with coefficients in a ring consisting of elements $f/g$, where $f$ is a polynomial in several variables over the integers and g is a polynomial in one of those variables with unit constant coefficient. Ultimately, I'd like to be able to do all of the following:
- Compose power series over this ring
- Invert single-variable power series over this ring whose degree-1 coefficients are units
- Reduce the coefficients of a power series modulo some ideal of the ring
I thought I would do this by starting with the Laurent series over $\mathbf{Z}$ in the variable that occurs in the denominator, constructing a polynomial ring over this by adjoining the other variables, and letting my power series take coefficients in this ring. But I'm getting an error I don't understand when I try to compose series. The following example illustrates the problem:
M1.<b> = LaurentSeriesRing(ZZ)
M.<a,c> = PolynomialRing(M1)
R.<t1,t2> = PowerSeriesRing(M)
X = t1 + t2 + O(t1,t2)^3
R1.<t> = PowerSeriesRing(M)
f = X(t,t^2); f
This returns the type error `Substitution defined only for elements of positive valuation, unless self has infinite precision` despite the fact that replacing the last line by `t.valuation()` or `(t^2).valuation()` returns `1` or `2`, respectively.
The problem seems to result from a combination of factors. If I replace the second line with either
M.<a,c> = PolynomialRing(ZZ)
or
M.<a> = PolynomialRing(M1)
the error vanishes and the code returns the expected `t + t^2 + O(t)^3`. It also gives no error if I define `R` and `R1` to be polynomial rings, rather than power series rings, over `M` (and correspondingly delete the big-O notation).
Any ideas about what is triggering the error, or another way to construct these power series?Annie CarterFri, 19 Oct 2018 19:03:23 -0500http://ask.sagemath.org/question/43999/Multiplying matrices with different parentshttp://ask.sagemath.org/question/41642/multiplying-matrices-with-different-parents/ I am trying to multiple a symbolic 1x1 matrix with one element in it, by a square matrix over a finite field. for example
[-9*x0^2 - 11*x0*x1 - 5*x1^2 - 11*x0*x2 - 4*x1*x2 + 7*x2^2 + 13*x1*x3 + 8*x2*x3 + 4*x3^2 - 6*x0*x4 - 4*x1*x4 - 15*x2*x4 + 9*x0*x5 - 8*x1*x5 - 5*x2*x5 - 3*x3*x5]
to be multiplied with them matrix
[18 23 14 1 6 21]
[24 3 3 0 2 0]
[17 25 2 16 23 8]
[ 8 21 16 5 1 9]
[14 28 8 17 12 12]
[ 6 24 18 19 3 1]
however when i try this i get the following error:
TypeError: unsupported operand parent(s) for *: 'Full MatrixSpace of 1 by 1 dense matrices over Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5 over Finite Field of size 31' and 'Full MatrixSpace of 6 by 6 dense matrices over Finite Field of size 31'
Is there a way to do this? DalvirMon, 19 Mar 2018 13:00:57 -0500http://ask.sagemath.org/question/41642/Using Sage plotting capability on data from PARI/GP (1)http://ask.sagemath.org/question/41048/using-sage-plotting-capability-on-data-from-parigp-1/ This is a short follow-up question from [this one](https://ask.sagemath.org/question/41029/using-sage-plotting-capability-on-data-from-parigp/).
I would like to produce an implicit plot (a contour plot where the real or imaginary values of a function are zero):
var('x,y,s')
g=real(zeta(s))
implicit_plot(lambda x,y:g(x+y*I),(x,-3,3),(y,-3,3))
This works fine, however I want to use GP/Pari to evaluate the zeta function and therefore wrote:
var('x,y')
g=gp("H(s)=zeta(s)")
implicit_plot(lambda x,y:real_part(g(x+y*I)),(x,-3,3),(y,-3,3))
but then keep getting an error message:
**PARI/GP ERROR:
*** at top-level: sage[45020]=sage[16][1]
*** ^---
*** incorrect type in _[_] OCcompo1 [not a vector] (t_REAL).**
For 'normal' plots like this one:
var('x')
g=gp("H(s)=real(zeta(s))")
plot(lambda x:(g(x)),(x,3,6))
the interface with GP works fine, so I probably do something wrong using multiple variables or complex numbers? It doesn't seem to be zeta-function specific (like the pole at s=1), since it also fails for e.g. the cos-function.
Grateful for any advice on how to make this work.
Thanks!RuudHFri, 09 Feb 2018 09:20:43 -0600http://ask.sagemath.org/question/41048/Division algorithm in a polynomial ring with variable coefficientshttp://ask.sagemath.org/question/37098/division-algorithm-in-a-polynomial-ring-with-variable-coefficients/ I am working on an algorithm to divide a polynomial `f` by a list of polynomials `[g1, g2, ..., gm]`. The following is my algorithm:
def div(f,g): # Division algorithm on Page 11 of Using AG by Cox;
# f is the dividend;
# g is a list of ordered divisors;
# The output consists of a list of coefficients for g and the remainder;
# p is the intermediate dividend;
n = len(g)
p, r, q = f, 0, [0 for x in range(0,n)]
while p != 0:
i, divisionoccured = 0, False
print(p,r,q);
while i < n and divisionoccured == False:
if g[i].lt().divides(p.lt()):
q[i] = q[i] + p.lt()//g[i].lt()
p = p - (p.lt()//g[i].lt())*g[i]
divisionoccured = True
else:
i = i + 1
if divisionoccured == False:
r = r + p.lt()
p = p - p.lt()
return q, r
Here is an example of implementing the algorithm:
K.<a,b> = FractionField(PolynomialRing(QQ,'a, b'))
P.<x,y,z> = PolynomialRing(K,order='lex')
f=a*x^2*y^3+x*y+2*b
g1=a^2*x+2
g2=x*y-b
div(f,[g1,g2])
Here is the result:
(a*x^2*y^3 + x*y + 2*b, 0, [0, 0])
(((-2)/a)*x*y^3 + x*y + 2*b, 0, [1/a*x*y^3, 0])
(x*y + 4/a^3*y^3 + 2*b, 0, [1/a*x*y^3 + ((-2)/a^3)*y^3, 0])
(4/a^3*y^3 + ((-2)/a^2)*y + 2*b, 0, [1/a*x*y^3 + ((-2)/a^3)*y^3 + 1/a^2*y, 0])
(((-2)/a^2)*y + 2*b, 4/a^3*y^3, [1/a*x*y^3 + ((-2)/a^3)*y^3 + 1/a^2*y, 0])
(2*b, 4/a^3*y^3 + ((-2)/a^2)*y, [1/a*x*y^3 + ((-2)/a^3)*y^3 + 1/a^2*y, 0])
Error in lines 6-6
Traceback (most recent call last):
and some other error messages.
We can see that it worked well until the leading term is `2b`. it does not recognize the `2b` as a term. I tried:
(x).lt().divides(1)
It gives the answer `False`. But I tried
(x).lt().divides(a)
It gives error message. Is there a way to solve this? Thank you for your help!
KittyLMon, 27 Mar 2017 14:26:48 -0500http://ask.sagemath.org/question/37098/help on using chain rule in Sagehttp://ask.sagemath.org/question/36673/help-on-using-chain-rule-in-sage/Does anyone have any tips for using Sage to take derivatives of functions of many variables?
For example, if I define
```w(x,y) = x^2 + y^2``` (say)
and then if I suppose that ```x``` and ```y``` depend on an independent variable ```t```, the chain rule applies for finding ```w.diff(t)```. The only way I found to do this in Sage is
```var('t')```
```x(t) = cos(t)``` (say)
```y(t) = sin(t)```
```w(x,y) = x^2 + y^2```
```w.diff(t)```
But this isn't really using the chain rule. If I instead try
```var('x,y')```
```(define w again)```
```(define x and y again)```
```w.diff(t)```
```Out: (x,y) |--> 0```
Apparently it thinks the derivative is zero because it still thinks ```x``` and ```y``` are two independent variables where they appear in ```w```, even though you get
```x```
```Out: t |--> cos(t)```
and similarly for ```y```. Any suggestions? Thanks.
lefthandstanderMon, 20 Feb 2017 01:25:01 -0600http://ask.sagemath.org/question/36673/defining multivariate piecewise functionhttp://ask.sagemath.org/question/36567/defining-multivariate-piecewise-function/I need to define some function like `f(x,y) = x * sin(y)/y if y != 0, x otherwise`, such that `f` can be differentiated. Is there a way to do so? Thanks!maaaaaaartinSat, 11 Feb 2017 07:24:14 -0600http://ask.sagemath.org/question/36567/Collect polynomial in a different variablehttp://ask.sagemath.org/question/35537/collect-polynomial-in-a-different-variable/ I want to collect my polynomial in a different variable. How am I to do that. For example I have :
D=(a1*u^3+a2*u^2+a3*u+a4)x^4+(a5*u^3+a6*u^2+a7*u+a8)x^3+(a9*u^3+a10*u^2+a11*u+a12)x^2+(a13*u^3+a14*u^2+a15*u+a16)x
Now I want my `D` to be in the form where `u` is the main variable, so I will have :
D=(a1*x^4+a5*x^3+a9*x^2+a13*x)u^3+(...)u^2+(...)u
Maple do it with `collect` code. I try to search for a similar code in Sage but no luck.ShaFri, 11 Nov 2016 22:54:11 -0600http://ask.sagemath.org/question/35537/multivariate polynomial ring over complex numbershttp://ask.sagemath.org/question/34692/multivariate-polynomial-ring-over-complex-numbers/ I want to factorize bivariate polynomials over C. For single variable case we do this as follow:
R=CC[x]
x=R.gen()
f=x^2+1
f.factor()
How to do this for multivariate case ?nebuckandazzerFri, 02 Sep 2016 12:33:45 -0500http://ask.sagemath.org/question/34692/Help with matrices over multivariable polynomial ringhttp://ask.sagemath.org/question/33310/help-with-matrices-over-multivariable-polynomial-ring/ I want to work with matrices over a multivariable polynomial ring.
I want the matrix
[x0^2,x1^2,x2^2]<br>
[x0^4,x1^4,x2^4]<br>
[x0^8,x1^8,x2^8]
so I can take the determinate of it. I have
R = PolynomialRing(GF(2), 3, 'x')
which is a "Multivariate Polynomial Ring in x0, x1, x2 over Finite Field of size 2". I try
M = MatrixSpace(R,3,3,sparse=True)
which is the "Full MatrixSpace of 3 by 3 sparse matrices over Multivariate Polynomial Ring in x0, x1, x2 over Finite Field of size 2". I am not even sure what "sparse" is.
Then I try
A = M([x0^2,x1^2,x2^2, x0^4,x1^4,x2^4, x0^8,x1^8,x2^8])<br>
or<br>
A = M([[x0^2,x1^2,x2^2], [x0^4,x1^4,x2^4], [x0^8,x1^8,x2^8]])
And it says "name 'x0' is not defined"
I have looked for examples in the Sage documentation, but I just can get Sage to make the matrix above.
Eventually, I want to do arbitrate number of variables and arbitrary n-by-n matrices.
Thank you for your help. MrotsliahTue, 03 May 2016 13:04:31 -0500http://ask.sagemath.org/question/33310/How to implement the multivariable division algorithm without passing to Grobner bases?http://ask.sagemath.org/question/32932/how-to-implement-the-multivariable-division-algorithm-without-passing-to-grobner-bases/ Hi,
I'm new to Sage, and I'm wondering how to implement the multivariable division algorithm in Sage. I pulled up the "Multivariate Polynomials via libSINGULAR" page of the Sage Reference Manual v7.1, but it wasn't helpful.
What I'm wanting is a generalization of the quo_rem command that can take in more than one argument on the right and follows the division algorithm with respect to a fixed monomial ordering and the order that the polynomials are entered in.
Is there any set of commands that does that for me? If so, would you please include the code, say for the following example?
> Divide the polynomial y*x^2 + x*y^2 +
> y^2 by xy-1 and y2 -1 (in that order)
> using the lexicographic ordering with
> x>y. I would like to process more
> complicated examples, perhaps with
> that order and dividing by 8 things at
> once rather than 2.
I've learned about the p.mod(I) and p.reduce(I) commands where p is a polynomial and I is an ideal. The problem with those is that they seem to pass to a Grobner basis for I to get a "canonical" remainder rather than the remainder we'd get from the given order of the polynomials, as I tested switching the order of the polynomials in defining an ideal I and it did not change my answer for p.mod(I) or p.reduce(I).
Thanks!rmg512Thu, 31 Mar 2016 14:00:13 -0500http://ask.sagemath.org/question/32932/How to declare variable for a function with other variable?http://ask.sagemath.org/question/31695/how-to-declare-variable-for-a-function-with-other-variable/ n=var("n")
def T(n):
a=1
b=x
if n==0:
return a
if n==1:
return b
else:
for i in [2..n]:
b=2*x*b-a
a=(a+b)/(2*x)
return b
Could you help me to compute T(i) at x=1 or anything ?Mean that I want to declare x is a variable of T(i), but I can't.
Thank you so muchMinhminhSat, 19 Dec 2015 05:16:58 -0600http://ask.sagemath.org/question/31695/Multivariable taylor series with relationship between variableshttp://ask.sagemath.org/question/23821/multivariable-taylor-series-with-relationship-between-variables/ Let's consider a function `f(x,y,z)` and the following relationship between the variables:
f(x,y,z) = x+y+z
x << y << z around 0
I would like the first order Taylor expansion of f around 0. And I would expect this result:
>> taylor(f, (x,0),(y,0),(z,0),1)
z
But I have :
>> taylor(f, (x,0),(y,0),(z,0),1)
x+y+z
How can I do it?rufus_wilsonMon, 18 Aug 2014 15:15:57 -0500http://ask.sagemath.org/question/23821/numerical solutions from a for-loop solve()http://ask.sagemath.org/question/26661/numerical-solutions-from-a-for-loop-solve/I am trying to extract a list of 3-tuples which solve a system of equations. For the test I am using a simply equation whose solutions go from negative to positive around one, so
n, u = var('n, u')
sltns=solve([n + u==0, n + c*u - 1==0], n, u)
L = [0, 1/4, 1/2, 3/4, 1, 5/4, 6/4, 7/4, 2]
for c in L:
print (c,sltns[0].rhs(),sltns[1].rhs())
does not work.
What I am trying to get is, for example, if c = 1/2, then
(1/2, 2, -2]
because if c = 1/2 then n==2 and u==-2. And so on for all the elements of the list.
()
()
...
()
If I omit defining sltns, but use the solve() directly, I get out of range errors when for some c, u goes from positive to negative or vice versa for n, and I use [0].rhs(). Isn't sltns[2] the way to select, for example, [d==4] in [a==2, b==3, d==4], while sltns[0] and sltns[1] select the first two? Is it limited to some range positive or negative?
My question is:
1. What is the correct way to code the calculation above?
2. How would I alternatively code the loop if I needed the () s to be tuples in a matrix [(),(), ..., ()] for further calculations or plotting?gottfriedMon, 27 Apr 2015 21:45:24 -0500http://ask.sagemath.org/question/26661/Computations in a Quotient Ringhttp://ask.sagemath.org/question/25284/computations-in-a-quotient-ring/ I'm trying to do some computations in a quotient ring in Sage, and I'm having some trouble. For example:
Working with the ring:
R.<x,y,z,w,u,z1,z2,z3,z4,z5> = PolynomialRing(QQ,10)
S.<a,b,c,d,e,m1,m2,m3,m4,m5> = R.quo((x^2,y^2+x*y, z^2+x*z + y*z, w^2 - w*x+w*y, u^2 + u*x+ u*z + u*w))
I want to compute `(a*(m3+m4+m5) + b*(m1+m2+m3+m4) + c*(m1+m3) + d*(m1+m2) + e*m1)^5`
where I'm thinking about `m1`, `m2`, `m3`, `m4`, and `m5` as arbitrary coefficients. When I type this in it returns
4/19*e^5*m1^5 + 15/19*e^5*m1^4*m2 + 10/19*e^5*m1^3*m2^2 +
10/19*e^5*m1^4*m3 + 40/19*e^5*m1^3*m2*m3 + 15/19*e^5*m1^2*m2^2*m3 -
15/19*e^5*m1*m2^2*m3^2 - 5/19*e^5*m1^2*m3^3 - 10/19*e^5*m1*m2*m3^3 +
5/19*e^5*m1^4*m4 - 15/19*e^5*m1^2*m2^2*m4 - 30/19*e^5*m1*m2^2*m3*m4 -
15/19*e^5*m1^2*m3^2*m4 - 30/19*e^5*m1*m2*m3^2*m4 - 10/19*e^5*m1^3*m4^2 -
15/19*e^5*m1^2*m2*m4^2 - 15/19*e^5*m1^2*m3*m4^2 -
30/19*e^5*m1*m2*m3*m4^2 - 5/19*e^5*m1^4*m5 - 20/19*e^5*m1^3*m2*m5 -
15/19*e^5*m1^2*m2^2*m5 - 20/19*e^5*m1^3*m3*m5 - 60/19*e^5*m1^2*m2*m3*m5
- 30/19*e^5*m1*m2^2*m3*m5 - 15/19*e^5*m1^2*m3^2*m5 -
30/19*e^5*m1*m2*m3^2*m5 - 20/19*e^5*m1^3*m4*m5 - 30/19*e^5*m1^2*m2*m4*m5
- 30/19*e^5*m1^2*m3*m4*m5 - 60/19*e^5*m1*m2*m3*m4*m5
However, this is also equivalent to `(some expression of mi's)*a*b*c*d*e`.
I want it in this form, because for the problem I'm working on I need this coefficient in front of `a*b*c*d*e`. But I'm not sure how to ask Sage to convert it to this form? For example, "solve" doesn't seem to work in a quotient ring.
(I'm sorry if this is a silly question. I'm new to Sage!)LaurenMon, 15 Dec 2014 23:16:23 -0600http://ask.sagemath.org/question/25284/Probability density function - multivariate random variablehttp://ask.sagemath.org/question/10872/probability-density-function-multivariate-random-variable/Hi experts!
I know that many of you are professional mathematicians. My question is about statcistics and sage:
given two independient random variables `X` and `Y` (with a probability density function `fX` and `fY`), and the multivariable random variable `A` defined by: `A=h(X,Y)`,
How can I obtain the explicit equation of probability density function of random varible `A`?
I only know that the join probability density fuction `fXY` is `fXY=fX*fY` (because there are independent).
Like you can see in the article
http://en.wikipedia.org/wiki/Probability_density_function
section 'Multiple variables' we can write the pdf of `A` using Dirac delta function.
Waiting for your answers.
Thans a lot!!mresimulatorWed, 01 Jan 2014 07:11:34 -0600http://ask.sagemath.org/question/10872/multivariate integralhttp://ask.sagemath.org/question/10875/multivariate-integral/Hi experts!
For obtain the pdf of a multivariate function of random variables i must resolve explicitly a multivariate integral and then derivate it:
http://math.stackexchange.com/questions/624958/how-to-obtain-a-pdf-of-a-random-variable-defined-as-a-function-of-many-variables/
How can I resolve my problem in SAGE?
Waiting for yor answers.
Thanks a lot!!
mresimulatorThu, 02 Jan 2014 06:01:11 -0600http://ask.sagemath.org/question/10875/integral curves in Sagehttp://ask.sagemath.org/question/10650/integral-curves-in-sage/*(Forewarning: the typesetting here is seemingly awful. If you can find a better way of writing the math below than just plain text, please do.)*
I have a vector field $V: R^2 \to R^2$ and I would like to find $f:(-\epsilon,\epsilon) \to R^2$, for some small $\epsilon>0$, such that $f(0)$ is a given point and $f'(t) = V(f(t))$.
>Can Sage do this for me? If so, how?Joshua_SeatonWed, 23 Oct 2013 15:43:42 -0500http://ask.sagemath.org/question/10650/Numerical integral with multiple parametershttp://ask.sagemath.org/question/10072/numerical-integral-with-multiple-parameters/I am trying to numerically integrate a function with respect to one variable, although the function is of more than one variable. An example:
var('x')
var('a')
f(x,a)=a*x
f(x,a)
integral(f(x,a),x,0,1)
produces the correct result of 1/2*a
g(x,a)=(f(x,a).nintegral(x, 0, 1))
Errors with "ValueError: Maxima (via quadpack) cannot compute the integral", but I probably don't have the syntax correct even if that function can do this. Even if a is given a value prior to the g(x,a) definition, it doesn't work.
g(x,a)=numerical_integral(f(x,a),0,1)
Errors with "ValueError: Integrand has wrong number of parameters". I can understand this, as it doesn't quite know what to do with 'a'.
g(x,a)=numerical_integral(f(x,a),0,1, params=[a])
g(x,6)
Gives an incorrect result of 0.3333
g(x,a)=numerical_integral(f(x,a),0,1, params=[6])
g(x,a)
Gives the correct result of 2.99996
h(x,a)=integral(f(x,a),x,0,1)
h(x,6)
Gives the correct result of 3
What is going on with g(x,a) and the "params" vector? Is what I am attempting to do possible?
I would like to make a plot of g(x,a) across a range of a. This is a simplified example, where I could obviously just do it by hand or with a non-numerical integral. The f(x,a) that I am really trying to work with is much more complex. I can upload a .sws workbook with these equations if that helps.
The documentation at [http://www.sagemath.org/doc/reference/calculus/sage/gsl/integration.html](http://www.sagemath.org/doc/reference/calculus/sage/gsl/integration.html) don't give much to go on with respect to params or nintegral. Any other docs out there I am missing?
droppitSun, 28 Apr 2013 13:23:36 -0500http://ask.sagemath.org/question/10072/"ALL" numerical solutions for system of equationshttp://ask.sagemath.org/question/10074/all-numerical-solutions-for-system-of-equations/Hi. My question is a multivariable version of the question;
http://ask.sagemath.org/question/66/how-to-get-all-numerical-solutions-of-an-equation
I would like to know is there is a good function on sage that find
"all" solutions for a given non-linear system of equations,
just like the NSolve function on mathematica does.
I found several functions for numerical computation but they are only for one-variable
or require initial value, which meas we can find only one solution.
Do you know any good function for my purpose?
Regards,math_aiSun, 28 Apr 2013 20:35:54 -0500http://ask.sagemath.org/question/10074/Multivariate Taylor Serieshttp://ask.sagemath.org/question/9783/multivariate-taylor-series/Hi. I know `f.taylor(x, x_0, n)` would generate an n-order Taylor approximation of f around x_0 for a function of a single variable. How can I do this for multiple variables? I know Maxima can handle it. How do I do this in sage?yktulaThu, 07 Feb 2013 11:13:48 -0600http://ask.sagemath.org/question/9783/Creating a polynomial ring where the variables are code generatedhttp://ask.sagemath.org/question/9504/creating-a-polynomial-ring-where-the-variables-are-code-generated/Hi, The standard way to create a multivariate polynomial ring over `ZZ` is as follows.
sage: R.<x,y> = PolynomialRing(ZZ)
I want to create a polynomial ring over `ZZ` where the variables are generated by code.
sage: n = 5
sage: lstx = list(var('x_%d' % i) for i in range(n))
sage: lstx
[x_0, x_1, x_2, x_3, x_4]
My attempts at creating the desired ring whose variables are the elements of `lstx` result in error. Any help will be appreciated.Iftikhar BurhanuddinTue, 06 Nov 2012 02:14:46 -0600http://ask.sagemath.org/question/9504/How can I find the maximum of a two variable function?http://ask.sagemath.org/question/8875/how-can-i-find-the-maximum-of-a-two-variable-function/Hello everyone, I'm trying to find the maximum of the following function:
var('x,y')
func(x,y) = x*y - y^2
Is there any way I can find the maximum of that function (func) when 0 < x < 1 and 0 < y < 2 for example?
Thanks in advance :)asdrubalivanWed, 11 Apr 2012 15:35:03 -0500http://ask.sagemath.org/question/8875/How do I plot parametric and polar curveshttp://ask.sagemath.org/question/8450/how-do-i-plot-parametric-and-polar-curves/How do I "ask" or input a command line for parametric and polar curves with other variables than x such as r, (theta), y etc?
thank youdoladimejiMon, 07 Nov 2011 09:19:46 -0600http://ask.sagemath.org/question/8450/function field minimal polynomialhttp://ask.sagemath.org/question/8254/function-field-minimal-polynomial/My setup is the following: Fix some field $k$, set $M=k(X_1,\dots,X_d,Y_1,\dots,Y_e)$ with the obvious $S_{d+e}$-action and let $L=M^{S_d\times S_e}$ and $K=M^{S_{d+e}}$. Is there a way to let Sage compute the minimal polynomial of $X_1+\dots+X_d\in L$ over $K$?FireTue, 02 Aug 2011 05:29:01 -0500http://ask.sagemath.org/question/8254/Numeric multivariable ode solver in Sage?http://ask.sagemath.org/question/7598/numeric-multivariable-ode-solver-in-sage/hi everyone, is there any numeric multivariable ode solver in sage?
i want to solve the double pendulum problem, so i need to solve 4 first order differential equations which deppends on theta_1(t) amd thetha_2(t). I need something like a multivariable runge kutta algorithmngativThu, 19 Aug 2010 12:51:31 -0500http://ask.sagemath.org/question/7598/