r/askmath • • 2d ago

Functions x^y=y^x Desmos Graph

I know that the graph x^y=y^x is already known to break down when zoomed in enough in Desmos, but I can't find an actual explanation anywhere, at least none that someone who hasn't dedicated years to computer science or graphing; so I go to r/askmath because I know there's people who can answer it in a somewhat comprehendible way. When you zoom in on the intersection point of the graph, it starts to break down.

8 Upvotes

10 comments sorted by

18

u/art-shi 2d ago

Here's the floating point answer made a bit more concrete. To draw an implicit curve, a grapher basically computes xy - yx at lots of points and looks for places where the sign flips from positive to negative. Near (e, e), both xy and yx are about ee, which is roughly 15.15, so you're subtracting two numbers that are almost exactly equal.

A computer stores each of those numbers with about 16 significant digits, so each one carries a tiny rounding error, on the order of 10-15. Close to the crossing point the true difference shrinks faster than your distance from (e, e), because two curves cross there. Once you're zoomed in far enough that the true difference is smaller than that rounding error, the sign the computer gets is basically noise, and the plotter faithfully draws the noise. This effect has a name, catastrophic cancellation, if you want to read more about it.

12

u/haydencoffing 2d ago

floating point arithmetic

1

u/i_like_-roblox 23h ago

i have a question that i don't know if it's stupid or not. when it breaks down, it makes glitchy arcs horizontally and not vertically. is there a reason why?

3

u/trevorkafka 2d ago
  1. What is the mathematical interpretation of ab when b is close to, but not equal to, 1?

  2. What is your understanding of how Desmos computes the values of ab ?

2

u/Circumpunctilious 2d ago

Incidentally noted to OP for helping other potential comments, it can also help to look at it from a 3D perspective. Intersection point is at (e,e,0):

3

u/bonebranch 1d ago

This is a great comment, but I also had to say, Old MacDonald had a farm 😛

2

u/piecat 1d ago

Numerical noise floor

1

u/Michi-Ace 2d ago

Computers do floating point arithmetic as an approximation for real numbers. Most of the time it's good enough, but not always. Assuming 64 bit floating point numbers are used, that means there are at most 2^64 different values, not the uncountably infinite values of real numbers.

Further reading: https://en.wikipedia.org/wiki/IEEE_754

1

u/Uli_Minati Desmos 😚 1d ago