Function Repository Resource:

PointsetDerivativeRoots

Source Notebook

Get the roots of a derivative for applying the Lucas–Gauss theorem on a set of points

Contributed by: Ed Pegg Jr

ResourceFunction["PointsetDerivativeRoots"][pts]

applies the Lucas-Gauss derivative on a set of pts and finds the roots.

Details

The Lucas–Gauss theorem states that the convex hull of the roots of any nonconstant complex polynomial contains the roots of its derivative.
With input {{r1,im1},{r2,im2},} and zi=ri+imi, the roots of derivative D[(z-z1)(z-z2),z] are returned as points.
Throughout this document, the roots of a derivative of a nonconstant complex polynomial generated by points are called "roots", out of convenience.

Examples

Basic Examples (2) 

Find the roots of a set of points:

In[1]:=
pts = {{Sqrt[6], 1}, {-Sqrt[6], 1}, {0, -2}};
foci =  ResourceFunction["PointsetDerivativeRoots"][pts]
Out[2]=

By Marden's theorem, the roots of triangle vertices are the foci of an ellipse tangent to midpoints of the triangle's edges:

In[3]:=
Graphics[{Triangle[pts], Green, Point[foci], Circle[{0, 0}, {Sqrt[2], 1}]}]
Out[3]=

Find the roots of a set of points:

In[4]:=
p = {{3, 1}, {4, 1}, {5, 9}, {2, 6}, {5, 3}};
d = ResourceFunction["PointsetDerivativeRoots"][p]
Out[5]=

By the Lucas–Gauss theorem, the convex hull of the roots is entirely contained by the convex hull of the original points:

In[6]:=
Legended[
 Graphics[{FaceForm[], AbsolutePointSize[4], {EdgeForm[ColorData[97, 3]], ColorData[97, 3], ConvexHullMesh[p], Point[p]}, {EdgeForm[ColorData[97, 4]], ColorData[97, 4], ConvexHullMesh[d], Point[d]}}], PointLegend[{ColorData[97, 3], ColorData[97, 4]}, {"original", "derivative"}]]
Out[7]=
In[8]:=
RegionWithin[ConvexHullMesh[p], ConvexHullMesh[d]]
Out[8]=

Scope (2) 

The root of two points is the midpoint:

In[9]:=
p2 = {{3, 1}, {5, 3}};
d2 = ResourceFunction["PointsetDerivativeRoots"][p2]
Out[8]=

The root of three points is given by the foci of the ellipse tangent to the midpoints of the triangle:

In[10]:=
p3 = RandomReal[{-2, 2}, {3, 2}];
d3 =  ResourceFunction["PointsetDerivativeRoots"][p3];
Graphics[{Triangle[p3], Green, ResourceFunction["FociPointEllipse"][
   Append[d3, Mean[Take[p3, 2]]]],
  Red, Point[d3]}, ImageSize -> Small]
Out[11]=

This is equivalent to the Steiner circumellipse, scaled by a factor of 1/2:

In[12]:=
Graphics[{Triangle[p3], Green, TransformedRegion[ResourceFunction["SteinerCircumellipse"][p3], ScalingTransform[{1/2, 1/2}, Mean[d3]]],
  Red, Point[d3]}, ImageSize -> Small]
Out[13]=

Possible Issues (1) 

Much as in a convex hull, duplicating a point will not affect the result:

In[14]:=
pts = {{Sqrt[6], 1}, {-Sqrt[6], 1}, {0, -2}, {0, -2}};
foci =  ResourceFunction["PointsetDerivativeRoots"][pts]
Out[15]=

Neat Examples (1) 

Show eleven levels of the Lucas-Gauss theorem:

In[16]:=
p11 = RandomReal[{-2, 2}, {13, 2}];
d11 = NestList[ ResourceFunction["PointsetDerivativeRoots"][#] &, p11,
    10];
Graphics[{EdgeForm[Black], White, ConvexHullMesh[#] & /@ d11, Table[{Hue[n/12], Point[d11[[n]]]}, {n, 1, 11}]}, ImageSize -> {400, 300}]
Out[18]=

Version History

  • 1.0.0 – 08 March 2023

Source Metadata

Related Resources

License Information