I'm trying to graph the period-3 boundary of the Mandelbrot set in Desmos (taken from this paper), but I'm getting a "Definitions are nested too deeply" error. I understand that this is because of how Desmos uses trees to calculate everything, and Desmos calculates every instance of a function when it comes across it in the tree, but this seems to working against me in my case. For instance, I have a function "radius" that simply gets the radius given x and y, and another function "Sqrt" that calls "radius" twice with the same values of x and y. From my understanding, Desmos will do two separate calculations for "radius", rather than storing the value that "radius" returns and using it again later (like a temporary variable in C or any programming language). Now I have several nested functions like this, and so very quickly the tree becomes exponentially bigger - thus causing this error. The only way I've found to get past this error is to expand the equations out completely so I get separate equations for the real and imaginary coordinates - a feat that required several hours of copying and pasting, and ideally not the end result here.
As such, my questions are:
Is there a way to avoid this error by using functions like variables in C? In other words, store a value to some variable, and call upon it later when I need it rather than recalculate it every time?
If not, are there known simplifications I can do to the boundary equations to avoid the problem? I'm currently only approximating the period-3 boundary, but for my purposes I'd like to graph the actual curve.
My Desmos graph can be accessed here for more information.