Detecting affine equivalences between certain types of parametric curves, in any dimension

Two curves are affinely equivalent if there exists an affine mapping transforming one of them onto the other. Thus, detecting affine equivalence comprises, as important particular cases, similarity, congruence and symmetry detection. In this paper we generalize previous results by the authors to provide an algorithm for computing the affine equivalences between two parametric curves of certain types, in any dimension. In more detail, the algorithm is valid for rational curves, and for parametric curves with non-rational but meromorphic components admitting a rational inverse. Unlike other algorithms already known for rational curves, the algorithm completely avoids polynomial system solving, and uses bivariate factoring, instead, as a fundamental tool. The algorithm has been implemented in the computer algebra system {\tt Maple}, and can be freely downloaded and used.


Introduction.
We say that two curves are affinely equivalent if one of them is the image of the other curve by means of an affine mapping.If the affine mapping preserves angles, then the two curves are similar, i.e. both correspond to the same shape and differ only in position and/or scaling.If the affine mapping preserves distances, the curves are congruent, so they differ only in position.Finally, if the two curves coincide, finding the self-congruences of the curve is equivalent to computing its symmetries.
Because of the nature of the problem, it has received some attention in the applied fields of Computer Aided Geometric Design, Pattern Recognition and Computer Vision.In the last years, the problem has been also addressed in the Computer Algebra field, and this paper follows this trend.Examples of papers where this question has been studied are [2,4,7]; for other related papers, the interested reader can check the bibliographies of [2,4,7].These papers address the problem for rational curves, i.e. parametric curves whose components are quotients of polynomial functions, and aim to the more general question of checking projective, and not just affine, equivalence.While [2,7] provide solutions for this problem, with different strategies, for curves in any dimension and using as a fundamental tool polynomial system solving, the paper [4] addresses the question only for space rational curves, but employing bivariate factoring as an alternative to solving polynomial systems; this leads to better timings and performance.To do this, in [4] two rational invariants, i.e. two functions rationally depending on the parametrizations to be studied which stay invariant under projective transformations, are found and used.
In this paper we generalize the ideas of [4] in three different ways.First, while the development of the invariants in [4] was more of an "art" than of a "craft", here we provide a complete algorithm to generate such invariants.Second, the technique is valid for curves in any dimension, and not just space curves, which was the case addressed in [4]: we provide an algorithm, that can be downloaded from [5], to generate the corresponding invariants for any dimension, that needs to be executed just once for each 2. Background, statement of the problem and required tools.

