{'fraction_non_alphanumeric': 0.0447390984811367, 'fraction_numerical': 0.019659480646741792, 'mean_word_length': 3.9502804304987116, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Phase portraits of random planar homogeneous vector fields

We study the phase portraits with positive probability of random planar homogeneous vector fields of degree n. In particular, for n=1,2,3, we give a complete solution of the problem and, moreover, either we give the exact value of each probability or we estimate it by using the Monte Carlo method. It is remarkable that all but two of these phase portraits are characterized by their index at the origin and by their number of invariant straight lines through it.


Introduction and main results
The systems of ordinary differential equations, or equivalently vector fields, are ubiquitous tools in the mathematical modeling of physical phenomenon. When studying parametric families of such vector fields typically one tries to know the different types of phase portraits that can appear in the family and what is their characterization: that is, to obtain their bifurcation diagram. A second level of study could be to establish the measure of each possible phase portrait among the different phase portraits in the family or any other dynamic characteristic such as the existence of attractors, invariant straight lines, or limit cycles. This is the aim of some recent works: [4,7,18] and [26].
The study of the probability of appearance of the different phase portraits may be of practical interest, especially since sometimes we are dealing with families of vector fields with parameters that vary randomly to model real-life situations. This is done in order to include the uncertainties in the model or to treat the natural variability in the parameters, see [6,15,23] for example.
Historically, the interest in this approach can be also traced back to A.N. Kolmogorov, from whom there is an interesting anecdote that we have encountered in [16]. According to V.I. Arnold [2], it seems that Kolmogorov proposed to his students of the Moscow State University a problem that should give a statistical measure of the quadratic vector fields having limit cycles. He gave them several hundreds of such vector fields with randomly chosen coefficients. Each student was asked to find the number of limit cycles of his/her vector field. Surprisingly, the experiment gave that none of the vector fields had any limit cycle, although, since hyperbolic limit cycles form open sets in the space of coefficients, the probability to get them for a random choice of the coefficients is positive.
In this paper we study the probabilities of the different phase portraits appearing in homogeneous planar vector fields. Their phase portraits in the Poincaré disk ( [12]) are well understood and they can be described in terms of the number of real zeroes of some associated polynomials, their relative position and several algebraic inequalities involving these zeroes and the parameters of the vector fields, see [1, 9,11].
We will focus on the quadratic and cubic cases and for completeness we also will tackle the linear case. In fact, the results for n = 1 are well-known ( [18,26]) and, for instance, they are proposed as an exercise in the S. Strogatz book [25, Exer. 5.2.14, p. 143]. We include a simple and self-contained proof for this case. Our characterization of the different phase portraits, for n ∈ {1, 2, 3}, will be mainly based on the computation of the index at the origin, i, and on the study of the number of invariant lines through it, l. As we will see, these two numbers provide a complete algebraic characterization, by means of inequalities, of all the different classes of phase portraits with positive probability when n is 1 or 2, and almost a complete one for n = 3.
In the cases that we have not been able to compute analytically the probabilities, we give their estimations by using the Monte Carlo method ( [5,21]) and the algebraic classification tools developed in this paper.
We will say that F n (x, y) = P n (x, y) ∂ ∂x + Q n (x, y) ∂ ∂y is a random planar homogeneous polynomial vector field of degree n if all the variables A i,j and B i,j are independent normal random variables with zero mean and standard deviation one. For short, we will write A i,j ∼ N(0, 1) and B i,j ∼ N(0, 1). The hypothesis that all the coefficients are N(0, 1) is commonly used, see for instance [4,7,18,26] and it is quite natural and well motivated. In Section 3 we briefly recall this motivation.
In general we will denote by P (W ) the probability that a phase portrait of type W occurs, modulus time orientation. Next results collect our main achievements. Finally, the probability of the origin to be a global attractor is 1/4 and the one of being a global repeller is also 1/4. To state our results for n = 2, 3 we need to introduce next two values which, as we will see in item (c) of Theorem 10, correspond to the expected number of invariant straight lines for vector field (1) through the origin, for n = 2 and n = 3, respectively. These values are obtained by using the powerful tools introduced in the nice paper of Edelman and Kostlan [13].
Theorem 2. Consider quadratic random vector fields F 2 of the form (1). Their phase portraits with positive probability are the five ones shown in Figure 2. They are completely determined by the couple (i, l) =(index, number of invariant lines). Moreover, their corresponding probabilities, in addition to 5 j=1 P (Q j ) = 1, satisfy and they are estimated in Table 1. Estimated probabilities Observed frequency Table 1: Estimations of the probabilities P (Q j ), j = 1, 2, . . . , 5.
To estimate the values P (Q j ) we have used the Monte Carlo method, by generating 10 8 random quadratic homogeneous vector fields, that is, 10 8 vectors in R 6 whose entries are pseudorandom numbers simulating 6 independent random variables with N(0, 1) distribution. This algorithm consists on repeated random sampling and gives estimations of the desired probabilities due to the laws of large numbers and of iterated logarithm, see [5,21].
In almost all cases, the corresponding phase portrait for the generated sample is obtained by checking the sign of algebraic inequalities among the obtained values of these 6 independent random variables. These signs allow to know the index of the origin and number of invariant straight lines through it.
It turns out that using n samples it gives the searched value with an absolute error of order O ((log log n)/n) 1/2 , which practically behaves as O(n −1/2 ). Since in our simulations we take n = 10 8 , the approaches found for the desired probabilities will have an absolute error of order 10 −4 . The results are given in Table 1. In the right-hand side of that table the observed frequencies are also collected in terms of the index of the critical point.
Notice that the estimated probabilities of the phase portraits Q 1 , Q 2 , Q 3 , Q 4 and Q 5 are in good agreement with the relations given in Theorem 2.
Observe that precisely P (Q 1 )+P (Q 2 )+P (Q 3 ) is the probability of having three invariant straight lines and P (Q 4 )+P (Q 5 ) = 3−Λ 2 2 ≈ 0.67828 is the probability of having one invariant straight line. These results are also in good agreement with the ones of [4]. In that paper the authors give estimations of the probabilities of the different phase portraits of structurally stable quadratic vector fields, not necessarily homogeneous. It is easy to see that structurally stable vector fields are vector fields with full probability. Their phase portraits near infinity are related with the ones of homogeneous quadratic vector fields. In particular, the number of critical points at the equator of the Poincaré disk is twice the number of invariant straight lines of the corresponding homogeneous quadratic vector field. Attending to the behavior at infinity they consider ten different families, the first five having a couple of diametrically opposed singularities at infinite and the other ones having three couple of singularities.
Adding the observed frequencies for the first five families in Table 2 in [4], also obtained by Monte Carlo simulation, we get 0.2542 + 0.2542 + 0.0740 + 0.0775 + 0.0184 = 0.6783. This value is a good approximation of the probability of having one invariant line given above.
For n = 3, the results are similar to the quadratic case.
Theorem 3. Consider cubic random vector fields F 3 of the form (1). Their phase portraits (modulus time orientation) with positive probability are the nine ones shown in Figure 3.
Except for the phase portraits C 3 and C 4 , they are determined by the couple (i, l) =(index, number of invariant lines). Moreover, their corresponding probabilities, in addition to 9 j=1 P (C j ) = 1, satisfy , and they are estimated in Table 2.
Again, the estimated probabilities given in Table 2 are in good agreement with the relations given in Theorem 3.

Remark 4.
Notice that when n is even, all phase portraits of homogeneous vector fields are conjugated with the ones obtained reversing the orientation of all trajectories. This is so, because the associated differential equations are invariant with the change (x, y, t) → (−x, −y, −t). This is no more true when n is odd. For instance, if we consider phase portraits L 2 or L 3 in Figure 1, or C 2 or C 5 in Figure 2, and we reverse the arrows, the new phase portraits are not conjugated, but topologically equivalent.

Estimated probabilities
Observed frequencies 0 is a global attractor 0.24238 0 is a global repeller 0.24238 Table 2: Estimations of the probabilities P (C j ), j = 1, 2, . . . , 9. Because the distribution of the coefficients of random planar homogeneous vector fields of degree n is absolutely continuous and with a positive density, the phase portraits that have positive probability coincide with the ones that are structurally stable, in the world of polynomial homogeneous vector fields od degree n, see for instance [17] for the precise definitions. Fixed n, the number of topologically equivalent different classes of phase portraits S n of such systems is given in Table 1 of that paper. The first ten values are reproduced in Table 3. Observe that the value S 2 coincides with the number of different phase portraits given in Theorem 2. On the other hand, the values S 1 and S 3 are bigger than the corresponding ones of Theorems 1 and 3, respectively. This is so, because by Remark 4, when n is even the phase portraits are invariant with respect the change (x, y, t) → (−x, −y, −t) and when n is odd this is no more true. In fact, changing the direction of all the arrows, when n = 1, only one of the three obtained vector fields is topologically equivalent to itself and so, the three phase portraits of Theorem 1 split into 1 + 2 × 2 = 5 = S 1 phase portraits.
Similarly, for n = 3, only four of the phase portraits of Theorem 3 remain invariant and as a consequence we obtain 4 + 2 × 5 = 14 = S 3 phase portraits. Finally, notice also that by the invariance of the distribution of the coefficients of vector field (1), the probability of a phase portrait and the one of the phase portrait obtained by changing the arrows direction coincide. For instance, in the linear case, as a corollary of Theorem 1, the probabilities of attracting node is ( √ 2 − 1)/4 and the one of repelling node is the same.  Table 3: Number of phase portraits with positive probability S n for vector field (1).
We organize the paper as follows. In Section 2 we recall the main results of qualitative theory that allow to study the phase portraits of homogeneous vector fields together with the usual methods to know the multiplicity, the index i and the number of invariant straight of planar vector fields, l. Section 3 collects all the probabilistic preliminaries and results that we will use. In particular we discuss the reason that justifies our definition of random planar homogeneous vector field (1), as well as a tool to study the expected number of real zeroes of random polynomials ( [13]). Sections 4, 5 and 6 are devoted to prove Theorems 1, 2 and 3, respectively. Finally in the Appendix we study the number and location of the real roots of polynomials of degree 3 and 4. As we will see these results will be needed to study the couple i and l, that recall give the index of the origin and the number of invariant lines of the vector field.

Algebraic tools for the classification of the phase portraits
Consider planar polynomial vector fields of type where p n (x, y) and q n (x, y) are real homogeneous polynomials of degree n. Their phase portraits on the Poincaré disk can be obtained following the procedure detailed in [1]. For the cases n = 2, 3 they are given in [1,11] and [9] respectively. For n = 1, they correspond to the well-known linear homogeneous vector fields. Since our objective is to compute the probability of the different available phase portraits we need to characterize them in terms of algebraic equalities and inequalities. As we will see, except in two cases that will be explained in Section 6, the characterization of their phase portraits occurring with positive probability can be done by using only two objects: the index i of the vector field associated to (4) at the origin and the number of invariant straight lines l, through this point.
We dedicate next two subsections first to recall how to know the number of invariant straight lines through the origin and secondly to explain how to compute the index of an isolated critical point. Because there are no essential differences, most results in this second section deal with m-dimensional vector fields.

Invariant straight lines
It is straightforward to see that the line αx + βy = 0 is invariant by the flow of the homogeneous system (4) if and only if αx + βy is a factor of x q n (x, y) − y p n (x, y). Due to the homogeneity we see that the slopes of these invariant straight lines, different from Hence, if t n (κ) ≡ 0 and p n (0, y) ≡ 0 the number of invariant straight lines l ≤ n + 1 is exactly the number of real zeros of t n (κ). If t n (κ) ≡ 0 or p n (0, y) ≡ 0, the number of invariant straight lines is either infinity or l + 1.
Finally, we remark that the number of real roots of a general polynomial of a fixed degree can be characterized in terms of algebraic inequalities among its coefficients. This fact can be proved for instance by using Sturm sequences. See the Appendix for the explicit results for polynomials of degree 3 and 4.

Index at isolated singular points
To simplify the notation, we will do the following abuse of notation: we will write f = (f 1 . . . , f m ) to denote an analytic map of R m but also a finite map germ, or even the vector field f = m j=1 f j ∂/∂x j . In all the cases, the meaning will be explicitly stated or clearly deducible from the context. In this section we will assume that f (0) = 0, since we will always work with the singular point at the origin. If f is a C ∞ map we can consider the local ring of germs of C ∞ functions at the origin C ∞ 0 (R m ) and the quotient ring where (f ) denotes the ideal generated by the components of f. It holds that when 0 is an isolated singularity then Q(f ) is a finite dimensional real vector space and its dimension is called the multiplicity of f at 0, µ(f ). In fact, when f is polynomial this multiplicity coincide with the number of complex preimages of any regular value near 0.
As mentioned above, we want to determine the index by means of algebraic inequalities among the coefficients of our vector fields. This can be done, for instance, by using the Eisenbud-Levine signature formula for the index, see [14] or also [3, Chap. 5] for instance.
then the index of f at 0, is ind(f ) = signature <, > .
Since the signature of a quadratic form is the difference between the number of positive eigenvalues and the number of negative ones of its associated matrix, we need to know this number in terms of algebraic inequalities among the coefficients of its characteristic polynomial. This always can be done by using Sturm sequences ( [24]). Since we will study the index of the quadratic and cubic planar homogeneous vector fields, we need to know the number of real roots for polynomials of degree 3 and 4. For polynomials of degree 3 we also need to know the number of positive and negative real roots. These characterizations are done in the Appendix.
We will also use the following simple properties of the index.
, be a C ∞ finite map germ. Then: Proof. (a) The proof is straightforward by using the algebraic formula for the index given in Theorem 5. Clearly Q(f ) = Q(g) and the Jacobian determinant of g, J g , is minus the is a linear functional which satisfies that ϕ g (J g ) > 0, and its corresponding matrix B is are the characteristic polynomials of A and B respectively. Hence the signature of <> ϕg is minus the signature of <> ϕ f .
(b) This proof follows similarly.
Finally, it is also known, see [8], that Applying the above results to (4) we have: Corollary 7. Let f be a homogeneous planar vector field (4) of degree n. Assume that the origin is an isolated singularity. Then µ(f ) = n 2 and 3 Probabilistic tools for the study of the phase portraits In this section we start motivating our definition of random homogeneous vector field (1).
We also prove Theorem 10 that contains relationships among several probabilities of the phase portraits of (1) with positive probability.
Consider families of vector fields in the plane that are written as where Y 1 , Y 2 , . . . , Y k are fixed vector fields on R 2 and A 1 , A 2 , . . . , A k are random variables to be fixed, taking values on R. In this way each event ω consists on a given vector field with a j = A j (ω) (notice that in the whole paper we will use capital letters to denote the coefficients of vector fields or polynomials when they are random variables, and lowercase letters when they are real numbers). In order to give a measure of the different phase portraits a fundamental issue is to determine which is the natural election of distribution of the random variables A j . Only after this step is properly done we can ask for the probabilities of some dynamical features.
It is natural to assume that the random variables A j are continuous, independent and where S = k j=1 A 2 j , has a uniform distribution on the sphere S k−1 ⊂ R k . Next result will justify our choice of distribution for the random variables A j .
Notice that for simplicity it is not restrictive to consider that the variance for the centered normal random variables is 1.
The above explanation justifies the definition of random homogeneous vector field given in (1). Notice that they are under the formulation of (6) with k = 2n + 2 and each Y i either as x j y n−j ∂ ∂x or x m y n−m ∂ ∂y , for some j and m with 0 ≤ j ≤ n, and 0 ≤ m ≤ n.
Remark 9. Observe that the probability density function associated to (1) is positive.
Therefore, any non-empty event described by algebraic inequalities is measurable and has positive probability. Similarly, the measurable events such that in their description appears a non trivial algebraic equality have probability zero.
Next result collects most of the information needed to prove our main results.
Theorem 10. (a) Set u n (k) = P (the index of (1) at 0 is k). Then: (i) u n (k) = 0 if and only if |k| ≤ n and k ≡ n (mod 2), (ii) u n (k) = u n (−k) and as a consequence the expected index of the random vector field (1) is |k|≤n ku n (k) = 0.
(b) Set a n = P (0 is a global attractor for (1)) and r n = P (0 is a global repeller for (1)).
Then a n = r n . Moreover a n = 0 if and only if n is odd.
Proof. First observe that from the results of [1] and [14] the events we are interested in are measurable, because they are defined by algebraic inequalities (see next sections to have more details of how to characterize these events). Observe that by Remark 9 the probability of P n (x, y) and Q n (x, y) to have a common factor is zero since this fact is characterized by an algebraic equality among the coefficients of P n and Q n (as can be seen taking successive resultants). Hence we can always assume that the origin is isolated.
In particular, we are under the hypotheses of Corollary 7, and therefore the statement (i) of item (a) follows. To prove item (ii) consider the associated random vector field G n (x, y) = P n (x, y) ∂ ∂x − Q n (x, y) ∂ ∂y . Observe that P (ind(F n ) = k) = P (ind(G n ) = k) because, due to their symmetry, the variables B i,j ∼ −B i,j ∼ N(0, 1). From Lemma 6 (a) we have ind(G n ) = −ind(F n ), and the result follows.
(b) Recall that x = 0 is a global attractor (resp. a global repeller) if lim t→∞ (x(t), y(t)) = 0 for all the solutions (x(t), y(t)) of the system (resp. lim t→−∞ (x(t), y(t)) = 0). In the homogeneous case, if x = 0 is a global attractor it cannot have neither elliptic nor hyperbolic sectors since otherwise there would appear an invariant straight line with an escaping orbit.
Hence, according to the Bendixon's index formula, ind(f ) = 1 + (e − h)/2, since e = h = 0 we have ind(f ) = 1 and therefore, from Corollary 7, n must odd. The same argument holds for the existence of global repellers. Using again the tools introduced in [1] to determine the phase portraits we know that the events of having a global attractor or a global repeller are measurable. Moreover, in particular we know that a n = r n = 0 when n is even.
Notice that f has x = 0 as a global attractor if and only if −f has x = 0 as a global repeller, and again due to the symmetry of the distribution of the random variables A i,j and B i,j , we know that f and −f have the same distribution. Hence a n = r n as we wanted to prove. Finally, it is not difficult to find an open set of vector fields with the desired properties, so a n = r n = 0 when n is odd.
(c) In the paper [13], Edelman and Kostlan give the expected number of real zeros of any equation of type where A j i = 0, . . . , k are normal distributed with zero mean, not necessarily being neither identically distributed nor independent, and f j are differentiable functions. Following the notation in [13,Thm 3.1] if we consider a random polynomial where P j are normal random variables with mean zero and covariance matrix M n+1 ; w(κ) = M 1/2 n+1 ·(1, κ, κ 2 , . . . , κ n+1 ) t and w(κ) = w(κ)/||w(κ)||, then the expected number of real zeros of P is given by the Edelman-Kostlan formula: A straightforward computation gives that the random polynomials T n (κ) in (5)  Moreover since all A i,j and B i,j have N(0, 1) distribution and are independent, it holds that where C 0 and C n+1 are N(0, 1) and the other C j are centered normal random variables with standard deviation √ 2, being all the n + 2 random variables independent. Thus we deal with an expression of the form (9). In particular, their covariance matrices are Hence, For n = 2, 3 we skip the details. It is also well-known that the index of the origin in the saddle case is −1 while in the node and focus cases it is +1. Therefore, by item (a) of Theorem 10, l 1 = l 2 + l 3 . By using both equalities we get that l 1 = 1 2 and l 2 + l 3 = 1 2 . Hence to prove the theorem it suffices to calculate either l 2 or l 3 .
It is easy to see that the shadowed area in Figure 4 corresponds to K. Using the symmetries of this curve, and calling g 1 (s) := arctan 1 √ sin(2s) , we get that K sin(t) dt ds = 4 Doing the change u = 2s, we get Hence and the computation of all probabilities follows.
Finally, notice that if a vector field has the phase portrait L 2 (or L 3 ) and we perform a time reversion t → −t then we get the same picture with reversed time arrows, and hence the two phase portraits are not conjugated, but topologically equivalent. In fact, the pictures of L 2 and L 3 in Figure 1 correspond to global attractors. For the phase portrait L 1 a time reversal gives a conjugated one.
Due to the symmetry of the random variables that give the coefficients of the random homogeneous vector field (1) we know that f and −f have the same distribution. Hence the probability to get an attractive node (resp. focus) coincides with the probability to get a repulsive node (resp. focus), see also item (b) of Theorem 10. Therefore, P (0 is and attractor) = P (0 is an attractive node) + P (0 in an attractive focus) Alternative proof of Theorem 1. Set l j = P (L j ), j = 1, 2, 3. Following the same steps that in the previous proof Theorem 1, we obtain that l 1 = 1 2 and l 2 + l 3 = 1 2 . The only difference in this proof is how to find l 2 and l 3 . By item (c) of Theorem 10, 2 l 1 + l 2 + 0 · l 3 = 2 1 (2) + 0 · 1 (0) = Λ 1 = √ 2.
By joining the three equalities we obtain that l 3 = 1 − √ 2/2 and the result follows.

Random homogeneous quadratic vector fields
Since we are interested in knowing the phase portraits (1) with positive probability, we can assume that the components of our vector fields have not common factors (see Section 2.2).
Hence the multiplicity at 0 is n 2 . For the quadratic case (n = 2), it is 4.
To prove Theorem 2 we need to algebraically characterize the indices at the origin and also the number of invariant straight lines though it for quadratic homogenous vector fields with the origin being an isolated singularity. This is so because, as we will see, the phase portrait of the quadratic homogeneous vector fields with positive measure in the event space (which is given by the parameter space Ω = R 6 ) is characterized by these two numbers.

Index at the origin
By Corollary 7 the index at the origin of (10) is −2, 0 or 2. The next result, explicitly characterizes ind(f 2 ) for generic vector fields, in terms of algebraic inequalities (hence open sets in the parameter space R 6 ). Set We introduce an additional genericity condition for vector field (10). We will say that the vector field f 2 is well-posed if af − cd = 0, λ · µ = 0, λµ − 1 = 0 and λ + µ = 0. Observe that well-posed random homogeneous quadratic vector fields (10) have full probability.
Hence, the residual class of the Jacobian of f 2 isJ = jxȳ.

Number of invariant straight lines trough the origin
Concerning the number of invariant straight lines passing through the origin of (10), as we have proved in Section 2.1, generically it suffices to look at equation (5), which writes Again, generically a cubic equation has either three different real roots or one simple real root. These two possibilities are distinguished by the discriminant of t 2 , ∆ t 2 which is given by The result is that t 2 has three different real roots if and only ∆ t 2 > 0 and t 2 has just one simple real root if and only ∆ t 2 < 0. These two cases give a full probability event for the random vector field (1) with n = 2. Table 1 Proof of Theorem 2. The phase portarits of quadratic homogeneous vector fields are wellknow, see [1,11]. It is not difficult to see that the only one with positive probability are the five ones given in Figure 2. This is so, because all the other ones are characterized by some equality among the coefficients and the vector field, and so, they have probability 0 of appearance. Set q j = P (Q j ), j = 1, 2, . . . , 5. By looking at these phase portraits and using the notation of Theorem 10 we have that u 2 (−2) = q 1 , u 2 (0) = q 2 + q 4 , u 2 (2) = q 3 + q 5 , 2 (1) = q 4 + q 5 , 2 (3) = q 1 + q 2 + q 3 .
Taking into account the three relations among the q j given in Theorem 2, only two more relations among these five probabilities have to be found in order obtain their exact values. For instance one of these new relations could be u 2 (0) = q 2 + q 4 . By using item (a) of Theorem 12 and the probability density function given in (8)  The results of Theorem 12 and the ones of Section 5.2 that give algebraic inequalities among the coefficients to know the index at the origin, and the number of invariant straight lines through it, respectively, allow to determine the phase portrait of any well-posed homogeneous quadratic vector field with an isolated singularity. Notice that these vector fields have full probability. We use these results to know which phase portrait corresponds to each sample generated by Monte Carlo method. The obtained approximations of the vales q j are given in Table 1.

Random homogeneous cubic vector fields
This section mimics the previous one but with more involved computations. There is only one essential difference, as we will see, for first time there appear two phase portraits that are neither conjugated nor equivalent but share index and number of invariant straight lines.
As in the quadratic case, well-posed random cubic vector fields have full probability.
Theorem 13. Let f 3 as in (10) be a well-posed cubic vector field. Then the following holds: Proof. Since the components of f 3 are zero in Q(f 3 ), we get thatx 3 = rx 2ȳ + sxȳ 2 and y 3 = px 2ȳ + qxȳ 2 and simple computations givē From the above equalities and taking into account that f 3 is well-posed we get that all the monomials of degree greater than four are zero in Q(f 3 ). Hence, with a basis of nine elements, as expected. Since the Jacobian of f 3 is its residual class is jx 2ȳ2 , with j = 0.
Let ϕ : Q(f 3 ) → R be the functional sendingx 2ȳ2 to = ±1 with j > 0 and sending the other basis elements to 0. Then the matrix of <, > ϕ with respect this basis is: The characteristic polynomial is given by where S(z) = z 3 + α z 2 + β z + γ, and α, β, γ are defined above. In order to compute given in Lemma 15. Once more, these inequalities imply that the set of parameters for which the vector field has a given number of invariant straight lines is measurable. They are also useful to decide which phase portrait happens when we apply the Monte Carlo method to estimate the desired probabilities.
Joining all these equalities, the ones stated in the theorem follow. If we look at the equator of the Poincaré sphere we see that in the phase portrait C 4 the infinite singular points are successively node-saddle-node-saddle. It can be seen (see [1]) that if t 3 (κ j ) = 0, then s j := −t 3 (κ j )p 3 (1, κ j ) < 0 (resp. s j > 0) is the condition to get a saddle (resp. a node) at the singular point at infinity determined by the direction y = κ j x.
Hence, in the case with index 1 and 4 invariant straight lines, in order to distinguish between the phase portraits C 3 and C 4 it is necessary to consider the four roots of the polynomial equation t 3 (κ) = 0, κ 1 < κ 2 < κ 3 < κ 4 , and compute the four signs s j . If we find that s 1 s 2 < 0 and s 2 s 3 < 0, then we have the phase portrait C 4 . Otherwise we have phase portrait C 3 . We note that this type of conditions on the coefficients give measurable sets.
Hence in this case to get the values of Table 2 we use again the Monte Carlo method generating 10 8 random cubic homogeneous vector fields with the desired distribution. For each sample we compute its index at the origin by using Theorem 13 and we apply Lemma 15 to know its number of invariant straight lines. These two values are enough to know the corresponding phase portrait in seven of the nine cases. To distinguish between the phase portraits C 3 and C 4 , in the case (i, l) = (1, 4), we compute the values introduced in the previous paragraph.
• The polynomial p has a positive real root if and only if V (0) = 2. It is easy to see that it happens when c < 0 and one of the three following conditions hold: As before conditions d 3 < 0, c 2 < 0, b < 0, c < 0 are incompatible and then p has a positive real root and two more complex ones if and only if d 3 < 0, c < 0 as announced.
Case 2. Assume that d 3 > 0 and consider the above right-hand side table of signs. We see that in that case d 2 must be positive. Otherwise V (−∞) = 1, V (∞) = 2 which is not possible (we can also argue that since d 3 > 0 implies that p has three real roots, its derivative has two real roots and hence its discriminant which is equal to 4 d 2 has to be positive).
It is straightforward to see that items (ii), (iii), (iv), (v) are equivalent to V (0) = 0, V (0) = 1, V (0) = 2, V (0) = 3 respectively and that these number of changes of sign are satisfied exactly when the conditions on b, c, c 2 are the ones stated in the lemma.
Then the following holds: (a) p has two simple real and two complex roots if and only if d 4 < 0. We note that d 4 is the discriminant of p and since d 4 = 0 all its roots are simple.
It is known, see [9] for instance, that d 4 < 0 if and only if p has two simple real and two complex roots. And that d 4 > 0 if and only if p has either, four different real roots or no real root. It is very easy to distinguish between these last two possibilities using the Sturm method. Consider the corresponding table when d 4 > 0, where again each value stands for its sign.