@Jim: If you mouse over the downvote button, you see: "This question does not show any research effort; it is unclear or not useful." I downvoted because the OP was too lazy to type in the equation himself to any plotting program or calculator, which would have immediately shown that the equation is "for real". If the OP were asking for an explanation of how such an equation might be derived, as ShreevatsaR has done, that would be an appropriate question.
–
Zev ChonolesJul 30 '11 at 17:08

7

@Zev Chonoles: i do not know of any web-site that can plot that equation. i wouldn't know where to begin. Also i don't understand how any solver could plot such a diagram. (Hence the question).
–
Ian BoydJul 30 '11 at 19:35

178

I don't understand why this question has so many upvotes.
–
Jonas TeuwenAug 3 '11 at 18:36

10 Answers
10

As Willie Wong observed, including an expression of the form $\displaystyle \frac{|\alpha|}{\alpha}$ is a way of ensuring that $\alpha > 0$. (As $\sqrt{|\alpha|/\alpha}$ is $1$ if $\alpha > 0$ and non-real if $\alpha < 0$.)

As a product of factors is $0$ iff any one of them is $0$, multiplying these six factors puts the curves together, giving: (the software, Grapher.app, chokes a bit on the third factor, and entirely on the fourth)

to see the graph just google the equation: 2*sqrt(-abs(abs(x)-1)*abs(3-abs(x))/((abs(x)-1)*(3-abs(x))))(1+abs(abs(x)-3)/(ab‌​s(x)-3))sqrt(1-(x/7)^2)+(5+0.97(abs(x-.5)+abs(x+.5))-3(abs(x-.75)+abs(x+.75)))(1+‌​abs(1-abs(x))/(1-abs(x))),-3sqrt(1-(x/7)^2)sqrt(abs(abs(x)-4)/(abs(x)-4)),abs(x/2‌​)-0.0913722(x^2)-3+sqrt(1-(abs(abs(x)-2)-1)^2),(2.71052+(1.5-.5abs(x))-1.35526sqr‌​t(4-(abs(x)-1)^2))sqrt(abs(abs(x)-1)/(abs(x)-1))+0.9
–
Helder VelezAug 20 '12 at 18:47

Since any non-zero real number $y$ cannot be equal to a purely imaginary non-zero number, the presence of that term is a way of writing a piece-wise defined function as a single expression. My guess is that if you try to plot this in $\mathbb{C}^2$ instead of $\mathbb{R}^2$ you will get all kinds of awful.