Background, auxiliary results and statement of the problem
Let us start by describing the kind of parametric curves we will work with.The key idea is that they must be parametric curves with rational inverses.However, we will make precise their structure so that we can algorithmically verify that this requirement is satisfied.
We need two ingredients to do this; the first ingredient is a meromorphic function ξ : we observe that Π is an invertible function over its image, which is the graph G ξ of the function ξ, Indeed, for (z, ω) ∈ C 2 , ω = ξ(z), we have Π −1 (z, ω) = z.The second ingredient is a rational mapping Φ : C 2 → C n .If we compose these two mappings, we get a new mapping which provides a parametrization p(z) = Φ(z, ξ(z)) of a curve C ⊂ C n , which is the image of G ξ under Φ.Notice that p is a vector function with meromorphic components.Of course if ξ is a rational function, p is just a rational parametrization.We will also assume that the curve defined by p is not contained in a hyperplane.
What we really need is the condition that the restriction Π| G ξ is birational, so that p has a rational inverse.If ξ is a rational function, what implies that p(z) is a rational parametrization, we will just assume that p(z) is proper, i.e. generically injective, in which case p −1 exists and is rational.So let us provide sufficient conditions to guarantee this also in the case when ξ is not a rational function.In that case, we will assume that Φ is a birational mapping.Recall that the cardinality of the fiber of Φ, which we denote by #(Φ), is the number of points in the preimage of Φ(q) with q ∈ C 2 a generic point.Then, the birationality of Φ is equivalent to #(Φ) = 1 (see for instance Proposition 7.16 in [6]), so we can check this condition by just picking a random point q, and computing the number of points in the preimage of Φ(q).Furthermore, we have the following lemma, inspired by [13,14].
where for i = 1, 2, where Φ −1 is not defined, V being the union of the sets defined by (B i • Φ)(x 1 , x 2 ) = 0 with i = 1, 2, and . Notice that V is an algebraic planar curve.
Corollary 2. Assume that Φ is a birational mapping, and ξ is a meromorphic, not algebraic function.Then p(z) is invertible over C = Φ(G ξ ), and the inverse p −1 has rational components.
Proof.Since by assumption #(Φ) = 1, Φ −1 exists and is rational.Next from Lemma 1 we have that #(Φ) is constant except perhaps for the points of an algebraic variety V ⊂ C 2 of dimension at most one.Since ξ is not an algebraic function G ξ is not an algebraic curve.Therefore, by the Identity Theorem (see Theorem 3.1.9in [8]) G ξ ∩ V is either finite, or infinite but without any accumulation point.Thus, for a generic point q ∈ G ξ we get that the cardinality of Φ(q) is 1.Therefore Φ −1 is well-defined for almost all points in Φ(G ξ ), and p Example 1.To illustrate the assumptions that we need, we provide now some examples of plane and space curves satisfying these requirements.
(2) Image of the graph of the exponential curve under an inversion.Let the curve C (see Fig. 1, middle) be parametrized by Here ξ(z) = e z and Φ(x, y) = which is an inversion from the origin, and therefore a birational mapping.Then, ξ(z) = e iz , and which is a birational mapping.
Even though for technical reasons we will assume that the parameter space of the curve C parametrized by Eq. ( 1) is C, we will mostly work with real curves, i.e. curves with infinitely many real points.Next, given two curves C 1 , C 2 ⊂ C n parametrized by p(z), q(z) as in Eq. ( 1), we say that C 1 , C 2 are affinely equivalent if there exists a mapping f : A is an n × n matrix (in general, over the complex), A non-singular, b ∈ C n , such that f (C 1 ) = C 2 ; furthermore, we say that f is an affine equivalence between C 1 , C 2 .We are interested in real affine equivalences, so in our case we will be mostly looking for with I the identity matrix, we say that f is a symmetry of C. Now we are ready to state the problem that we want to solve.Problem: Given two curves C 1 , C 2 ⊂ C n , not contained in hyperplanes, parametrized by mappings p(z), q(z) as in Eq. (1) with meromorphic components, admitting rational inverses p −1 , q −1 , compute the affine equivalences, if any, between C 1 , C 2 .
In order to solve this problem, we will make use of the following result, which corresponds to a similar result used in [4,7], adapted to our case.We recall here that a Möbius transformation is a transformation C n be two parametric curves defined by p(z), q(z) as in Eq. (1), where p(z), q(z) are mappings with meromorphic components, admitting rational inverses p −1 , q −1 .If f (x) = Ax + b is an affine equivalence between C 1 , C 2 then there exists a Möbius transformation φ(z) satisfying that i.e. making commutative the following diagram: Proof.Since q −1 exists, φ = q −1 • f • q is well-defined.Furthermore, since q −1 is rational, q −1 • f is also a rational function and therefore φ = (q −1 • f ) • p is meromorphic.Since p exists and is rational, • q is also meromorphic, so φ is a bi-meromorphic function, and therefore it must be a Möbius transformation (see Remark 2 in [1]).
Remark 1. Theorem 3 also works with meromorphic parametrizations p, q admitting global meromorphic inverses.However, guaranteeing the existence of a global meromorphic inverse is a really hard problem.This is the reason why we restrict ourselves to parametrizations, rational or not rational, where this condition is easy to check.Notice that the parametrizations we work with here have rational inverses, so certainly they have global meromorphic inverses.

Additional tools
In this subsection we recall two notions that we will be using later in the paper.The first one is the Schwartzian derivative: given a holomorphic function f : C → C, the Schwartzian derivative [12] The Schwartzian derivative of any Möbius transformation is identically zero.The following lemma is a consequence of this.
Lemma 4. Let ω := φ(z) a Möbius transformation, and let ω (k) denote the k-th derivative of ω with respect to k.For k ≥ 3, Proof.Since the Schwartzian derivative of a Möbius transformation is identically zero, we get that which corresponds to Eq. ( 4) for k = 3.Then the result follows by induction on k.
The second tool that we will need is Faà di Bruno's formula [9] for the derivatives of high order of a composite function.Given a vector function u := u(z) and a scalar function ω := ω(z), Faà di Bruno's formula provides the derivatives of order k ≥ 1 of the composite function u(ω) with respect to z.Although there are other formulations, we will use the expression where the B k,m are the incomplete (or partial) Bell polynomials [10], well-known in combinatorics, where the sum is taken over all sequences ℓ 1 , ℓ 2 , . . ., ℓ k+1−m of non-negative integers such that In particular, and we will assume the convention that B k,m = 0 when k < m.

