Invariant conditions for phase portraits of quadratic systems with complex conjugate invariant lines meeting at a finite point

The goal of this article is to give invariant necessary and sufficient conditions for a quadratic system, presented in whatever normal form, to have anyone of 17 out of the 20 phase portraits of the family of quadratic systems with two complex conjugate invariant lines intersecting at a finite real point. The systems in this family have a maximum of one limit cycle. Among the 17 phase portraits we have two with limit cycles. We also give invariant necessary and sufficient conditions for a system to have one of the three remaining phase portraits, out of which one has a limit cycle and another one a homoclinic loop. In the region R\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {R}}$$\end{document} determined by these last conditions, due to the presence of systems with a homoclinic loop, an analytic condition, the three phase portraits cannot be separated by algebraic conditions in terms of invariant polynomials. We also give the bifurcation diagram of this family, outside the region R\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {R}}$$\end{document}, in the twelve parameter space of coefficients of the systems.


Introduction
We consider here polynomial differential systems on the plane. These are systems the form where p, q ∈ ℝ[x, y] , i.e. p, q are polynomials in x, y with real coefficients. We call degree of a system (1) the integer m = max(deg(p), deg(q)) . In particular we call quadratic a differential system (1) of degree m = 2 . We denote here by QS the whole class of real quadratic differential systems (in short quadratic systems).
In this article we consider the family S 2cIL of all quadratic systems having two complex conjugate invariant lines meeting at a finite real point. We observe that the group of affine transformations and time rescaling acts on this family. The first study of this family was done in 1986 by Suo and Chen (see [12]) where the authors gave a normal form for these systems [(4) in Section 3] and proved that the maximum number of limit cycles of systems in this family is one. Actually their proof contained a gap as the authors of [11] later discovered. In [11] the authors gave a new and complete proof of this result, brought to light an algebraic geometric structure of this family based on the total multiplicity of invariant lines which the systems in this family could have and gave the topological classification of phase portraits in this class. We point out that actually two of the 22 phase portraits obtained in [11] are topological copies of two of the remaining 20 phase portraits. Indeed, as the topological equivalence does not distinguish between a focus and a node, the phase portrait P 17 of [11] containing two nodes can be topologically identified with P 11 ( Port. 2 here) which has two foci instead of two nodes. The phase portrait P 18 of [11] containing a node and a saddle is topologically equivalent to P 21 ( Port. 7 here) which has a focus and a saddle. So the family S 2cIL has a total of 20 topologically distinct phase portraits. To obtain their results, Schlomiuk and Zhang made a thorough study of the normal form proved by Suo and Chen. Thus they gave necessary and sufficient conditions in terms of the 6 coefficients of the normal form (4) for a system in S 2cIL to be degenerate; to have invariant straight lines of total multiplicity at least four or to have the line at infinity filled up with singularity.
In the literature there are other normal forms for this family (see for example [5]). Thus arises the question as to how to transfer these results for one normal form to another. How do we make our topological classification independent of normal forms?
The goal of this article is to respond to the above mentioned questions. Firstly, since in this family we have systems with a limit cycle we would like to know if it is possible to have an algorithm such that for any given system in the family S 2cIL in whatever normal form this system may be presented, we can decide by using this algorithm, whether or not the system possesses a limit cycle and what is its phase portrait. In case this were not possible then at least to delimit the cases when such a decision can be made, to go as far as possible in giving invariant necessary and sufficient conditions for a given phase portrait to be realized. We respond to this challenge in our Theorems 1 and 2. In Theorem 1 we give invariant necessary and sufficient conditions for a quadratic system to belong to the family S 2cIL . In Theorem 2 we determine, for 17 of the 20 phase portraits of the family S 2cIL , invariant necessary and sufficient conditions for the realization of each one of these 17 phase portraits. Among these 17 phase portraits of S 2cIL we have two with limit cycles, out of a maximum of three phase portraits with limit cycles in S 2cIL . For the remaining three phase portraits: Port. 5 , which has a limit cycle; Port. 6 , which has a homoclinic loop; Port. 7 which is without either a limit cycle or a homoclinic loop, we give necessary and sufficient conditions for a system to have one of these three phase portraits. Furthermore Theorem 2 contains the bifurcation diagram for this family in the 12-parameter space of coefficients of quadratic systems, with the exception of the semi-algebraic region where Port. 5 , Port. 6 and Port. 7 occur. This bifurcation diagram provides us with an algorithm which allows us to decide whether or not a given quadratic system, in whatever normal form it may be presented, has one of the 17 phase portraits of S 2cIL which are different from Port. 5 , Port. 6 and Port. 20 . The hypersurface of systems in S 2cIL which possess a homoclinic loop is likely to be analytic but not algebraic. This explains why our bifurcation diagram cannot be completed in the semi-algebraic region where systems in S 2cIL possess one of these three portraits Port. 5 , Port. 6 and Port. 7 and why invariant polynomials which are algebraic objects cannot do any better for this problem. We have pushed our analysis in terms of invariant polynomials to its very limit. However we have necessary and sufficient conditions in terms of invariant polynomials for two phase portraits which have limit cycles: Port. 1 and Port. 9 and naturally, the question arises as to why were we able to do this. After all limit cycles are analytic objects and in general it is highly unlikely that we can encapsulate each phase portrait with a limit cycle in a semi-algebraic set. For these phase portraits this is possible because on the boundaries of regions in the parameter space where they occur we have systems with centers on which the limit cycles collapse and we know that the conditions to have centers in quadratic systems are algebraic. Apart from using the results proven in [11], the present paper is based on the global classification of topological configurations of singularities obtained in [3] and based on the authors' results in [4]. This global classification of topological configurations of singularities is done in terms of invariant polynomials, giving us an algorithm for deciding for any given quadratic system in whatever normal form it can be presented, what is its global topological configuration of singularities.
The paper is organized as follows: In Sect. 2 we give the preliminary notions and exhibit the invariant polynomials in terms of which the invariant classification is made. In Sect. 3 we state and prove the Theorems 1 and 2.

