Ask Your Question

Plotting an element in a polynomial ideal

asked 2015-05-25 03:57:20 +0200

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 08:34:11 +0200

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 11:00:35 +0200 )edit

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

FrédéricC gravatar imageFrédéricC ( 2015-05-26 17:43:21 +0200 )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-25 03:57:20 +0200

Seen: 649 times

Last updated: May 25 '15