Overall strategy and first step
We want to exploit Eq. ( 2) to first find the Möbius transformation φ, if any, and then derive f from φ.If we expand Eq. ( 2), we get Our overall strategy will consist of three steps, that we will refer to as steps (i), (ii), (iii): (i) Find initial invariants: we start by constructing certain functions I 1 , . . ., I n satisfying that I i (p) = I i (q • φ), which are rational in the sense that they are rational functions of p and its derivatives.Since by Eq. ( 9) we observe that q • φ is the image of p under an affine mapping f (x) = Ax + b, we say that I 1 , . . ., I n are affine invariants, i.e. functions depending on a parametrization (and its derivatives) that stay the same when an affine transformation is applied.
(ii) Find Möbius-commuting invariants: we say that a function F depending on a parametrization u = u(z) and its derivatives is Möbius-commuting if for any Möbius function we have The functions I i found in step (i) are not, in general, Möbius-commuting.Thus, in a second step we will compute Möbius-commuting functions F 1 , . . ., F n−1 from the I i , also rational.The F j not only satify that F j (p) = F j (q • φ) for j = 1, . . ., n − 1, but they also satisfy that F j (q • φ) = F j (q) • φ.In turn, for j = 1, . . ., n − 1 we have Notice that while we have n initial invariants I i , we have n − 1 Möbius-commuting invariants.
(iii) Compute φ using bivariate factoring, and derive f from φ: setting ω := φ(z), the equalities Then the Möbius function φ corresponds to a common factor of all the M j , and the affine equivalence itself, f (x) = Ax + b, follows from Eq. ( 9).
In this subsection we will present step (i); the remaining steps will be described in the next section.Also, in the rest of the paper we will use the notation [w 1 , • • • , w n ] for an n × n matrix whose columns are w 1 , . . ., w n ∈ C n , and The description of step (i) is analogous to Section 3.2 in [4].Thus, here we focus on the main ideas, and refer the interested reader to [4] for details and proofs.Going back to Eq. ( 2), let us write u := p(z), v := (q • φ)(z), so that Eq. ( 9) becomes simply Au + b = v.Repeatedly differentiating this equation with respect to z yields AD(u) = D(v) where i.e.D(u), D(v) are matrices whose columns consist of the first n derivatives of u, v with respect to z. Whenever p, q and therefore u, v are not contained in hyperplanes, D(u), D(v) are invertible [15].Thus, we can write A = D(v)(D(u)) −1 .Differentiating this equality with respect to z, and taking into account that A is a constant matrix, we get that Expanding the derivative in the left-hand side of the above equation we arrive at Denoting

Next let us define
Thus, A i (u) is the result of replacing n+1) .Finally, for i = 1, . . ., n, let which correspond to the entries of the last column of U ; notice that whenever u, v are not contained in hyperplanes ∆(u) is not identically zero [15], so the I i are well defined.
By Eq. ( 10), U, V are equal and therefore their last columns coincide.Thus, I i (u) = I i (v) for i = 1, . . ., n, i.e.I i (p) = I i (q • φ), which by Theorem 3 is a necessary condition for affine equivalence.The following result, analogous to Theorem 7 in [4] and which can be proved, using Theorem 3, in a similar way, shows that this condition is also sufficient.
Theorem 5. Let C 1 , C 2 ⊂ C n be two curves, not contained in a hyperplane, parametrized by mappings p, q with meromorphic components, admitting rational inverses.If C 1 , C 2 are affinely equivalent then there exists a Möbius transformation φ such that for i = 1, . . ., n.
In order to carry out step (ii), which will be addressed in the next section, we need an auxiliary invariant, I 0 , defined as The following lemma proves that I 0 lies in the differential field spanned by I 1 , . . ., I n .The proof of this lemma is provided in Appendix I.
Since, according to Lemma 6, I 0 is generated by I 1 , . . ., I n , the result in Theorem 5 also holds when we add I 0 to the list of the I i s.
Corollary 7. Let C 1 , C 2 ⊂ C n be two curves, not contained in a hyperplane, parametrized by mappings p, q with meromorphic components, admitting rational inverses.If C 1 , C 2 are affinely equivalent then there exists a Möbius transformation φ such that for i ∈ {0, 1 . . ., n}.