Some preliminary constructions
We consider the family of quadratic systems: where max(deg(p), deg(q)) = 2 and p i , q i (i = 0, 1, 2) are homogeneous polynomials of degree i in x, y in case they are not identically zero: Let ã = (a 00 , a 10 , a 01 , a 20 , a 11 , a 02 , b 00 , b 10 , b 01 , b 20 , b 11 , b 02 ) be the 12-tuple of the coefficients of systems (2) and denote ℝ[ã, x, y] = ℝ[a 00 , … , b 02 , x, y]. (2) p 0 = a 00 , p 1 (x, y) = a 10 x + a 01 y, p 2 (x, y) = a 20 x 2 + 2a 11 xy + a 02 y 2 , It is known that on the set Q S of all quadratic differential systems (2) acts the group Aff(2, ℝ) of affine transformations on the plane (cf. [9]). For every subgroup G ⊆ Aff(2, ℝ) we have an induced action of G on Q S. We can identify the set Q S of systems (2) with a subset of ℝ 12 via the map Q S ⟶ ℝ 12 which associates to each system (2) the 12-tuple ã = (a 00 , … , b 02 ) of its coefficients. We associate to this group action polynomials in x, y and parameters which behave well with respect to this action, the GL-comitants, the T-comitants and the CT-comitants. For their detailed definitions as well as their constructions we refer the reader to the paper [9] (see also [4]).
In this paper we use some of the invariant polynomials defined and constructed in [3] [see Section 3, the set (2)]: However here intervene some invariant polynomials which are not contained in the set (2) in [3] and so, we will give their expressions. More exactly we need the invariant polynomials which were defined in different papers. The invariant polynomials B 2 , H 9 and H 10 are constructed in [10], whereas the invariant polynomial is defined in [2] (we keep the corresponding notations from these articles). So here we construct below the above mentioned invariant polynomials. The singular points of the quadratic systems were also studied in [1].
First we need the GL-comitants of degree one with respect to the coefficients of systems (2): and the so-called transvectant of order k (see [7,8]) of two polynomials f, g ∈ ℝ[ã, x, y] Using this differential operator we construct now the following GL-comitants which are of degree two with respect to the coefficients of systems (2): And finally we construct the above mentioned invariant polynomials: , .

