Updated  10/23/18 Barry Dayton

Special Points and Lines

In this chapter, we learn about special kinds of points and lines associated with a real affine plane algebraic curve.

f= x^3-3x^2+3y^2-3x y^2;
l=-33.92002329959791`+13.065904192824041` x-13.065904192823876` y;
p= {3.4756865177956913`,0.879614879812377`};
q={0,0};
plt1=ContourPlot[{f==0, l==0},{x,-5,9},{y,-5,5}];
plt2=  ListPlot[{{q},{p}}, PlotLabels->{"singularity","tangent line"}];
Show[plt1,plt2, FrameLabel->"GaussCurve[z^3-3z^2]"]

3.1 Regular Points and Tangent Lines

Let f=f [x,y]=0  be a bivariate polynomial, that is, the equation of our affine plane curve. Let p be a numerical point on our curve. p is called regular if one of the partial derivatives D[f,x](Subscript[|, p]),D[f,y](Subscript[|, p]) is nonzero, in the sense of Chapter 2, when evaluated at p. Most points are regular since we are assuming, unless otherwise stated, that curves are square-free.

For a regular point p={(Subscript[x, 0]),(Subscript[y, 0])}, we will define the tangent line to be the line with the equation

l = (D[f,x](Subscript[|, p])) x +(D[f,y](Subscript[|, p]))y-c,

where

c=(D[f,x](Subscript[|, p])) (Subscript[x, 0]) + (D[f,y](Subscript[|, p]))(Subscript[y, 0]).

This choice of c puts p on line l.

Alternatively, we can use the general line function

line[{(Subscript[x, 0]),(Subscript[y, 0])},{D[f,y](Subscript[|, p]),-D[f,x](Subscript[|, p])},x,y]

since the direction of the tangent line is {D[f,y](Subscript[|, p]),-D[f,x](Subscript[|, p])}.

f=x^3-3x^2+3y^2-3x y^2;
p = {3.4756865177956913`,0.879614879812377`};
l=line[p,{D[f,y],-D[f,x],0}/.Thread[{x,y}->p],x,y]

tLine[f_,p_,x,y]:=line[p,{D[f,y],-D[f,x],0}/.Thread[{x,y}->p],x,y];

From the plot at the beginning of this section, we see how closely the tangent line approximates the curve at the point of tangency. In Chapter 5, I note that the intersection multiplicity of the curve and its tangent line is greater than 1 or that the point of tangency is a multiple zero of the system {f,l} (See Appendix 1). A key fact we will learn about this situation is that the Jacobian determinant of this system is zero at the point. That is

D[{f,l},{{x,y}}]=Det[(({{D[f,x], D[f,y]}, {D[l,x], D[l,y]}}))]=D[f,x]D[l,y]-D[f,y]D[l,x]=0

when evaluated at p. Conversely, if p is a regular point on the curve and line l and the Jacobian is 0 there, line l is the tangent line. If l=ax+by+c, then D[l,x]=a and D[l,y]=b, so the vanishing of the Jacobian determinant is independent of c. It follows that if regular point p of f=0 is a solution to the following nonlinear system

System 2 ({{{, ({{            f[x,y], =0}, {b D[f,x]-a D[f,y], =0}})}}) ,

then l=ax+by+c is the tangent line for f=0 where c is chosen so that p is a point of l=0.

The following procedure then finds points where the tangent line to f=0 is parallel to the line ax+by=0. Enter the curve f , a line ax+by and the variables.

tangentRealPoints[f_,k_,x_,y_]:=Module[{J, p,q,sol}, 
J=Det[D[{f,k},{{x,y}}]];
sol=NSolve[{f,J}, {x,y},Reals];
If[Length[sol]>0,{x,y}/.sol,{}] ];

One application is to the case where the curve is bounded and all points lie inside a finite circle. We would like to find the maximal x, y coordinates or the maximal points in certain directions.

f=x^4+4x y +y^4-1/4;

xrange=tangentRealPoints[f,x,x,y]

yrange=tangentRealPoints[f,y,x,y]

tangentRealPoints[-(1/4)+(x^4)+4 x y+(y^4),y,x,y]

{xrange[[1,1]]< x < xrange[[2,1]], yrange[[1,2]]< y < yrange[[2,2]]}

diagrange=tangentRealPoints[f,x-y,x,y]

r=Norm[diagrange[[1]]]

{ContourPlot[f==0,{x,xrange[[1,1]],xrange[[2,1]]},{y,yrange[[1,2]], yrange[[2,2]]}], ContourPlot[{f==0, x^2+y^2==r^2},{x,-r,r},{y,-r,r}]}

A special case of tangency s is when the tangent line intersects in even higher multiplicity with the curve. These points are called inflection points. Inflection points are of most interest regarding cubic curves, so we will save the discussion of inflection points for Chapter 7.

3.2 Singular Points

In the classical case, a singular point is one that is not regular. In particular, the three equations f [x,y]=0,D[f,x]=0 and D[f,y]=0 must hold, but numerically, as we have seen in Chapter 2, the failure of the criterion D[f,x]=0 is not the same as D[f,x] is not zero, which requires D[f,x] to be large enough that it cannot be considered a numerical error. In addition, a system of 3 equations in 2 unknowns is overdetermined, and numerical methods for overdetermined systems require an a priori assumption that there is actually a solution, which does not help us find the small number of actual singular points for a square-free curve.

A point p on f=0 is singular if p is a solution to System 2 for all real numbers a , b.

Numerically, we can, for finding singular points, replace the word all with random. Thus we can use our function tangentRealPoints using two different random lines, and singular points should appear in both cases, whereas regular points should not.

f=1-8x^2+8x^4+3y-4y^3;

l=RandomReal[{-1,1},2].{x,y}

k=RandomReal[{-1,1},2].{x,y}

run1=tangentRealPoints[f,l,x,y]

run2=tangentRealPoints[f,k,x,y]

tangentRealPoints[1-8 (x^2)+8 (x^4)+3 y-4 (y^3),-0.9738578350417568` x+0.5455043467593894` y,x,y]

sing=run1[[{1,3,-1}]]

ContourPlot[f==0,{x,-2,2},{y,-2,2},Epilog->{Red, PointSize[Large],Point[sing]}]

The above example also shows that singular points are actually multiple zeros in System 2, so an alternate strategy for finding singular points is to look for multiple zeros of tangentRealPoints for one random line. The Wolfram Language reports multiple zeros by repetition; however, repeated zeros cause difficulty to numerical solvers and may be reported as zeros that are close but not the same to full precision. See Appendix 1 for more details. Thus we apply a tolerance to check for repeated zeros.

Tally[run1, Norm[#1-#2]<1.*^-6&]

Therefore, our three singular points are counted twice, whereas the other solutions of System 2 are counted only once. This procedure for counting singular points would then become useful after extracting the distinct singular points from the Tally. The tolerance can be changed by the user by modifying the first line if necessary.

realSingularPoints[f_,x_,y_]:=Module[{eps},
eps=1.*^-6;
Flatten[Take[Select[Tally[tangentRealPoints[f,RandomReal[{-1,1},2].{x,y},x,y],Norm[#1-#2]<eps&],#[[2]]>1&],All,1],1]];

realSingularPoints[f,x,y]

3.3 Infinite Points

In Chapter 1, we introduced the idea of infinite points of a line. We extend this idea to an arbitrary real algebraic plane curve.

But first, given a bivariate polynomial f, we group all the monomials of the same total degree j together and call this the form (Subscript[f, (j )]), where the total degree of f is n.

f=(Subscript[f, (0)])+(Subscript[f, (1)])+⋯+(Subscript[f, (n)])

We also use the notation (Subscript[f, max])=(Subscript[f, (n)]), the maximal degree form of f.

For example, if

f= 3 +x-3y+2(x^2)-3x y+(y^2),

then

(Subscript[f, (0)])= 3
(Subscript[f, (1)])= x-3y
(Subscript[f, (2)])= 2(x^2)-3x y+(y^2).

Thus

(Subscript[f, max])=(Subscript[f, (2)])= 2x^2-3x y+(y^2).

Gauss had pointed out in his 1798 dissertation that if ||{x,y}||=(Sqrt[(x^2)+(y^2)]) is large, the curve (Subscript[f, max])=0 approximates the curve f=0. More precisely, for p on the curve f=0, there is a q on the curve (Subscript[f, max])=0  so that ((||p-q||)/p) is as small as you like as long as ||p|| is large enough.

Now (Subscript[f, max]) is homogeneous, so if {(Subscript[x, 0]),(Subscript[y, 0])}≠{0,0} is a real point on (Subscript[f, max]), then so is  {r (Subscript[x, 0]),r (Subscript[y, 0])} for any real r; hence, this set of solutions is a line through {0,0} with direction vector {(Subscript[x, 0]),(Subscript[y, 0])}. It is easily seen from the discussion in Chapter 1 that {(Subscript[x, 0]),(Subscript[y, 0]),0} is the infinite point on this line.

The infinite points described above will be called infinite points of the curve f . This definition will be further justified in Chapters 6 and 8.

f=gaussCurve[z^3-3z+1,x,y,z]

fmax = x^3-3x y^2;

sol1={x,y}/.NSolve[{fmax,x^2+y^2-1},{x,y},Reals]

infpts=Append[#,0]&/@sol1[[{1,4,5}]]

ContourPlot[{f==0, fmax==0}, {x,-5,5},{y,-5,5},ContourStyle->{Thick,Directive[Orange, Dashed]}]

The orange dashed lines here are the lines given by {r (Subscript[x, 0]),r (Subscript[y, 0])} for real r. We will call these lines asymptotes, which will be precisely defined in Chapter 6. These lines have the infinite points of the curve as infinite points.

g=Expand[y(x^2-4)-1]

gmax= x^2 y;

gmaxsf=x y;

ContourPlot[{g==0,gmaxsf==0, x^2==4}, {x,-5,5},{y,-5,5},ContourStyle->{Thick, Directive[Orange, Dashed], Directive[Green,Dashed]}]

Again, the two orange dashed lines come from (Subscript[g, max]), but here the asymptotes are given by the green dashed lines and the horizontal orange dashed line. Thus asymptotes are sometimes parallel to the lines in (Subscript[g, max]). Asymptotes will be discussed in detail in Chapter 7. However, we note the following useful functions in calculating infinite points.

form[h_,k_,x_,y_]:=FromCoefficientRules[Select[CoefficientRules[h,{x,y}],Total[#[[1]]]==k&],{x,y}];

maxForm[h_,x_,y_]:=form[h,tDeg[h,x,y],x,y];

infiniteRealPoints[f_,x_,y_]:=Module[{fm,rnd,sol},
fm=maxForm[f,x,y];
rnd=RandomReal[{-1,1},2].{x,y}-1;
sol=NSolve[{fm,rnd},{x,y},Reals];
If[Length[sol]==0,Return[{}]];sol=DeleteDuplicates[{x,y}/.sol,Norm[#1-#2]<.001&];Table[Append[sol[[i]],0],{i,Length[sol]}]
];

f=newtonHyperbola[613,x,y]

infiniteRealPoints[f,x,y]

Normalize/@%

3.4 Ordinary Real Singularities

We start by considering a singularity of f=0 at the origin {0,0}. As above, we write f=(Subscript[f, (0)])+ (Subscript[f, (1)])+⋯+(Subscript[f, (n)]) where (Subscript[f, j])=Form[f,j,x,y]. We will refer to (Subscript[f, (j )]) with the smallest j such that (Subscript[f, j])=0 as (Subscript[f, min]).

Appendix 1 of (Fischer, 2001) devotes several pages to discussing the singularity of f=(y^2)-(x^n) for n>2 and related curves.

{ContourPlot[y^2==x^3, {x,-4,4}, {y,-4,4}, ImageSize->Tiny],
ContourPlot[y^2==x^4, {x,-4,4}, {y,-4,4}, ImageSize->Tiny],
ContourPlot[y^2==x^8, {x,-4,4}, {y,-4,4}, ImageSize->Tiny],
ContourPlot[(y-x^2)(y-x^7)==0, {x,-4,4}, {y,-4,4}, ImageSize->Tiny]}

There is one case when (Subscript[f, min]) does tell the whole story.

First, note than any form, in particular (Subscript[f, min]), factors completely into linear factors. If (Subscript[f, 0]), (Subscript[f, 1]) are both 0, then {0,0} is a singular point of order k where (Subscript[f, (k)])=(Subscript[f, min]). Then we call the singularity a real ordinary singularity if there are k distinct real lines in the factorization.

In the discussion of lines in Section 1.1, we noted that an infinite point could be viewed as a direction vector of a line. Thus a quick check of the infinite points of the curve (Subscript[f, min])=(Subscript[f, (k)])=0 will tell us whether this point is an ordinary singularity; mainly, there needs to be k distinct infinite points.

fbow=x^4-x^2 y+y^3;
fmin = -x^2 y+y^3;
infiniteRealPoints[fmin,x,y]

If the singularity is a point p={(Subscript[x, 0]),(Subscript[y, 0])}, which is not the origin, we can translate to the origin with the transformation x →x+(Subscript[x, 0]), y→y+(Subscript[y, 0]). The new polynomial f  will have singularity at {0,0}.

pointMinForm[f_,p_, x_,y_]:=Module[{A,h,j},
h=f/.Thread[{x,y}->{x,y}+p];
A=<| CoefficientRules[h,{x,y}] |>;
j=Min[Table[Total[k],{k,Keys[A]}]];
form[h,j,x,y]];

pointMinForm[(y-x^2)(y-x^7),{0,0},x,y]

h=y^3-3x^2y+x^4+2x^2 y^2+y^4;

hmin =pointMinForm[h,{0,0},x,y]

infiniteRealPoints[hmin,x,y]

ContourPlot[{h==0,hmin==0}, {x,-1.5,1.5},{y,-1.5,1.5}]

f=1-8 (x^2)+8 (x^4)+3 y-4 (y^3);

p=N[{-Sqrt[2]/2,1/2}]

fm=pointMinForm[f,p,x,y]

infiniteRealPoints[fm,x,y]

fpmin=fm/.Thread[{x,y}->{x,y}-p]

ContourPlot[{f==0,fpmin==0}, {x,-2,2},{y,-2,2}]

3.5 Critical Points

Most of the ideas in this book derive from classical ideas although some have been refitted to work numerically. The material in this section is based on private correspondence with Daniel Lichtblau, a developer and mathematician at Wolfram Research.

In the currently popular field of numerical algebraic geometry, positive dimensional algebraic sets (called varieties) are identified by witness points. These form a, possibly somewhat random, set of points on the variety so that every point on the variety can be reached from a witness point by curve tracing. Curve tracing will be described and important in the next chapter. In this book, we will mostly use critical points. The study of critical points in general is important in the field of optimization.

For plane curves, calculating critical points is especially easy. In this book, we observe that a Critical Point of curve f=0 is a solution to the system

System 3 ({{{, ({{                   f, = 0}, {y D[f,x]-x D[f,y], = 0}})}}).

In particular, each singular point will be a critical point. In addition, the second equation tells us that at a regular critical point p, the tangent vector will be orthogonal to the vector from the origin to p.

Critical Points are points where the curve achieves a local minimum or maximum distance from the origin. In addition, singular points are critical points.

Note that critical points and infinite points are generally not invariants of the curve, they will not be preserved by the  transformations in Chapter 6.  Singular points are, however, invarients.

criticalPoints[f_,x_,y_]:= DeleteDuplicates[{x,y}/. NSolve[{f, y D[f,x]- x D[f,y]},{x,y},Reals],Norm[#1-#2]<1.*^-6&];

f=gaussCurve[(z^2-4)^2,x,y,z]

Factor[f]

critpts=criticalPoints[f,x,y]

ContourPlot[f==0,{x,-4,4},{y,-4,4},Epilog->{PointSize[Large],Red,Point[critpts]}, ImageSize->Small,Axes->True]

Above, we see that two of the critical points appear to be singular. Running just the defining system for critical points, we can see that {-2,0} and {2,0} are multiple points and hence are probably singular points.

{x,y}/.NSolve[{f,y D[f,x]-x D[f,y]},{x,y},Reals]

fm1=Factor[pointMinForm[f,{-2,0},x,y]]

fm2=Factor[pointMinForm[f,{2,0},x,y]]

Since some critical points are points of the curve closest to the origin, we can use our simple procedure to find the point p of a curve closest to a given point q simply by translating the plane so that q is moved to the origin and then looking for the closest points to the origin.

closestPoint[f_,q_,x_,y_]:=Module[{g,p, cp},
g=Expand[f/.Thread[{x,y}->{x+q[[1]],y+q[[2]]}]];
cp= criticalPoints[g,x,y];
p=MinimalBy[cp,Norm[#]&][[1]];
p+q];

p=closestPoint[f,{3,3},x,y]

ContourPlot[f==0,{x,-4,4},{y,-4,4}, Epilog->{{Red,PointSize[Large],Point[p]},{Black, PointSize[Large], Point[{3,3}]}}]

It should be noted that in a given case, there may be several points the minimal distance from q. In fact, if q were {0,0} in the example above, then there are four points closest to q. For later use, this procedure only returns one arbitrarily chosen closest point.