Second step (overview) and third step
The I i developed in the previous section are not Möbius-commuting, i.e.I i (q • φ) ̸ = I i (q) • φ; in other words, calling ω := φ(z), I i (q(ω)) ̸ = I i (q)(ω).For instance, in the case n = 3, expanding I i (q(ω)) for i = 1, 2, 3 we get that where ω ′ , ω ′′ are the first and second derivatives of ω = φ(z) with respect to z; to produce these equalities, we have taken into account the definition of I 1 , I 2 , I 3 as quotients of determinants, the Chain Rule, and the fact that, because of Eq. ( 4) in Lemma 4, the derivatives of ω of order higher than 3 can be written in terms of ω ′ , ω ′′ .However, by eliminating ω ′ , ω ′′ in Eq. ( 17), one can show that 36I 1 (q(ω)) + 6I 2 (q(ω))I 3 (q(ω)) + I 3 (q(ω)) 3 2 so that One can certainly manipulate Eq. ( 17) by hand to get rid of ω ′ , ω ′′ , reach Eq. ( 18), and therefore find the invariant in Eq. ( 19).However, we want to produce invariants like the one in Eq. ( 19) in an algorithmic fashion, and for any dimension: that is the task in step (ii).The rough idea, as in Eq. ( 17), is to get rid of the derivatives ω (k) , k = 1, 2, . . ., n + 2, in the system consisting of the expressions where ξ i is the result of expanding I i (q(ω)), with i = 0, 1, . . ., n.The process is involved, and will be detailed in Section 4, but as a final product of this process we get closed expressions for these invariants (see Theorem 16 in the next Section 4), that we denote F 1 , . . ., F n−1 .The generation of the Möbius-commuting invariants, for any dimension n, is implemented in [5], which can be freely downloaded, and can be done just once for each dimension n.In Table 1 we spell the invariants for low dimension, 2 ≤ n ≤ 4.

