Message Boards Message Boards

GROUPS:

Plotting circle equation in Wolfram|Alpha?

Posted 4 years ago
14692 Views
|
6 Replies
|
0 Total Likes
|

Hi,

I was trying to plot circle equations and found a strange bug:

When plotting following equation:

0.66^2 = (x-1)^2 + (y-1)^2

the circle is plotted correctly as expected.

But when taking the square root first on both sides:

0.66 = sqrt((x-1)^2 + (y-1)^2)

the circle printed has nearly double the radius as expected. Also I tried to verify if the radius is really "double" the expected one by plotting a vertical line in the same plot:

0.66 = sqrt((x-1)^2 + (y-1)^2), x = -1.32

This however plots the correct circle.

When I'm missing something here, I apologize.

Best regards!

6 Replies
Posted 4 years ago

Hi Mawe,

Can you share the code as to how you are plotting these?

I tried the following:

ContourPlot[0.66^2 == (x - 1)^2 + (y - 1)^2, {x, 0, 2}, {y, 0, 2}]
ContourPlot[0.66 == Sqrt[(x - 1)^2 + (y - 1)^2], {x, 0, 2}, {y, 0, 2}]

And they came out the same circle.

Cheers,

Wilson

Posted 4 years ago

Hi Wilson,

I just went to https://www.wolframalpha.com/ and typed in exactly what I wrote in my first post.

Best regards, Mawe

Posted 4 years ago

Hi Mawe,

Not sure why your replay isn't showing up.

And my apology for not reading the tag of the post to know it's for W|A.

If you look at the "bugged" plot carefully, the intersection of the x and y axis is actually not (0,0)... it intersects at (0.5, 0.5) [Why it defaults to that, I don't know]. But if you adjust the plot domain

0.66 = sqrt((x-1)^2 + (y-1)^2), x in (0, 2)

You will get what you are looking for again.

Cheers,

Wilson

Posted 4 years ago

Hi Wilson,

and I really thought checking the axis 100 times is enough before writing this post.

Next time I'll check 101 times.

Thanks and best regards, Mawe

Posted 4 months ago

Hi. How to export both x and y data of this contourplot in a .dat file ?? best regards

@Mawe Sprenger please do NOT put word "BUG" in titles unless it was confirmed to you.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract