Ask Your Question

Plotting an element in a polynomial ideal

asked 2015-05-24 20:57:20 -0500

Alasdair gravatar image

I have a polynomial ring in three variables:

P.<x,y,z> = PolynomialRing(QQ)

and I've eliminated the variable t in an ideal generated by several polynomials to obtain an implicit function in just x and y. I'd like to plot this function. But the plot method, applied to an ideal in just two variables, produces the error:

ValueError: Variable 't' not found

So either I need somehow to introduce this variable into the plot, or pull the function out of the polynomial ring so that it can be plotted as a function of real variables with implicit_plot. But I'm not sure how to do either...any advice would be most helpful!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2015-05-25 01:34:11 -0500

FrédéricC gravatar image

Something like that

sage: P.<x,y,z> = PolynomialRing(QQ)
sage: I=P.ideal(x*x+y*y-1)
sage: implicit_plot(QQ['x,y'](I.gens()[0]),(x,-2,2),(y,-2,2))

maybe ?

edit flag offensive delete link more


That works! Many thanks. I don't think I've ever needed the QQ[...] syntax before, even though it's described in the documentation about univariate polynomial rings .

Alasdair gravatar imageAlasdair ( 2015-05-26 04:00:35 -0500 )edit

That's just a shortcut for PolynomialRing(QQ,['x','y']).

FrédéricC gravatar imageFrédéricC ( 2015-05-26 10:43:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-05-24 20:57:20 -0500

Seen: 227 times

Last updated: May 25 '15