Table 1: Möbius-commuting invariants for low dimension
Next let us address step (iii).Let F j be a Möbius-commuting invariant, j ∈ {1, . . ., n − 1}.Since F j is a rational function of the I i , F j is also an affine invariant, i.e. from Theorem 5 we get that F j (p) = F j (q • φ).Therefore, in terms of the variables z and ω := φ(z), and taking into account that F j (q • φ) = F j (q) • φ, we deduce that F j (p)(z) = F j (q)(ω).Then we have the following result.Proposition 8. Let C 1 , C 2 ⊂ C n be two curves, not contained in a hyperplane, parametrized by mappings p, q with meromorphic components, admitting rational inverses.Then C 1 , C 2 are affinely equivalent if and only if there exists a Möbius transformation φ such that for j ∈ {1, 2, . . ., n − 1} with ω = φ(z), such that D(q Proof.(⇒) Let f be an affine equivalence between C 1 , C 2 .By Theorem 3, there exists a Möbius function φ such that f • p = q • φ.By Corollary 7 we have that I i (p)(z) = I i (q(ω)) for all i ∈ {0, . . ., n}.Since the F j are rational functions of the I i , I i (p)(z) = I i (q(ω)) yields F j (p)(z) = F i (q)(ω) for j ∈ {1, 2, . . ., n − 1}.Finally, writing f (x) = Ax + b, the condition f • p = q • φ implies that Ap(z) + b = q(φ(z)), so b = (q•φ−Ap)(z), which is a constant vector.Furthermore, by differentiating the condition Ap(z)+b = q(φ(z)) (see Subsection 3.1) we deduce that But this equality implies that Ap(z) + b, which is the image of C 1 under the affine mapping f (x) = Ax + b, and q(z), parametrize the same curve, namely C 2 .Thus, f (x) = Ax + b is an affine equivalence between C 1 and C 2 .

Algorithm and examples
To finally turn Proposition 8 into an algorithm, let M j (z, ω) be obtained by clearing denominators in F j (p)(z)−F j (q)(ω).We need to request that M j (z, ω) is not identically zero, which amounts to requiring that not all the F j are constant: this can happen, and an example is the circular helix p(z) = (cos(z), sin(z), z).If M j (z, ω) is not zero, then M j (z, ω) = 0 defines an analytic curve in the plane z, ω.Now if is a Möbius function satisfying Proposition 8, calling ω = φ(z) we get that all the points (z, ω) of the curve which is an irreducible analytic curve, are also points of the curve M j (z, ω).As a consequence of Study's Lemma (see Section 6.13 of [3]), H(z, ω) = ω(cz + d) − (az + d) must be a factor of M j (z, ω); we say that H(z, ω) = ω(cz + d) − (az + d) is a Möbius-like factor of M j (z, ω), and that the Möbius function φ in Eq. ( 21) is associated with H(z, ω).So we have the following theorem, which follows from Proposition 8.
Theorem 9. Let C 1 , C 2 ⊂ C n be two curves, not contained in a hyperplane, parametrized by mappings p, q with meromorphic components, admitting rational inverses and where not all the F j are constant.Then C 1 , C 2 are affinely equivalent if and only if there exists a Möbius-like factor H(z, ω) common to M j (z, ω), j = 1, . . ., n − 1 such that the corresponding associated Möbius function φ satisfies that: (1) Thus, we get the following procedure AffineEquivalences to find the affine equivalences between the curves C 1 , C 2 defined by p, q.

3:
if all the M j are identically zero then 4: return Failure: all the Möbius-commuting invariants are constant Compute the common factor L(x, z) of the M j (x, z).

7:
Let L be the list of Möbius-like factors of L(x, z) return The curves are not affinely equivalent In the affirmative case, return f (x) = Ax + b.
If p, q are rational, the M j (x, z) are rational and H(z, ω) is a factor of gcd(M 1 (z, ω), . . ., M n−1 (z, ω)).However, the computer algebra system Maple, where we implemented the procedure (see [5]), can compute H(z, ω) also in the case when p, q are not rational, but satisfy the hypotheses of the procedure.In this last case, we ask Maple to solve H(z, ω) for ω to find the Möbius functions.
Remark 2. Although Maple Help System is not too specific about this, in the case when the M j (x, z) are not rational the idea seems to be that Maple renames repeated non-rational expressions found in the M j (x, z) (e.g.cos(z), e z , etc.) to form rational functions, and then proceeds by applying the algorithm for the rational case.
In order to illustrate the performance of the procedure AffineEquivalences, we consider now two examples where we compute the affine equivalences between curves taken from Ex. 1, and the images of these curves under an affine mapping.These examples were computed with Maple and executed in a PC with a 3.60 GHz Intel Core i7 processor and 32 GB RAM, and are accessible in [5] as well. .
The curve q(z) corresponds to the first curve in Ex. 1, which is a catenary curve.After appying our algorithm, we find two factors H i , (z, ω), i = 1, 2, common to the M j , namely When solving for ω, we get infinitely many (complex) Möbius functions leading to infinitely many (complex) affine equivalences, which reveals that the H i (ω, z) contain Möbius-like factors.The affine equivalences can be classified in three classes f j (x) = A j x + b j , j ∈ {1, 2, 3}, with associated Möbius functions φ j (z): and where i 2 = −1.If we just consider real affine equivalences, we have three of them, which correspond to fixing k 1 = 0 for f 1 (x), k 2 = 0 for f 2 (x), k 2 = −1/2 for f 3 (x).The whole computation took 0.172 seconds.
The curve q(z) corresponds to the third curve in Ex. 1, which is a 3D spiral.After applying our algorithm, we find two Möbius-like factors H i (z, ω), i = 1, 2, common to the M j (z, ω), namely When solving for ω, we get two Möbius transformations φ 1 (z) = −2z and φ 2 (z) = 2z corresponding to the affine equivalences The whole computation took 0.032 seconds.
Example 4 (Rational curves in n-th dimension).Finally, in Table 4 we present the results of performance tests to compute affine equivalences between rational curves of various degrees, in different dimensions.The rational curves in the experiments were randomly generated, see also [5], with coefficients between −10 and 10.After generating the first curve, the second curve was obtained by applying an affine mapping f (x) = Ax + b to the first curve, where the matrix and the translation vector, for each dimension, are shown in Table 2; additionally, the resulting curve was reparametrized using a Möbius transformation φ(z) = 2z − 1.The timings to recover the affine equivalences are shown in Table 2: the rows of Table 2 correspond to dimensions from n = 2 to n = 6, and the columns, to degrees from d = 6 to d = 12.For degrees up to 10, we can compute the affine equivalences between the curves in less than a minute, for all the dimensions tested.

Justification of step (ii): computation of Möbius-commuting invariants
Step (ii) in the strategy presented at the beginning of Section 3.1 corresponds to the computation of what we called Möbius-commuting invariants.The deduction of these invariants is involved; so in order to develope our reasoning, we will distinguish three small substeps, that we present in separate subsections: (ii.1) Rewriting high order derivatives of ω and rewriting Faà di Bruno's formula.
Here we recall the notation ω = φ(z), and the notation ω ′ , ω ′′ , . . ., ω (k) for the derivatives of ω with respect to z. Recall also from Subsection 3.2 that the rough idea in step (ii) is to eliminate the derivatives of ω from the expressions resulting from expanding I i (q(ω)).In order to do that, first we will rewrite all the derivatives ω (k) in terms of just ω ′ ; we will do that in step (ii.1) with the help of the expansion of I n (q(ω)), for which we will make use of the tools introduced in Subsection 2.2 and, in particular, Faà di Bruno's formula.Then, in step (ii.2), we will compute an expansion form for I i (q(ω)) for i = 1, . . ., n − 1; this is the hardest part, where we will need to make use, again, of Faà di Bruno's formula, rewritten in an advantageous form in substep (ii.1), and some combinatorics.Finally, in step (ii.3), we will make use of I 0 (q(ω)), the auxiliary invariant introduced in Eq. ( 15) to finally eliminate ω ′ , the only derivative of ω left after substep (ii.1), and compute the Möbius-commuting invariants.

Substep (ii.1)
Our first step in order to eliminate the derivatives ω (k) is to write all of them in terms of ω ′ ; later, we will use this to rewrite Faà di Bruno's formula, introduced in Section 2.2, in an alternative form that will be useful in substep (ii.2).In order to do this, we will take advantage of the expansion of I n (q(ω)): in general, expanding I i (q(ω)) for i = 0, 1, . . ., n − 1 is messy and will be the hardest part, deferred for substep (ii.2), but expanding I n (q(ω)) is much more accesible.So let focus on this.From Eq. ( 13), we need to expand ∆(q(ω)) and A n (q(ω)).In both cases we will make use of Faà di Bruno's formula.First, from Eq. ( 12) From Faà di Bruno's formula, Eq. ( 7) and Eq. ( 8), we have and for k ≥ 2, where • k−1 is a linear combination of the derivatives of q up to order k −1, evaluated at ω.By expanding the determinant in Eq. ( 22) as a sum of determinants, we observe that all the determinants including terms of the • k−1 , k = 2, . . ., n, must be zero.Thus, we are left with one determinant, whose columns k = 1, 2, . . ., n are (ω ′ ) k q (k) (ω), and we get the following result. ∆q(ω).
Lemma 11.I n (q(ω)) = n(n + 1) 2 Notice that the formula for I n (q(ω)) in Lemma 11 is linear in ω ′′ .This allows us to write Furthermore, using Eq. ( 28) and invoking Lemma 4 in Section 2.2, we can write all the derivatives of ω in terms of just ω ′ , which was one of the goals of this substep.We formulate this as a corollary of Lemma 11.
Finally, let us use Corollary 12 to rewrite Faà di Bruno's formula.In order to do this, let us introduce the notation Thus, using Corollary 12 and the above notation, the Bell polynomial in Eq. ( 5) can be written as where only ω ′ is involved.Let be the Lah number L(k, m) (see for instance [10]), and let us denote Then we have the following result, proved in Appendix I.
Using Lemma 13 we can rewrite Faà di Bruno's formula as We will use this in the next substep.Additionally, notice that Bk,k = 1; also, we will assume the convention that Bk,m = 0 when k < m.

Substep (ii.2)
The goal of this substep is to expand the I i (q(ω)), for i = 1, . . ., n − 1, defined in Eq. ( 13).Since from Lemma 10 we already know ∆(q(ω)), we need to analyze, for i ̸ = n, By using Faà di Bruno's formula in Eq. ( 32), we know that each column, i.e. each derivative, in Eq. ( 33) is a linear combination of derivatives, where the number of terms is equal to the order of the derivative.Furthermore, we observe that for the first i − 1 columns, only the last term, i.e. the term involving the highest derivative, matters, since the other terms lead to vanishing determinants when expanding A i (q(ω)) as a sum of determinants.Thus, we can write Next let us express Eq.(34) as a sum of determinants, using Faà di Bruno's formula in Eq. (32).In order to do this, we consider the following two subsets: • P represents the set consisting of the permutations of {i, i + 1, . . ., n}.Notice that #{i, i + 1, . . ., n} = n − i + 1, where # denotes here the cardinal of a set.
(2) The power of Φ is the result of the sum Thus, when summing over the elements of P, the sum of the determinants in the expansion of A i (q(ω)) with ℓ 1 ̸ = n + 1 yields which we can also write as The underbraced expression corresponds exactly to the definition of an (n−i+1)×(n−i+1) determinant, whose j-th column consists of the values of Bn+1,n+1−j , Bn,n+1−j , . . ., Bi+1,n+1−j , where Bk,m = 0 when k < m, and Bk,k = 1.We call this determinant M n+1,i+1 , so We observe that for each i, where recall that i = 1, 2, . . ., n − 1, the degree of K i as a polynomial in ω ′ is n − i + 1.In particular, the degree of K 1 is n, and the degree of K n−1 is 2. Considering we notice that when collecting Eq. ( 53) for i = 1, . . ., n − 1, we get a linear system S in α 1 , α 2 , . . ., α n consisting of n unknowns and n − 1 equations.However, one can prove that for all i the coefficient of α 1 := ω ′ is always zero, i.e., K i does not depend on α 1 := ω ′ : indeed, from the formula in Eq. ( 53), for any i, the coefficient of ω ′ corresponds to the indices k = n − i and j = n − i, j = n − i + 1, which yields But this number is zero, as stated in the following lemma, which is proven in Appendix I.
Now we are almost ready to find our Möbius-commuting invariants.Because of Lemma 15, the system S is in fact a system with n unknowns, namely α 2 , . . ., α n .Furthermore, S is upper triangular.Using back substitution, we find the solution of S as where we assume that K n+1 = G n+1 = −1.Note that, for all k ∈ {2, 3, . . ., n}, α k is a rational function of the K j , G j whose numerator only depends on the K j and the denominator only depends on the G j .

Conclusion
We have presented an algorithm, generalizing the algorithm in [4], to compute the affine equivalences, if any, between two parametric curves in any dimension.Our strategy relies on bivariate factoring, and avoids polynomial system solving.The algorithm works for rational curves and also non-algebraic parametric curves with meromorphic components, admitting a rational inverse.We have implemented the algorithm in Maple, and evidence of its performance has been presented.
The algorithm works whenever not all the Möbius-commuting invariants are constant.This happens generically, but identifying the curves where this does not occur, as well as providing a solution to the problem for this special case, are questions that we pose here as open problems.
Additionally, in the case of non-algebraic curves, right now we need some hypotheses that are not always satisfied: for instance, planar curves like the cycloid, or the tractrix, or classical planar spirals, do not satisfy our hypotheses.However, we have observed that the algorithm seems to work also for many of those curves, which makes us think that our hypotheses could be relaxed.This requires more theoretical work regarding analytic curves.
It would be desirable to extend our ideas to the case of rational surfaces/hypersurfaces.This probably requires some extra hypotheses, e.g.non-existence of base points or special types of surfaces/hypersurfaces, that allow us to guess the type of transformation that we have in the parameter space: such transformation would play a role similar to the role played by Möbius transformations here.These are questions that we would like to address in the future.

Example 2 .
[2D catenary curves] Consider the curves C 1 and C 2 parametrized by

Example 3 .
[3D spirals] Consider the curves C 1 and C 2 parametrized by p(z)

Table 2 :
Affine mappings used in the examples

Table 3 :
CPU time in seconds for affine equivalences of random rational curves with various degrees in various dimensions