Gaussian Decomposition of Real Plane Algebraic Curves

Barry H Dayton

Northeastern Illinois University

1.   Gauss

In 1799 Carl Friedrich Gauss gave, in his PhD dissertation, a proof of the Fundamental Theorem of Algebra.  His major contribution was the Gaussian Plane where  the complex number a+bi is identified whith the point {a,b} of the real plane.  A real algebraic curve is the set of real solutions of a polynomial in two variables with real coefficients.  His proof depends on the statement that “a branch of any algebraic curve which enters a limited space, must necessarily exit from this space somewhere” which, following the Euclidian tradition that topological statements were “self evident”, is justified by the statement “As far as I know, nobody has raised any doubts about this.” In 1849 he gave a new (4th) proof where he described the behaviour of a (real) algebraic curve in more detail.  

Gauss did not prove this either, but he sketched an algorithm to construct the curves:  follow the curves so that the set f(x,y)>0 is always to the right.  In particular each non-singular point on the curve has a well defined unit direction vector.  The purpose of this talk is to explain Gauss’ decomposition and describe a numerical Mathematica algorithm to calculate this decomposition.

In modern language Gauss’ decomposition may be phrased

Let C: f(x,y)=0 be a squarefree real algebraic  plane curve.  The curve is the complete boundary of  the region f(x,y)>0,  moreover, if K is any connected component of  f(x,y)>0, then the boundary of  K consists of connected subsets of C which are either finite ovals or unbounded at both ends.  These subcurves are distinct and form  a full decomposition of C.

2. Examples

The first example (left) is of the cubic curve  f (x, y) = (x^3) - (x^2)-(y^2)  = 0 showing the two boundary components of f(x,y)>0, one a bounded oval and the other unbounded.  These two components together form the boundary of the connected set  (white) f(x,y)<0.

The middle plot has one unbounded and two bounded components of the boundary curve.  Here the bounded component of f(x,y)>0 is inside the unbounded component.  On the right our curve f(x,y)=0 has 3 bounded components and the region f(x,y)>0 has two bounded components.  

The Mathematica algorithm below has been optimized for curves of degree 4,5 and 6.

Examples continued, Gauss Curves

Gauss applied this decomposition to what we will call a Gauss Curve which can be formed by starting with a complex polynomial p(z) in expanded or factored form and using the Mathematica command

f = ComplexExpand[Re[p /. {z -> x + I*y}]]

Gauss' 1849 proof of the FTA  was that every component of this Gauss curve passes through a point {a, b} where a + bi is a zero of p(z).

Examples Continued - Rational curves

The left and middle curves below come from the rational function y = (1/((x^2)((x^2)- 9))) or, as a curve (left) f(x,y) = (x^4) y - 9(x^2)y -1.  The middle curve is projectively equivalent to the left curve with the infinite point {0,1,0} at the end of the y-axis sent to {0,1}.  The singularity is a union of a normal crossing and a cusp.  The green and purple regions of these two plots correspond to the same component but the orange and brown regions on the left are merged to the single blue component in the middle.

3. The Algorithm

The algorithm uses curve tracing on monotonous segments.  A monotonous segment of curve f(x,y) = 0 has no inflection points in the interior and D[f,x], D[f,y] are both non-zero in the interior of the segment. The points not allowed are called critical points.  Since there are only finitely many critical points  the curve is a union of finitely many monotonous segments inside any large circle.  In particular each interior point of a monotonous segment is non-singular. More importantly, if the endpoints are also non-singuar each point has a unique unit tangent and normal vector which can be calculated with the Mathematica code

GFrame[f_,p_,X_]:=Module[{tl,nl,tv,nv,u},
 tv={D[f,X[[2]]],-D[f,X[[1]]]}/.Thread[X->p];
nv=Cross[tv]; u=p+.1*nv;
If[(f/.Thread[X->u])<0,nv=-nv];
tv=Cross[nv]; {tv,nv}]

In general tracing real curves is difficult.  But on monotonous segments the curve is nicely approximated by the line segment joining the endpoints and having this designated tangent vector helps prevent curve jumping.  Starting from the relatively small number of known segment starting points the algorithm attempts to trace each monotonous segment.  Since all segments are independent, if some cannot be traced using default settings, one still has a good idea of the curve.  The function QPlot produces this result, left incomplete, right complete.

Algorithm Continued  -- Singular points

For numerical purposes a point p on the curve f(x,y) = 0 is singular if the nonlinear system {a D[f,x]+ b D[f,y],f} has a multiple solution at  p  for a,b random real numbers.  This could appear numerically as a small cluster of solutions.  All real singular points can be found by the following one line Mathematica code:

realsingularpoints[f_,X_,eps_:.02]:=
Flatten[Take[Select[Tally[Cases[X/.NSolve[{f,{D[f,X[[1]]],D[f,X[[2]]]}.RandomReal[{-1,1},2]}],{_Real,_Real}],Norm[#1-#2]<eps&],#[[2]]>1&],All,1],1]

Singular points are handled by removing a small disk around each singularity before applying the method in the previous page.  Points where the curve hits the boundary of the disc are connected by line segments to the singular point.

detail ->

Algorithm Finished

We now have a somewhat random set of oriented piecewise segments  {p0, p1, ... pk} with endpoints consisting of critical points or points on the bounding circle.  With the exception of these boundary points each end point must appear at the beginning of one list and the end of another.  Thus these lists can be joined into longer lists which either start and finish on the boundary or are closed  -- have same beginning and end.  These are the components of the Gaussian decomposition.  Some  examples follow.

Three decompositions of f=GaussCurve[z^3-3z]=-3 (x^2)+(x^3)+3 (y^2)-3 x (y^2)   (f, -f, algebraists decomposition)

4. Conclusion

An algorithm to analyze the topology of a plane algebraic curve has been developed.  In black-box mode it can accurately analyze and graph many curves up to degree 6 and sometimes higher. The algorithm has a random component so several attempts are recommended.  In some difficult cases the algorithm can be a starting point and the user can repair the output with minimum difficulty.  Besides the Gauss decomposition for singular curves the combinatorial data can be manually manipulated to give the desired form.  Functions currently implemented are

QPlot   -- Gives a quick plot of function without decomposition
QData  -- Gives the data from QPlot, can be user manipulated
GPlot      -- a plot of the attemped decomposition along with some information
GData    --  Data from GPlot

Some additional utilities are also available to help a user manipulate the raw data from QData and GData.

FindComp  -- Locates interval in data containing point and adds point to data.
RefineComponent -- Approximately doubles the number of points in the Data
GListPlot  -- Graphs manipulated GData on region plot

The software is available from the author on his  community page and website  www.barryhdayton.space