# How to draw Lemniscate of Bernoulli type curves for higher degree polynomials

The lemniscate of Bernoulli is a curve in the complex plane given by $|z^2-1|=1$ that has the shape of $\infty.$: This is a special case of the Cassini ovals that has the form $|z^2-1|=r^2$ for $r\in\Bbb{R}.$ The important property of the lemniscate of Bernoulli is that it passes through the critical point of the polynomial $P(z)=z^2-1.$

I am trying to see the generalization of this notion for higher degree polynomials.

For example, consider the polynomial $z^3-z.$ I assume the corresponding Bernoulli lemniscate type curve is a lemniscate with three holes (This may not be the correct terminology, but hope you can visualize it).

Also (I assume) the corresponding lemniscate curve of $z^3-1$ is a three leaved rose.

But for complicated polynomials like $z(z-1)(z-3)(z-6)$, we may have more than one possible lemniscate structures.

Now, I am trying to visualize these possible lemniscate structures graphically. Is there any easy way to do this using Mathematica?

• To broden the context one can draw a lemniscate using ContourPlot for the Weierstrass elliptic function, see e.g. Integrate yields complex value, while after variable transformation the result is real. Bug?. See also the lemniscatic case in Weierstrass Elliptic Function. – Artes Mar 9 '18 at 19:22
• It is not clear if you are looking for something like this: Manipulate[ z = x + I y; ContourPlot[Abs[z^3 - z] == r^2, {x, -2, 2}, {y, -2, 2}], {{r, 1/2}, 0.1, 2}]. I upvoted your question since I find it an interesting topic, nonetheless I'd prefer to clarify and underline what is your problem since I cannot see a piece of Mathematica code. – Artes Mar 9 '18 at 19:45
• @Artes: This is very closed to what I am looking for. But more specifically I need only the pictures of curves with self intersections. – Bumblebee Mar 9 '18 at 20:12
• I don't understand what you need here either; why wouldn't the ContourPlot[] approach suffice here? Also, have you seen this? – J. M.'s technical difficulties Mar 9 '18 at 22:38
• To summarize: given a set of points, you want to find values of $r$ such that the resulting Cassinian curves have nodes? – J. M.'s technical difficulties Mar 10 '18 at 21:58

I'll use $|z(z-1)(z-3)(z-6)|^2=r$ as an example for this answer. To find crunodes, we refer to the condition for a singular point to be a crunode:

…a crunode of the curve is a singularity of the function $f$, where both partial derivatives $\partial f \over \partial x$ and $\partial f \over \partial y$ vanish. Further the Hessian matrix of second derivatives will have both positive and negative eigenvalues.

Thus:

expr = With[{z = x + I y},
ComplexExpand[Abs[z (z - 1) (z - 3) (z - 6)]^2,
TargetFunctions -> {Re, Im}] - r];

grad = D[expr, {{x, y}}]; hess = D[expr, {{x, y}, 2}];

sel = Pick[sols, Negative[Det[hess] /. sols]]
{{x -> Root[-9 + 27 #1 - 15 #1^2 + 2 #1^3 &, 1], y -> 0},
{x -> Root[-9 + 27 #1 - 15 #1^2 + 2 #1^3 &, 2], y -> 0},
{x -> Root[-9 + 27 #1 - 15 #1^2 + 2 #1^3 &, 3], y -> 0}}


This yields three points that can possibly be crunodes, depending on the value of r. Now, we do this:

vals = FullSimplify[r /. First[Solve[#, r, Reals]]] & /@ (expr == 0 /. sel)
{Root[-332150625 + 32240754 #1 - 430353 #1^2 + 256 #1^3 &, 1],
Root[-332150625 + 32240754 #1 - 430353 #1^2 + 256 #1^3 &, 2],
Root[-332150625 + 32240754 #1 - 430353 #1^2 + 256 #1^3 &, 3]}


Visualize the corresponding curves:

Table[ContourPlot[With[{z = x + I y}, Abs[z (z - 1) (z - 3) (z - 6)]^2] == r,
{x, -8, 8}, {y, -8, 8},
PlotLabel -> "r=" <> ToString[NumberForm[N[r], 6]]],
{r, vals}] // GraphicsRow • Thank you very much for your answer. I'll ask if I found any unclear thing. – Bumblebee Mar 13 '18 at 22:54
• Today I played with this and realized that it does not work with polynomials like $z^4-1.$ What did I miss here? – Bumblebee Mar 25 '18 at 21:11
• If you tried the evaluation up to sel, you'll notice that the result of sel is an empty list; i.e., no saddle points were found. – J. M.'s technical difficulties Mar 26 '18 at 0:38