Theorem 1 A quadratic system possesses two complex invariant lines meeting at a finite real point if and only if one of the following two sets of conditions is satisfied:
Proof Necessity. Assume that a quadratic system possesses two complex invariant lines intersecting at a real finite singular point. According to [12] via an affine transformation this system takes the following form: where , , a, b, c, k are arbitrary real. For these systems, which possess the complex invariant lines x ± iy = 0 , we calculate: So we conclude that the necessary conditions are B 2 = 0 and ≤ 0 . Moreover, it is clear that the condition = 0 implies C 2 = 0 , i.e. a = k − b = 0 . So setting k = b and considering the condition a = 0 systems (4) become for which we calculate So we get ≥ 0 and hence in the case ≠ 0 we arrive at the first part of the conditions (ii) from (3). It remains to examine the condition = 0 . We claim that this condition leads to degenerate systems (6), i.e. according to [4] (see Lemma 5.2, statement (iii)) the conditions Indeed for systems (6) calculations yield: with some polynomials � i (a, b, c, , , x, y) . So considering (7) we observe that the condition = 0 implies 1 = 2 = 3 = 0 and since 0 = 4 = 0 our claim is proved. This completes the proof of the necessity of the conditions of Theorem 1.
Sufficiency. According to the statement of the theorem we consider two families of quadratic systems which are defined by the conditions < 0 or by C 2 = 0 , respectively.

The class of systems with < 0
According to [4] in this case quadratic systems could be brought via a linear transformation and time rescaling to the following canonical form: For these systems we have and we shall consider two cases: ≠ 0 and = 0.
The case ≠ 0 . Then we have h + 1 ≠ 0 and doing a translation we may assume c = d = 0 in systems (8) and we get the family of systems For these systems calculation yields: and we examine two subcases: a = 0 and a ≠ 0.
The subcase a = 0 . In this case for systems (10) we calculate We observe that Φ is a quadratic polynomial in b and and hence the equation B 2 = 0 (which is equivalent with Φ = 0) has real solutions if and only if the condition (e + fg − eh)(f + fg 2 − 2egh − fh 2 ) = 0 holds. This relation gives us the two possibilities: In order to apply this condition to systems (10) with a = 0 we consider two cases:

2.
The possibility without loss of generality we may set e = u(1 + g 2 − h 2 ) and f = 2ugh and then we obtain 2 and this leads to the family of systems These systems possess one real and two complex invariant lines: The subcase a ≠ 0 . Then considering (11) we deduce that the condition B 2 = 0 implies 1 = 2 = 0 and since ≠ 0 we obtain x = x(gx + 2y),̇y = −e 2 ∕g 2 + ex − x 2 + gxy + y 2 .
In this case we get the family of quadratic systems (10) (with the above defined parameters a and b), which possesses the following two complex invariant lines intersecting at a real finite point: Thus we proved that in the case < 0 and ≠ 0 the condition B 2 = 0 is necessary and sufficient for the existence of such kind of invariant complex lines.
The subcase Ñ ≠ 0 . Then the condition = 0 gives h = −1 and in addition we may consider f = 0 doing the translation x → x and y → y + f ∕2 . So systems (8) These systems possess two real and two complex invariant lines (intersecting at a real finite point):

1.2.
The case d ≠ 0 . Then considering (13) the condition B 2 = 0 implies ̃1 = 0 =̃2 and we obtain the condititions under the parameters a and b: In this case we get the family of quadratic systems (12)  The subcase Ñ = 0 . In this case we have h = 1 and g = 0 and without loss of generality we may assume c = d = 0 via the translation x → x − d∕2 , y → y − c∕2 . Hence we obtain the systems for which calculations yield: We observe that the condition B 2 = 0 is equivalent to e = f = 0 and in this case the above systems possesses two couples of complex conjugate invariant lines, each couple intersecting at a finite real singular point: As for < 0 all the cases are examined we deduce, that in this case a quadratic system possesses two complex invariant lines meeting at a finite real point if and only if B 2 = 0.

