On Feb 19, 6:38 am, ObsessiveMathsFreak
<[email protected]> wrote:
> Basically, I want to restrict the variables of a multivariate
> polynomial to a certain set of symbols.
>
> B.variables() should return
> [x,y]
> instead of
> [a,x,y]
>
> How can this be done.
Maybe I misunderstand you, but this approach works fine in sage 4.8,
and probably earlier:
sage: R.<a> = QQ[]
sage: P.<x,y> = R[]
sage: f = a*x^2 - 2*y
sage: f.variables()
(x, y)
That said, I can't factor a^2*x^2-y^2 going this route, because this
type of polynomial tries to interact with a specific (different)
backend.
> (Incidentally, the Sage polynomial/ring documentation is absolute and
> utter bedlam. Is it not possible for ordinary mortals to work with
> polynomials without having to declare polynomials rings over
> integers. )
Again, maybe I misunderstand you, but the polynomial rings given above
are not over the integers, and there are examples of this in the
documentation:
http://www.sagemath.org/doc/constructions/rings.html#polynomial-rings
Which I accessed via clicking on "Help/Documentation" from the home
page, then on "View the online documentation", then on
"Constructions", then on "Polynomial Rings".
Could you be more specific as to where the bedlam lies? There's a doc
days coming up, and I'm sure people working on documentation could use
advice.
regards
john perry
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org