Ask Your Question
1

Implicit_plot with degenerate conics

asked 2021-07-04 03:16:24 +0200

yoleo531 gravatar image

I'm plotting some (possibly degenerate) conics via implicit_plot.

y = var('y')
implicit_plot((y*sqrt(sqrt(2) + 2) - x*sqrt(-sqrt(2) + 2))^2 == 0, (x,-2,2),(y,-2,2))

yields a blank plot for me. Yet this should be equivalent to

implicit_plot((y*sqrt(sqrt(2) + 2) - x*sqrt(-sqrt(2) + 2)) == 0, (x,-2,2),(y,-2,2))

which yields a line, as it should. On the other hand,

implicit_plot(x^2 == 0, (x,-2,2),(y,-2,2))

does give a vertical line. Why is this different? Is this a bug?

I'm running this on the cloud, using a free account on http://cocalc.com. Perhaps this has something to do with the problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-04 14:06:28 +0200

slelievre gravatar image

This has to do with how implicit_plot works.

In order to decide where the desired expression is zero, it samples values of the expression on the desired rectangle, and when there is a sign change, decides that it must be zero in between.

That is why implicit_plot does not work when you take the square of the expression, as the zero locus no longer corresponds to a sign change.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2021-07-04 03:13:36 +0200

Seen: 28 times

Last updated: Jul 04