The class of systems with C 2 = 0
According to [4] in this case quadratic systems could be brought via a linear transformation and time rescaling to the following canonical form (doing an additional translation): For these systems we calculate According to [10] a non-degenerate quadratic system, belonging to the class defined by the condition C 2 = 0 , possesses two complex invariant lines meeting at a finite real point if and only if H 10 ≠ 0 and H 9 > 0 . Evidently the condition H 9 > 0 is equivalent to > 0 . Moreover this condition implies H 10 ≠ 0 . On the other hand the condition > 0 (i.e. d ≠ 0 ) implies 1 ≠ 0 and according to [4] (see Lemma 5.2, statement (iii)) these systems are nondegenerate. So we deduce that for > 0 systems (14) possess two complex invariant lines meeting at a finite real point.
Assume now that quadratic systems are degenerate, i.e. by [4, Lemma 5.2, statement (iii)] the conditions i = 0, i ∈ {0, 1, … , 4} are satisfied in ℝ[x, y] . According to [4] (see Chapter 12 Case 5) any degenerate quadratic system for which the condition C 2 = 0 is fulfilled could be brought via an affine transformation and time rescaling to the canonical form It remains to observe that these systems possess the following two complex invariant lines meeting at a real singular point: x ± iy + c = 0.
So all the cases are examined and we deduce that Theorem 1 is proved. ◻

The phase portraits of quadratic systems possessing two complex invariant lines meeting at a finite real point
According to [13] (see also [4, Theorem 6.2]), the next result can be easily deduced: Proposition 1 Consider a non-degenerate quadratic differential system. Then:

(i) this system has exactly one center if and only if one of the following sets of conditions holds
(14)x = a + cx + x 2 + dy,̇y = b + xy.

Theorem 2 Assume that a quadratic system (2) possesses two complex invariant straight lines meeting at a finite real point, i.e. one of the sets of the conditions (3) are satisfied. Then this system has the phase portrait Port.i indicated below on the left if and only if the corresponding conditions indicated below on the right, are satisfied:
( ) in the case < 0, B 2 = 0: ( ) in the case C 2 = 0: Furthermore, the bifurcation diagram for the phase portraits Port.i with i not belonging to {5, 6, 7} is indicated in Fig. 1. The 20 distinct topological phase portraits inthe Poincaré disc are presented in Fig. 2.

Remark 1
In the statement of the above theorem we indicate in the first column, in the parentheses, the corresponding phase portraits from the paper [11].
Proof According to Theorem 1 we consider two possibilities:

The possibility < 0, B 2 = 0
By Theorem 1 the systems in this family possess two complex invariant lines meeting at a finite real point and hence according to [12] via an affine transformation these systems could be brought to the form (4), for which we calculate Following [3] we shall determine the topological configurations of singularities (finite and infinite), applying the necessary and sufficient conditions expressed through invariant polynomials. First we observe that due to the condition < 0 systems (4) have at infinity one real and two complex singularities. Moreover for these systems the condition ≥ 0 holds and we examine two cases: ≠ 0 and = 0.
The case ≠ 0 . Then we have > 0 and this implies ck ≠ 0 . So doing a time rescaling we may assume k = 1 and we consider the family of systems for which we have The subcase 0 < 0 . Since > 0 and < 0 (i.e. at infinity we have one real and two complex singularities), according to [3] (see Diagram 1,page 5) in this case we could have the following topological configurations (we keep the notations from [3] but we use "{ }" to avoid confusions with references of equations):   We observe that the phase portrait Port. 1 has a limit cycle. We prove the following result.

