[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread Simon King
Hi! On 2013-06-04, Sam math hes...@gmail.com wrote: How do I do this for a multivariate polynomial? It says O(.) is not defined... R.x,y = PolynomialRing(QQ) f = x^3*y^3 + x^2 * y^4 + x*y + x + y + 1 How can I chop this polynomial up to a certain degree of x and y? I.e. I want to keep up

Re: [sage-support] Text editor for sage on Mac

2013-06-04 Thread Ivan Andrus
Well those paths look suspicious (probably because you changed them). The paths should be `sage --root` + /local/share/emacs and `sage --root` + /sage respectively. Really, all I can say is copy what appears in the output of sage -f

[sage-support] Unfriendly sage

2013-06-04 Thread Jori Mantysalo
Is there any plans to make Sage more useful to beginners? To give two examples from different levels: 1*(2+ This gives SyntaxError: invalid syntax and explanation is ... exec compile(u'open(___code___.py,w).write(# -*- coding: utf-8 ... --- what is beginner supposed to do with this?

Re: [sage-support] Unfriendly sage

2013-06-04 Thread John Cremona
On 4 June 2013 07:47, Jori Mantysalo jori.mantys...@uta.fi wrote: Is there any plans to make Sage more useful to beginners? To give two examples from different levels: 1*(2+ I don't get the same error, and don't get any response at all until I close the parenthesis. What's wrong with Syntax

[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread john_perry_usm
Here's a different approach, which is more efficient, but poses its own challenges: sage: I = R.ideal(x^2) sage: Q = R.quo(I) sage: f = Q(x^3*y^3 + x^2*y^4 + x*y + x + y + 1) sage: f xbar*ybar + xbar + ybar + 1 So, the variables look different, and with reason. But: sage: %timeit

[sage-support] findroot error

2013-06-04 Thread Mike
The following code snippet works, until you uncomment the c=x-a line, at which point you get the error TypeError: f() takes exactly 2 arguments (1 given). The line c=x causes no problems. What's going on? (Note: I know you don't need that line; this replicates the TypeError in a more

Re: [sage-support] findroot error

2013-06-04 Thread Alastair Irving
On 04/06/2013 21:11, Mike wrote: The following code snippet works, until you uncomment the c=x-a line, at which point you get the error TypeError: f() takes exactly 2 arguments (1 given). The line c=x causes no problems. What's going on? (Note: I know you don't need that line; this replicates

Re: [sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread Stephen Montgomery-Smith
On Monday, June 3, 2013 7:12:34 PM UTC-5, Sam math wrote: I have a multivariate polynomial and want to keep only up to a certain degree. I already know how to do this for the univariate case. For 1 variable, I'd do: R.x = PolynomialRing(QQ) f = x^4 + x^2 + x^3 + x

Re: [sage-support] findroot error

2013-06-04 Thread Mike
On Tuesday, June 4, 2013 4:56:43 PM UTC-4, Alastair Irving wrote: On 04/06/2013 21:11, Mike wrote: The following code snippet works, until you uncomment the c=x-a line, at which point you get the error TypeError: f() takes exactly 2 arguments (1 given). The line c=x causes no

Re: [sage-support] findroot error

2013-06-04 Thread Mike
Thank you! - that does explain the error. If I convert back within the function (as below) , it eliminates the error message, and also seems to work in my real problem. Are there better ways to do this conversion back (to something compatible with symbolic expressions) than using

[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-04 Thread leif
Stephen Montgomery-Smith wrote: On Monday, June 3, 2013 7:12:34 PM UTC-5, Sam math wrote: I have a multivariate polynomial and want to keep only up to a certain degree. I already know how to do this for the univariate case. For 1 variable, I'd do: R.x = PolynomialRing(QQ)