Yeah, the equation looks too contrived to me. :) A parametric form (it's just quadratic and linear arcs sewn together, it looks) would still be messy, but not as messy. (Probably a good job for splines...)
–
Guess who it is.Jul 30 '11 at 2:43

+1 i was wondering how they split it up into sections.
–
Ian BoydJul 30 '11 at 19:38

11

" My guess is that if you try to plot this in C2 instead of R2 you will get all kinds of awful." What did you expect? The analytic continuation of the Batman symbol??
–
jwgAug 1 '13 at 8:43

and $f(x)+(g(x)-f(x))U(x-c)$ (where $U(x)$ is the unit step function) are equivalent, and using the "relation"

$$U(x)=\frac{x+|x|}{2x}$$

Note that the elliptic sections (both ends of the "wings", corresponding to the first piece in Shreevatsa's answer) were cut along the lines $y=-\frac37\left((2\sqrt{10}+\sqrt{33})|x|-8\sqrt{10}-3\sqrt{33}\right)$, so the elliptic potion can alternatively be expressed as

...and that's half an hour of my life that I'll never get back... ;P
–
Guess who it is.Jul 30 '11 at 18:47

9

Okay, make that an hour. Sheesh. *facepalm*
–
Guess who it is.Jul 30 '11 at 19:56

5

Great, this would be much clearer. BTW, I think it's safer to leave it at "can be expressed using B-splines" than to actually try it out: who knows how many hours that will waste, right? :-)
–
ShreevatsaRJul 31 '11 at 3:20

The 'Batman equation' above relies on an artifact of the plotting software used which blithely ignores the fact that the value $\sqrt{\frac{|x|}{x}}$ is undefined when $x=0$. Indeed, since we’re dealing with real numbers, this value is really only defined when $x>0$. It seems a little ‘sneaky’ to rely on the solver to ignore complex values and also to conveniently ignore undefined values.

A nicer solution would be one that is unequivocally defined everywhere (in the real, as opposed to complex, world). Furthermore, a nice solution would be ‘robust’ in that small variations (such as those arising from, say, roundoff) would perturb the solution slightly (as opposed to eliminating large chunks).

Try the following in Maxima (actually wxmaxima) which is free. The resulting plot is not quite as nice as the plot above (the lines around the head don’t have that nice ‘straight line’ look), but seems more ‘legitimate’ to me (in that any reasonable solver should plot a similar shape). Please excuse the code mess.

I really think that an indeterminate value multiplied by zero equals zero, so it seems to be legit. Is there any reason 0 * 0/0 should not be defined to be zero?
–
dbanetJun 15 at 19:45

@dbanet: What are you referring to? The issue above is that the original equations rely on the plotting software ignoring undefined values, which is peculiar, to say the least. The expression $\sqrt{\frac{|x|}{x}}$ (with $x$ being replaced by some expression) is what I referred to and it appears without being multiplied by $x$.
–
copper.hatJun 15 at 19:54

@copper-hat: The function $f(x)=\sqrt{\frac{|x|}{x}}$ appears only in boolean expressions $F:x\to \{\text{True},\text{False}\}$ of form $f(x)g(x)=0$, so if $g(x)$ is defined as $g:x\in\mathbb{C}\to{0}$, I would rather evaluate $F(0)$ to $\text{True}$ than to $\text{False}$, as $\forall{x}:f(x)g(x)=0\Longleftrightarrow \Big(f(x)=0\lor g(x)=0\Big)$.
–
dbanetJun 15 at 21:57

@dbanet: I'm really not sure what you are getting at. Look at the expressions in the question. They rely on the expression $\sqrt{\frac{|x|}{x}}$ returning zero for $x \le 0$, which is strange (look at Willie's answer math.stackexchange.com/a/54521/27978). My answer plots level sets, which avoids this whole issue.
–
copper.hatJun 15 at 22:10

@copper-hat: Why is it strange? For $x<0:\operatorname{Im}\left(\sqrt{\frac{|x|}{x}}\right)\neq{0}$. For $x=0$ it is indeterminate but that does not matter as long as any other factor evaluates to zero, so that the whole boolean expression holds.
–
dbanetJun 15 at 22:16

The multiple "=0" lines are different than the mulitiplications in the original, there are some backslashes in there that throw things off, and the formatting is hard to read. The pastebin is better.
–
nealmcbJul 30 '11 at 16:42

Sorry but this is not the answer but too long for a comment:
Probably the easiest verification is to type the equation on Google you'l be surprised :
The easiest way is to Google :2 sqrt(-abs(abs(x)-1)abs(3-abs(x))/((abs(x)-1)(3-abs(x))))(1+abs(abs(x)-3)/(abs(x)-3))sqrt(1-(x/7)^2)+(5+0.97(abs(x-.5)+abs(x+.5))-3(abs(x-.75)+abs(x+.75)))(1+abs(1-abs(x))/(1-abs(x))),-3sqrt(1-(x/7)^2)sqrt(abs(abs(x)-4)/(abs(x)-4)),abs(x/2)-0.0913722(x^2)-3+sqrt(1-(abs(abs(x)-2)-1)^2),(2.71052+(1.5-.5abs(x))-1.35526sqrt(4-(abs(x)-1)^2))sqrt(abs(abs(x)-1)/(abs(x)-1))+0.9

@copper, it is just because of the algorithm that draw uses for drawing implicit functions. You need to setup the variables ip_grid and ip_grid_in, that are the sampling values in your region. For example draw2d(ip_grid=[60,60], ip_grid_in=[20,20], implicit(y^2=x^3-2*x+1, x, -4,4, y, -4,4) );
–
nicoguaroOct 16 '14 at 19:21