Lemma 1 If 0 < 0 then systems (17) possess a limit cycle (which is unique) if and only if
Proof It is clear that the existence of a limit cycle (see the phase portrait Port. 1 ) is governed by the stability or instability of the finite real singularities, which are anti-saddles. More exactly the limit cycle exists (and it is unique according to [11]) if and only if the anti-saddles have the same stability.
On the other hand systems (17) possess the following two real and two complex finite singularities with the corresponding traces i (i = 1, 2, 3, 4): According to [4] (see Subsection 5.4.2) for any quadratic system (2) in the case 0 ≠ 0 we have the following relations between traces of its finite singularities and the invariant polynomials T i (i = 1, 2, 3, 4): Evidently these relations are also valid for systems (17) in the case 0 ≠ 0 . Since for this class of systems the traces 3,4 correspond to complex singularities we have 3 4 > 0.
We consider two possibilities: T 4 ≠ 0 and T 4 = 0. 2.1. The case T 3 ≠ 0 . Then by (20) only one trace vanishes and clearly it corresponds to a real singularity, i.e. the condition 1 2 = 0 holds. We observe that due to 0 ≠ 0 (see (18)) this condition is equivalent to a = 0.
Since T 3 ≠ 0 we get F ≠ 0 and T 3 F < 0 (due to 0 < 0 ) and we deduce that the conditions (ℭ 1 ) are satisfied, i.e. we have a center and this proves our claim. Thus we assume a ≠ 0 and it remains to examine the case when the condition 1 2 = 0 implies = 0 . Then the singularity M 1 (0, 0) becomes a weak focus and applying the rescaling t → t∕(c ) (due to ≠ 0 and 0 < 0 ) we get the family of systems in normal form As it was shown in [11] (see Sect. 4.2) for these systems the first Lyapunov quantity equals W 1 = −4a∕(c 2 ) and we have a weak focus of order one (due to a ≠ 0 ). Moreover this focus is stable (respectively unstable) if W 1 < 0 (respectively W 1 > 0).
On the other hand for the second singularity M 2 (0, c ∕(b − 1)) of systems (21) we detect its trace 2 = a ∕(b − 1) . So we calculate and since 0 < 0 we get 2 W 1 < 0 , i.e. the anti-saddles M 1 and M 2 have the opposite stabilities.
Thus we conclude that systems (17) with ≠ 0 and 0 < 0 could not possess a limit cycle if T 4 = 0 and T 3 ≠ 0.
2.2. The case T 3 = 0 . Considering (20) we deduce that at least two traces vanish and, moreover in the case T 2 ≠ 0 only two could vanish.
We claim that due to the conditions ¬(Ĉ 1 ) , which are satisfied for the topological configuration {16}, the traces corresponding to the real singularities could not vanish. Indeed, assume that 1 = 2 = 0 . Then considering (18), (19) and the condition 0 ≠ 0 we get a = = 0 and then for systems (17) calculations yield: Since 0 < 0 (and this implies b > 1 ) we conclude that in this case the conditions T 2 < 0 , B < 0 and H < 0 are satisfied. So we arrive at the conditions (Ĉ 1 ) which implies the existence of two centers and this proves our claim.
So we have to force the traces 3,4 to vanish and then due to the relations (20) the condition T 2 ≠ 0 implies 1 2 ≠ 0 . Moreover due to the condition 0 < 0 we get On the other hand considering (19) we detect that the condition 3 = 0 = 4 yields and then for systems (17) we calculate sign (T 2 ) = sign ( 0 1 2 ) = − sign ( 1 2 ).
We observe that the condition ≠ 0 implies c ≠ 0 whereas the condition 0 < 0 implies a ≠ 0 and hence we obtain T 2 > 0 . Since sign (T 2 ) = − sign ( 1 2 ) we get 1 2 < 0 and we conclude that in this case the anti-saddles M 1 and M 2 of systems (17) are of the opposite stability. This means that systems (17) could not have limit cycle in this case and the proof of Lemma 1 is completed. ◻ The subcase 0 > 0 . In this case by [3] (see Diagram 1, page 5) following the same reasons as above we get exactly two configurations of singularities: According to [11] we obtain that the configuration {23} leads to one of the phase portraits Port. 5 , or Port. 6 or Port. 7 whereas the configuration {24} leads to the unique phase portrait Port. 8.
As it was proved in [6] quadratic differential systems can have separatrix connections or double limit cycles which cannot be controlled by means of semi-algebraic conditions. In this family we detect the existence of a very likely non-algebraic loop. So in this case we cannot distinguish the phase portraits possessing or not limit cycles by means of invariant polynomials.
The subcase 0 = 0 . In this case it is more convenient to consider systems (4) with free parameter k. Then taking into account (16) and ≠ 0 , the condition 0 = 0 gives On the other hand for systems (4) we calculate We observe that the condition a 2 + b 2 = 0 implies 1 = 0 and so we consider two possibilities: 1 ≠ 0 and 1 = 0 1. The possibility 1 ≠ 0 . Then a 2 + b 2 ≠ 0 and the condition 0 = 0 implies k + a − b = 0 , i.e. we obtain k = b − a ≠ 0 (due to ≠ 0 ). So we get the family of systems for which we calculate According to [3] systems (22) are in the class with m f = 3 . This means that only one singularity (which is real) has gone to infinity and coalesced with a real infinite point, yielding a double point. According to Diagram 2 of [3] (see page 9) we get a unique topological .
configuration. More exactly we have {84} a; 1 1 SN and the anti-saddle cannot be a center. According to [11] this leads to the two configurations: Port. 9 and Port. 10.
We observe that Port. 9 has a limit cycle and we prove the following lemma. On the other hand since ̃= 2 sign (a − b ) we obtain i.e. we get 0 < 0 . Since T 4 ≠ 0 according to Lemma 1 the perturbed systems (24) possess a limit cycle if and only if T 4 < 0 . So we conclude that as for a sufficiently small perturbation a limit cycle remains, it must exist also for non-perturbed systems (22) and this completes the proof of lemma in the case T 4 ≠ 0.

1.2.
The case T 4 = 0 . Considering (23) and the condition ≠ 0 we obtain that the condition T 4 = 0 is equivalent to 1.2.1. The subcase = 0 . Then the singular point M 1 (0, 0) is a weak focus. Applying the same perturbation as in the case T 4 ≠ 0 we arrive at the perturbed systems (24) with = 0 and according to (25) for these systems we have 0 < 0 , < 0 , > 0 and T 4 = 0 . So we can apply Lemma 1 and we conclude that in this case we could not have limit cycle.

1.2.2.
The subcase ≠ 0 . Then we have the conditions a − 3b = 0 and b − a = 0 . We observe that these equations with respect to the parameters and have the determinant 3b 2 − a 2 and we must force it to be zero, i.e. a = ± √ 3 b and then we obtain = ± √ 3 ≠ 0 . Then we get the family of systems .
for which calculations yield We claim that these systems could not possess a limit cycle surrounding the strong focus M 1 (0, 0). Indeed, suppose the contrary, that such a limit cycle exists. Then we apply to systems (26) the perturbation with a small parameter ̃= 2 sign (b ) , which leads to the following family of perturbed systems For these systems we calculate Since ̃= 2 sign (b ) we obtain < 0 , > 0 , 0 < 0 and T 4 > 0 and moreover, for the sufficiently small parameter |̃| ≪ 1 the limit cycle persists.
On the other hand since T 4 > 0 , by Lemma 1 systems (27) could not possess any limit cycle. So we get a contradiction which proves our claim.
So all the cases are examined and we conclude that Lemma 2 is proved. ◻
Thus we have to examine two subcases: 0 ≠ 0 and 0 = 0. The subcase 0 ≠ 0 . As it was mentioned above the singular point (0, 0) of systems (4) is of multiplicity four, i.e. by [4, Table 6.2] we have = = = = 0 and 0 ≠ 0 . Therefore according to [3] (see Diagram 1, page 8) we obtain the following two topological configurations: So comparing with the topological phase portraits given in [11] we deduce, that: a) the configuration {67} leads to Port. 11 (in which we must have an invariant line with the finite singularity of order 4 on it) and b) the configuration {47} leads to Port. 12.
The subcase 0 = 0 . First we prove the next lemma.
Proof Considering (16) the condition 0 = 0 = implies Assume first that the condition ( 2 + 2 )(a 2 + b 2 + c 2 ) = 0 is satisfied. Then considering the form of systems (4), evidently we get that the condition 2 + 2 = 0 as well as the condition a 2 + b 2 + c 2 = 0 leads to the same degenerate systems for which we have = 0 . Thus the sufficiency of the condition under examination is proved. Assume now that the condition ( 2 + 2 )(a 2 + b 2 + c 2 ) ≠ 0 holds. In this case the condition 0 = 0 = gives It is clear that in this case we have either (i) k = 0 , or (ii) k ≠ 0 and c = 0 = k + a − b .

The possibility C 2 = 0
Considering (5) the condition C 2 = 0 for systems (4) gives a = k − b = 0 . So setting k = b and considering the condition a = 0 , systems (4) become the systems for which we calculate We consider two cases: ≠ 0 and = 0.