1 Introduction

In many problems, the parametric representation of geometric objects turns out to be a fundamental tool. Clear examples of this claim may be found in some geometric constructions in computer aided design, like plotting, computing intersections, etc. (see [16]), or in computing integrals or solving differential equations (see, e.g., [12, 14]). For this purpose, one may start with symbolic parametrizations and perform exactly all manipulations until a certain stage where a numerical treatment of the problem is required. We, in this paper, focus on the symbolic manipulation stage of this strategy. Probably the most common used parametrizations are the rational parametrizations (see [16, 43]), but other types of parametrizations can also be applied, as radical parametrizations (see [40, 41]) or trigonometric parametrizations (see [15, 18, 27, 28, 36]). Alternatively, one may work locally with parametrizations using rational or trigonometric splines (see [16, 18, 34, 45]). Furthermore, using the fact that the hyperbola is a genus zero curve, the previous ideas can be extended to the case of hyperbolic functions (see, e.g., [33]). Alternatively, hyperbolic and trigonometric functions can be combined using mixed spaces (see, e.g., [3, 7,8,9, 24, 25]); this combination allows to deal with some non-algebraic space curves (see, e.g., [31, 39, 47]).

Most of the previous contributions deal with the curve/surface case. In this paper, we generalize the trigonometric-like type of parametrizations from a more theoretical point of view so that we prove that any real unirational varieties, of any dimension, in any real affine space, admit a hybrid trigonometric parametrization. From the symbolic computational point of view, there exist algorithms to decide, and actually compute if it exists, whether a given curve can be parametrized over the reals (see [32, 43]). The situation, for the surface case, is not so simple as in the case of curves, but still there exist algorithms to compute real parametrizations for certain relatively wide types of surfaces (see, e.g., [2, 37, 38]). For the case of higher dimension, there do not exist, up to our knowledge, complete algorithms for parametrizing over the reals, although for some special cases one may derive algorithmic answers. So, our approach is more theoretical than practical when the dimension of the geometric object is bigger than 2. Nevertheless, if the dimension is either 1 or 2, or the dimension is bigger that 2 but the input is given parametrically, in any of the two forms treated in this paper, our contribution is also valid algorithmically.

The class of varieties studied in this paper is extended from the trigonometric curves considered in [15], i.e., curves parametrized in terms of truncated Fourier series, and hence, among other considerations, the extension goes from polynomial expressions of trigonometric functions to rational expressions of them. This extension is made in several respects. On the one hand, we analyze varieties associated to the so-called hybrid trigonometric parametrizations in which not only circular trigonometric functions may appear, but also hyperbolic trigonometric and monomials. On the other hand, not only polynomials are accounted, but also rational parametrizations of the previous form. Finally, the study is done for general real algebraic varieties and it is not restricted to the case of curves or surfaces.

So, we may be leading with a parametrization of the form (see Definition 2.1 for further details)

$$\begin{aligned} \left( \dfrac{\sin (u_1)}{\cos (u_2)+\cosh (v_1)}, w_1+\sinh (v_1),w_1\cos (u_1),\dfrac{\cosh (v_2)}{w_1w_2},\sin (u_2)\right) . \end{aligned}$$

We call this type of parametrizations hybrid trigonometric in the sense that they combine rationally elements from three different sets, namely

$$\begin{aligned}\{\sin (u_i),\cos (u_i)\}_{1\le i \le m_1}, \{\sinh (v_i),\cosh (v_i)\}_{ 1\le i \le m_2}, \{w_i\}_{1\le i \le m_3}.\end{aligned}$$

We say that a real variety is parametrizable by this type of parametrizations when the real Zariski closure of the image of the parametrization, seen as a real-valued function, is the given variety (see Definition 2.4). We prove that the varieties parametrized by hybrid trigonometric varieties are precisely the (real) unirational varieties; we recall that real unirational means that it can be parametrized by means of real rational functions, but the corresponding function associated to the parametrization might not be injective. This is an important different with real rational parametrizations. In addition, we provide algorithms to implicitize the hybrid trigonometric parametrization and to convert unirational parametrizations into hybrid trigonometric parametrization, and vice versa.

At first glance, one may notice no advance on this approach due to the absence of an enlargement of the class of unirational varieties when considering hybrid trigonometric parametrizations. However, a deepen study reveals that the appropriate point of view, considering either unirational or trigonometric parametrizations, may lead to a more accurate solution of a problem under consideration; and hence being provided with conversion and implicitization algorithms enhances the applicability of the unirational varieties of any dimension.

We devote a section to illustrate by examples some potential applications of hybrid trigonometric varieties. We comment on some of them in this introduction. Trigonometric curves emerge in numerous areas, as stated in [15]: classical curves, differential equations, Fourier analysis, etc. A source of applications is the use of trigonometric functions to describe geometric constructions like offsets, conchoids, cissoids, epicycloids, hypocycloids, etc. In this case, one usually introduces polar parametrizations. A polar representation of a surface is of the form

$$\begin{aligned}f(u,v)=\rho (u,v){\varvec{k}}(u,v),\end{aligned}$$

where \(\left\| {\varvec{k}}(u,v)\right\| =1\) is a parametrization of the unit sphere, and \(\rho (u,v)\) is a positive radius function; for references on this topic, we refer to [29, 30]. This work is concerned with the case in which both \(\rho \) and \({\varvec{k}}\) are expressed as rational functions of \(\{\cos (u_1),\sin (u_1),\cos (u_2),\sin (u_2)\}\). Indeed, Sect. 5.1 deals with the study of epicycloid and hypocycloid surfaces in which \({\varvec{k}}\) is chosen as the spherical coordinates in \({\mathbb {R}}^3\).

Another application of this family of parametrizations is the interpolation of certain functions via quotients of trigonometric polynomials, as described in [17].

Trigonometric curves and surfaces provide a wide catalog of shapes to be used in the application of the Hough transform to image processing. However, in order to apply the method one deals with the implicit representation of the curves and surfaces in the catalog (see [4, 5]). So, implicitization processes, as detailed in this paper, are required. The treatment of radical trigonometric parametrizations, via their conversion to radical (unirational) parametrizations, is illustrated in Sect. 5.3. Also, the computation of intersection of geometric objects is illustrated in Sect. 5.2.

In [6], the authors show how to transform, when possible, differential equations with coefficients being radicals, maybe nested, of rational functions, into algebraic differential equations. In Sect. 5.4, we see how to transform differential equations coefficients of which are radical, maybe nested, of rational expressions of trigonometric functions into differential equations as those treated in [6], and hence the results in [6] are applicable.

In the work [26] (see also [10, 19, 20]), the extended generalized Riccati Equation Mapping Method is applied for the (1+1)-Dimensional Modified KdV Equation (see Sect. 5.5). The authors arrive at different families of solutions, classified into soliton and soliton-like solutions (written in terms of rational functions of hyperbolic ones), and periodic solutions (written as rational functions of trigonometric ones), under different cases of the parameters involved. Applying the ideas in [12], and using the results in this paper, one may approach the problem transforming the trigonometric parametrization induced by the solution into a rational one.

The paper is structured as follows. Section 2 is devoted to introducing the notion of hybrid trigonometric parametrization. In Sect. 3, we analyze the fundamental properties of the hybrid trigonometric varieties and we see that they are characterized as the real unirational varieties. In Sect. 4, we outline the algorithms derived from the proofs in the previous section, and in Sect. 5 we illustrate by examples the potential applicability of our results. The paper ends with a summary of conclusions.

Throughout this paper, we will be working with both the usual Euclidean topology and the Zariski topology. In case of ambiguity, we will specify which topology is used.

2 Notion of Hybrid Trigonometric Parametrization

We start this section introducing the notion of hybrid trigonometric parametrization. In the introduction, we have already given an informal description of the concept. Now, we give the formal definition. For this purpose, in the sequel, we distinguish among three different types of variables, collected in tuples as

$$\begin{aligned} \textbf{u}=(u_1,\ldots ,u_{m_1}),\,\textbf{v}=(v_1,\ldots ,v_{m_2}),\,\textbf{w}=(w_1,\ldots ,w_{m_3}). \end{aligned}$$
(2.1)

\(u_i\) will appear in the circular trigonometric functions, \(v_i\) in the hyperbolic trigonometric functions, and \(w_i\) will appear rationally. In addition, let \(\textbf{t}=(\textbf{u},\textbf{v},\textbf{w})\). We fix from now on two natural numbers mn, where \(m=m_1+m_2+m_3\), and n represents the dimension of the affine space where we will work. In the sequel, we denote by \({\mathbb {L}}\) a computable subfield of \({\mathbb {R}}\).

Definition 2.1

A (hybrid) trigonometric parametrization is a non-constant tuple of rational functions

$$\begin{aligned} {\mathcal {T}}(\textbf{t})\in {\mathbb {L}}(\,\overrightarrow{\cos }(\textbf{u}),\,\overrightarrow{\sin }(\textbf{u}),\,\overrightarrow{\cosh }(\textbf{v}), \,\overrightarrow{\sinh }(\textbf{v}),\,\textbf{w})^n, \end{aligned}$$
(2.2)

where \(\overrightarrow{\cos }(\textbf{u})=(\cos (u_1),\ldots , \cos (u_{m_1}))\), \(\overrightarrow{\sin }(\textbf{u})=(\sin (u_1),\ldots , \sin (u_{m_1}))\), \(\overrightarrow{\cosh }(\textbf{v})=(\cosh (v_1),\ldots , \cosh (v_{m_2}))\) and \(\overrightarrow{\sinh }(\textbf{v})=(\sin (v_1),\ldots , \sin (v_{m_2}))\).

Remark 2.2

  1. 1.

    Associated to \({\mathcal {T}}\) we will consider the real function \({\mathcal {T}}:\textrm{dom}({\mathcal {T}})\subset {\mathbb {R}}^m \rightarrow {\mathbb {R}}^n; \textbf{t}\mapsto {\mathcal {T}}(\textbf{t})\), where \(\textrm{dom}\) denotes the domain of the function.

  2. 2.

    If only the parameters \(\textbf{w}\) appear, we have an unirational parametrization. When the parametrization only depends on \(\textbf{u}\), we call it circular and when it depends only on \(\textbf{v}\), hyperbolic. In Theorem 3.4, we establish the relation among these notions, namely hybrid trigonometric, circular, hyperbolic and rational.

  3. 3.

    Let \({\mathcal {T}}\) be a tuple as in Definition 2.1, but where the angle \(u_i\) in the cosines and sines are linear polynomials of the form \(a_{i1}u_1+\cdots +a_{im_1}u_{m_1}+b_{i0}\), where \(a_{ij}\in {\mathbb {Z}}\) and \(b_{i0}\in {\mathbb {L}}\); similarly for the hyperbolic functions. Then, applying Chebyshev polynomials (see 22.3.15 and the derivative of this formula; and 4.5.31 and 4.5.32 in [1]), \({\mathcal {T}}\) can be expressed as in (2.2), and hence it is a trigonometric parametrization. On the other hand, if \(a_{ij}\in {\mathbb {L}}\), not necessarily in \({\mathbb {Z}}\), a linear change of parameters provides a trigonometric reparametrization.

Example 2.3

The clearest examples of trigonometric parametrizations are the circle \((r\cos (u),r\sin (u))\) and the hyperbola \((r\cosh (v),r\sinh (v))\), with \(r\in {\mathbb {R}}\), that are circular and hyperbolic parametrizations, respectively. Similarly the spherical coordinates of a sphere generates a circular parametrization with two parameters. All the previous examples are polynomial expressions of the trigonometric functions. However, in our case, we allow denominators. For instance, \((1/\cos (u),\sin (u))\) is a circular parametrization of the rational quartic \(X^2Y^2-X^2+1=0\). However, observe that \((u,\sin (u))\) is not a trigonometric parametrization, in the sense of our definition. A similar case happens with the helix \((\cos (u),\sin (u),u)\). Finally, \((w \cos (u),w\sin (u),w)\) is a hybrid trigonometric parametrization of the cone \(X^2+Y^2=Z^2\).

Definition 2.4

Let \({\mathcal {V}}\subset {\mathbb {R}}^n\) be a real algebraic variety. We say that \({\mathcal {V}}\) is parametrizable by means of a (hybrid) trigonometric parametrization, if there exists a hybrid trigonometric parametrization \({\mathcal {T}}(\textbf{t})\) such that \({\mathcal {V}}\) is the Zariski closure in \({\mathbb {R}}^n\) of \({\mathcal {T}}(\textrm{dom}({\mathcal {T}}))\).

3 Trigonometric and Unirational Parametrizations

In this section, we establish the relationship between trigonometric and unirational parametrizations. More precisely, we show that a variety is parametrizable by means of trigonometric parametrizations if and only if it is real unirational. In addition, in the next section, based on the proofs of this section, we present conversion algorithms between the two types of representations.

In this section, let \({\mathcal {T}}(\textbf{t})\) be a hybrid trigonometric parametrization where \(m_1,m_2,m_3,n\) are as in (2.1), Definition 2.1, and Remark 2.2 (1). Let \(\textbf{m}=(m_1,m_2,m_3)\). In addition, we consider the hybrid \(\textbf{m}\)-torus

$$\begin{aligned} (\textrm{HT})_{\textbf{m}}:={\mathcal {S}}^1\times {\mathop {\cdots }\limits ^{m_1}} \times {\mathcal {S}}^1\times {\mathcal {H}}^{1}\times {\mathop {\cdots }\limits ^{m_2}}\times {\mathcal {H}}^{1}\times {\mathbb {R}}^{m_3}\subset {\mathbb {R}}^{2m_1+2m_2+m_3}, \end{aligned}$$
(3.1)

where \({\mathcal {S}}^1\) is the unit circle centered at the origin, and \({\mathcal {H}}^1\) stands for the hyperbola \(\{(Y_{1},Y_{2}):Y_{1}^2-Y_{2}^2=1\}\). Observe that the implicit equations of \((\textrm{HT})_{\textbf{m}}\) are

$$\begin{aligned} \left\{ X_{1}^{2}+X_{2}^{2}=1, \ldots ,X_{2m_1-1}^2+X_{2m_1}^2=1, Y_{1}^{2}-Y_{2}^{2}=1, \ldots ,Y_{2m_2-1}^2-Y_{2m_2}^2=1 \right\} .\nonumber \\ \end{aligned}$$
(3.2)

Furthermore, let

$$\begin{aligned} \xi (t)=\left( \dfrac{2 t}{t^2+1}, \dfrac{t^2-1}{t^2+1}\right) ,\qquad \nu (t)=\left( \dfrac{t^2+1}{2t}, \dfrac{t^2-1}{2t}\right) . \end{aligned}$$

Observe that both parametrizations are birational and, for \((x_1,x_{1}^{*})\in {\mathcal {S}}^{1}, x_{1}^{*}\ne 1\), and for \((y_{1},y_{1}^{*})\in {\mathcal {H}}^{1}\), it holds that

$$\begin{aligned}\xi ^{-1}(x_1,x_{1}^{*})=\frac{x_{1}}{1-x_{1}^{*}},\,\,\,\,\nu ^{-1}(y_1,y_{1}^{*})= \frac{1}{y_{1}-y_{1}^{*}}.\end{aligned}$$

Then

$$\begin{aligned} \begin{array}{lcll} {\mathcal {M}}: &{} {\mathbb {R}}^{m_1}\times ({\mathbb {R}}{\setminus }\{0\})^{m_2} \times {\mathbb {R}}^{m_3} &{} \longrightarrow &{} (\textrm{HT})_{\textbf{m}}\\ &{} \textbf{t}=(\textbf{u},\textbf{v},\textbf{w}) &{} \longmapsto &{} \left( \xi (u_1),\ldots ,\xi (u_{m_1}),\nu (v_{1}),\ldots ,\nu (v_{m_2}),\textbf{w}\right) \end{array}\nonumber \\ \end{aligned}$$
(3.3)

is a birational parametrization of \((\textrm{HT})_{\textbf{m}}\). Indeed, if

$$\begin{aligned} \textbf{x}=(x_1,x_{1}^{*},\ldots ,x_{m_1},x_{m_1}^{*}), \,\, \textbf{y}=(y_1,y_{1}^{*},\ldots ,y_{m_2},y_{m_2}^{*}), \,\, \textbf{z}=(z_1,\ldots ,z_{m_3}),\nonumber \\ \end{aligned}$$
(3.4)

the inverse of \({\mathcal {M}}\) is

$$\begin{aligned} \begin{array}{lcll} {\mathcal {M}}^{-1} : &{} (\textrm{HT})_{\textbf{m}}{\setminus } \Delta \subset {\mathbb {R}}^{2m_1+2m_2+m_3} &{}\rightarrow &{} {\mathbb {R}}^{m} \\ &{} (\textbf{x},\textbf{y},\textbf{z}) &{} \mapsto &{} (\xi ^{-1}(x_1,x_{1}^{*}),\ldots ,\xi ^{-1}(x_{m_1},x_{m_1}^{*}), \\ &{}&{} &{} \nu ^{-1}(y_1,y_{1}^{*}),\ldots ,\nu ^{-1}(y_{m_2},y_{m_2}^{*}),\,\, \textbf{z}), \end{array} \end{aligned}$$
(3.5)

where \(\Delta :=\{(\textbf{x},\textbf{y},\textbf{z})\in (\textrm{HT})_{\textbf{m}}\,|\,\prod _{i=1}^{m_1} (1-x_{i}^{*})=0 \}.\)

In this situation, the following proposition holds

Proposition 3.1

Every trigonometric parametrizable variety is unirational over \({\mathbb {R}}\).

Proof

Let \({\mathcal {V}}\subset {\mathbb {R}}^{n}\) be parametrized by a trigonometric parametrization \({\mathcal {T}}(\textbf{t})\). Let \({\mathcal {F}}(\textbf{x},\textbf{y},\textbf{z})\), see (3.4), be the tuple of rational functions obtained from \({\mathcal {T}}(\textbf{t})\) by replacing \(\cos (u_i),\sin (u_i),\cosh (v_j),\sinh (v_j),w_j\) by \(x_{i},x_{i}^{*},y_{i},y_{i}^{*},z_{i}\), respectively. Also, we introduce the map

$$\begin{aligned} \begin{array}{lcll} \Psi : &{} \textrm{dom}({\mathcal {T}}) &{} \longrightarrow &{} (\textrm{HT})_{\textbf{m}}\subset {\mathbb {R}}^{2m_1+2 m_2+m_3} \\ &{} \textbf{t}=(\textbf{u},\textbf{v},\textbf{w}) &{} \longmapsto &{} (\cos (u_1),\sin (u_1),\ldots ,\cos (u_{m_1}),\sin (u_{m_1}),\\ &{} &{} &{} \cosh (v_{1}),\sinh (v_{1}),\ldots ,\cosh (v_{m_2}),\sinh (v_{m_2}), \,\,\textbf{w}). \end{array} \end{aligned}$$
(3.6)

Let H be the \(\textrm{lcm}\) of all denominators in the tuple of rational function \({\mathcal {F}}(\textbf{x},\textbf{y},\textbf{z})\), and \(\Omega =(\textrm{HT})_{\textbf{m}}{\setminus }\{(\textbf{x},\textbf{y},\textbf{z})\,|\, H(\textbf{x},\textbf{y},\textbf{z})=0\}\). So \({\mathcal {F}}\) induces the rational map

$$\begin{aligned} \begin{array}{lcll} {\mathcal {F}}:&\Omega \subset (\textrm{HT})_{\textbf{m}}\longrightarrow & {} {\mathbb {R}}^n; \,\, (\textbf{x},\textbf{y},\textbf{z}) \longmapsto {\mathcal {F}}(\textbf{x},\textbf{y},\textbf{z}). \end{array} \end{aligned}$$
(3.7)

Let \({\mathcal {M}}\) be as in (3.3). Taking \({\mathcal {Z}}=\overline{{\mathcal {F}}(\Omega )}\) as the Zariski closure over \({\mathbb {R}}^n\), we have the following diagram

(3.8)

Then, \({\mathcal {G}}={\mathcal {F}}({\mathcal {M}}(\textbf{t}))\) is a real unirational parametrization with image in \({\mathcal {Z}}\). Since \({\mathcal {M}}\) is dominant in \((\textrm{HT})_{\textbf{m}}\) and \({\mathcal {F}}\) is dominant in \({\mathcal {Z}}\), therefore, \({\mathcal {G}}\) is a real unirational parametrization of \({\mathcal {Z}}={\mathcal {V}}\). \(\square \)

The converse of Proposition 3.1 holds trivially, since a unirational parametrization is indeed a particular case of a trigonometric parametrization. However, in the next proposition, we show that any real unirational parametrization can always be parametrized by means of a non-unirational trigonometric parametrization.

Proposition 3.2

Every unirational variety over \({\mathbb {R}}\) can be parametrized by a non-unirational trigonometric parametrization.

Proof

Let \({\mathcal {V}}\subset {\mathbb {R}}^n\) be a unirational variety over \({\mathbb {R}}\) with \(\dim ({\mathcal {V}})=m\). Fix a triple of non-negative integers \((m_1,m_2,m_3)\) such that \(m_1+m_2+m_3=m\) where \(m_1+m_2>0\). Let \((\textrm{HT})_{\textbf{m}}\subset {\mathbb {R}}^{2m_1+2m_2+m_3}\), \({\mathcal {M}}\), \({\mathcal {M}}^{-1}\) and \(\Psi \) as in (3.1, 3.3, 3.5, 3.6). Let \({\mathcal {P}}\) be a rational real parametrization of \({\mathcal {V}}\). Then, \({\mathcal {Q}}={\mathcal {P}}\circ {\mathcal {M}}^{-1} \circ \Psi \) is a non-unirational trigonometric parametrization of \({\mathcal {V}}\) (see Diagram 3.9).

(3.9)

\(\square \)

Remark 3.3

Observe that in the previous proposition, \((m_1,m_2,m_3)\) is freely chosen, and hence one can design the type of trigonometric parametrization to be computed.

We finish this section with the main theorem.

Theorem 3.4

Let \({\mathcal {V}}\) be an irreducible variety. The following statements are equivalent

  1. 1.

    \({\mathcal {V}}\) is unirational over \({\mathbb {R}}\).

  2. 2.

    \({\mathcal {V}}\) can be parametrized by a non-unirational hybrid trigonometric parametrization.

  3. 3.

    \({\mathcal {V}}\) can be parametrized by a non-unirational circular parametrization.

  4. 4.

    \({\mathcal {V}}\) can be parametrized by a non-unirational hyperbolic parametrization.

Proof

It follows from Propositions 3.1 and 3.2. \(\square \)

4 Parametrization and Implicitization Algorithms

The proofs in the previous sections are constructive, and hence provide algorithms to deal with hybrid trigonometric parametrizations. In this section, we derive these algorithms that, essentially, show how to change from hybrid trigonometric parametrizations to unirational parametrizations and how to implicitize. From the computational point of view, one should take into account that we consider conversion methods either between two different types of parametrizations or from a parametrization to the implicit equations. Therefore, we assume that the parametric representation is given.

figure a

[FromTrigToRat] Obtains a rational parametrization from a hybrid trigonometric parametrization.

Example 4.1

We consider the hybrid trigonometric parametrization (in this example, \(\textbf{t}=(u,v)\))

$$\begin{aligned} {\mathcal {T}}(u,v)=\left( \cos \left( u\right) ^{2} \sin \left( u \right) ,{\frac{\sin \left( u \right) }{\sinh \left( v \right) }}, \sin \left( u \right) ^{3} \right) \end{aligned}$$

and \({\mathcal {V}}\) the Zariski closure of its image. We apply Algorithm 1. We have that \(\textbf{m}=(1,1,0)\). So, the \(\textbf{m}\)-torus is \((\textrm{HT})_{\textbf{m}}={\mathcal {S}}^1\times {\mathcal {H}}^1\), which is parametrized as

$$\begin{aligned} {\mathcal {M}}(u,v)=\left( \frac{2u}{u^{2}+1},\frac{u^{2}-1}{u^{2}+1}, \frac{v^{2}+1}{2v},\frac{v^{2}-1}{2v}\right) \end{aligned}$$

Replacing \(\cos (u),\sin (u),\sinh (v)\) by \(x_1,x_{1}^{*},y_{1}^{*}\), respectively, we get

$$\begin{aligned} {\mathcal {F}}(x_1,x_{1}^{*},y_{1},y_{1}^{*})=\left( {x_{{1}}}^{2}x_{{1}}^{*},{\frac{x_{{1}}^*}{y_{{1}}^*}},{x_{{1}}^*}^{3}\right) . \end{aligned}$$
(4.1)

Finally, we get that the rational parametrization of \({\mathcal {V}}\)

$$\begin{aligned} {\mathcal {G}}(u,v)=\left( {\frac{4\,{u}^{4}-4\,{u}^{2}}{ \left( {u}^{2}+1 \right) ^{3}}},{\frac{2\,{u}^{2}v-2\,v}{ \left( {u}^{2}+1 \right) \left( {v}^{2}-1 \right) }},{\frac{ \left( {u}^{2}-1 \right) ^{3}}{ \left( {u}^{2}+1 \right) ^{3}}} \right) . \end{aligned}$$
figure b

[FromRatToTrig] Obtains a hybrid trigonometric parametrization from a real unirational parametrization.

Example 4.2

We apply Algorithm 2 to the unit circle parametrized by

$$\begin{aligned} {\mathcal {P}}(t)=\left( \dfrac{2t}{t^2+1},\dfrac{t^2-1}{t^2+1}\right) \end{aligned}$$

taking \(\textbf{m}=(1,0,0)\). In this case,

$$\begin{aligned} {\mathcal {M}}^{-1}=\frac{x}{1-x^*}, \,\,\,\text {and}\,\,\,\Psi (u)=(\cos (u),\sin (u)) \end{aligned}$$

and the algorithm returns the expected parametrization \({\mathcal {Q}}(t)=(\cos (u),\sin (u))\). Alternatively, we may consider the same parametrization \({\mathcal {P}}(t)\) and \(\textbf{m}=(0,1,0)\). In this case,

$$\begin{aligned} {\mathcal {M}}^{-1}=\frac{1}{y-y^*}, \,\,\,\text {and}\,\,\,\Psi (v)=(\cosh (v),\sinh (v)) \end{aligned}$$

and the algorithm returns the hyperbolic parametrization

$$\begin{aligned}{\mathcal {Q}}(v)=\left( \dfrac{1}{\cosh (v)}, \dfrac{\sinh (v)}{\cosh (v)}\right) .\end{aligned}$$

Now we deal with the problem of implicitizing a hybrid trigonometric parametrization. Since we already have an algorithm to compute a unirational parametrization of the variety, namely Algorithm 1, one can simply apply the existing implicitization techniques to that parametrization. Alternatively, one may use the implicit equations of the circles and hyperbolas involved in the input parametrization. More precisely, one has the following algorithm.

figure c

[FromTrigParamToImpl] Obtains the implicit equations from a hybrid trigonometric parametrization.

Example 4.3

Let \({\mathcal {T}}(\textbf{t})\) be the parametrization in Example 4.1, and \({\mathcal {G}}\) be the rational parametrization generated by Algorithm 1 (see Example 4.1). Implicitizing \({\mathcal {G}}\), that is using Option 1 in Algorithm 3, one gets that \(X_{1}^3+3X_{1}^2X_{3}+3X_{1}X_{3}^2+X_{3}^3-X_3\) is the implicit equation of \({\mathcal {V}}\). Alternatively, one may use Option 2 in Algorithm 3. Proceeding as in Example 4.1, we get \({\mathcal {F}}(x_1,x_{1}^{*},y_1,y_{1}^{*})\); see (4.1). Moreover, the implicit equations of \({\mathcal {H}}\) are \(\{x_{1}^{2}+{x_{1}^{*}}^{2}=1,y_{1}^{2}-{y_{1}^{*}}^{2}=1\}\). Let \(\textrm{J}\) be the ideal generated by \(\{ Wy_{1}^{*}, -{x_{1}^{*}}^3+X_3, -x_{1}^{2} x_{1}^{*}+X_1, X_2 y_{1}^{*}-x_{1}^{*}, x_{1}^2+{x_{1}^{*}}^2-1, y_{1}^2-{y_{1}^{*}}^2-1 \}\). Eliminating \(\{W,x_1,x_{1}^{*},y_1,y_{1}^{*}\}\), we get the implicit equation \(X_{1}^3+3X_{1}^2X_{3}+3X_{1}X_{3}^2+X_{3}^3-X_3=0\).

Example 4.4

We consider the variety \({\mathcal {V}}\subset {\mathbb {R}}^4\) parametrized by

$$\begin{aligned}{\mathcal {T}}(u_1,u_2)=\left( \frac{1}{\cos (u_1)},\frac{\cos (u_2)}{\sin (u_1)},\frac{1}{\sin (u_1)}, \frac{\cos (u_2)}{\sin (u_2)}\right) .\end{aligned}$$

Applying Algorithm 1, we obtain the rational parametrization

$$\begin{aligned}{\mathcal {G}}(u_1,u_2)= \left( \frac{u_{1}^{2}+1}{2 u_{1}}, \frac{2 u_{2} \left( u_{1}^{2}+1 \right) }{ \left( u_{2}^{2}+1 \right) \left( u_{1}^{2}-1 \right) }, \frac{u_{1}^{2}+1}{u_{1}^{2}-1},\frac{2u_{2}}{u_{2}^{2}-1}\right) .\end{aligned}$$

Applying Algorithm 3, we get that \({\mathcal {V}}\) is the surface of \({\mathbb {R}}^4\) defined by

$$\begin{aligned} \{X_{1}^{2}X_{3}^{2}-X_{1}^{2}-X_{3}^{2}=0, X_{2}^{2}X_{4}^{2}-X_{3}^{2}X_{4}^2+X_{2}^2=0\}. \end{aligned}$$

5 Motivating Examples of Applicability

In this section, by means of some examples we illustrate some potential applications that motivate the use of the theory developed in the previous sections.

5.1 Epicycloid and Hypocycloid Surfaces

In this subsection, we show how the classical epicycloid and hypocycloid constructions for circles can be generalized to the case of spheres, generating naturally examples of trigonometric parametrizations. An epicycloid is a plane curve drawn by a fixed point in a circle rolling without slipping around a second fixed circle. This is a very classical curve which has been widely studied (see, e.g., [23]).

A natural generalization of such construction to a higher number of variables describes the trail of a fixed point in a sphere within the affine space of dimension 3, rolling around a second fixed sphere (see Fig. 1 left). This phenomenon can be generally described in terms of a parametrization of a surface. Assume the fixed sphere is centered at the origin, with radius \(R>0\), and the moving one has radius \(0<r\le R\). In the case of the rolling sphere being of larger radius, an analogous construction can be made.

Fig. 1
figure 1

Left: Construction of a 2-dimensional epicycloid \(R=r=1\). Right: Construction of hypocycloid \(R=3\), \(r=1\)

After the application of an affinity on the space, one can describe the generalized epicycloid in terms of the following parametrization:

$$\begin{aligned} \begin{array}{cccl} {\mathcal {T}}:&{}[0,\pi ]\times [0,2\pi ) &{}\longrightarrow &{}\!\! {\mathbb {R}}^3\\ &{} (u_1,u_2) &{} \longmapsto &{} \!\! \left( (R+r)\sin (u_1)\cos (u_2)-r\sin \left( (1+\frac{R}{r})u_1\right) \cos (u_2)\right. ,\\ &{} &{} &{} (R+r)\sin (u_1)\sin (u_2)-r\sin \left( (1+\frac{R}{r})u_1\right) \sin (u_2),\\ &{} &{} &{} \left. (R+r)\cos (u_1)-r\cos \left( (1+\frac{R}{r})u_1\right) \right) . \end{array}\nonumber \\ \end{aligned}$$
(5.1)

In the sequel, let us assume that R/r is a rational number. In this situation, \({\mathcal {T}}\) is a circular parametrization (see Definition 2.1) and the epicycloid the surface that it generates. Let us illustrate the construction with a particular example.

Example 5.1

Consider the case of \(R=5\) and \(r=1\) (see Fig. 2 left). Then, \({\mathcal {T}}\) can be written in the form

$$\begin{aligned}{\mathcal {T}}(\textbf{u})= \left( {\mathcal {T}}_1(u_1,u_2),{\mathcal {T}}_2(u_1,u_2),{\mathcal {T}}_3(u_1,u_2)\right) ,\end{aligned}$$

where

$$\begin{aligned} \begin{array}{lll} {\mathcal {T}}_1(\textbf{u})&{}=&{}6\sin (u_1)\cos (u_2)-32\cos (u_2)\sin (u_1)\cos (u_1)^5+32\cos (u_2)\sin (u_1)\cos (u_1)^3\\ &{}&{}-6\cos (u_2)\sin (u_1)\cos (u_1), \\ {\mathcal {T}}_2(\textbf{u})&{}=&{}6\sin (u_1)\sin (u_2)-32\sin (u_2)\sin (u_1)\cos (u_1)^5+32\sin (u_2)\sin (u_1)\cos (u_1)^3\\ &{}&{} -6\sin (u_2)\sin (u_1)\cos (u_1), \\ {\mathcal {T}}_3(\textbf{u})&{}=&{} 6\cos (u_1)-32\cos (u_1)^6+48\cos (u_1)^4-18\cos (u_1)^2+1. \end{array}\nonumber \\ \end{aligned}$$
(5.2)
Fig. 2
figure 2

Left: Generalized epicycloid in Example 5.1. Right: Generalized hypocycloid in Example 5.2

Applying Algorithm 3, we get that the implicit equation of the epicycloid which is a 12-degree surface (see the implicit equation in Ex. 18 in the preliminary version [22]).

Applying Algorithm 1, we get the following rational parametrization of the epicycloid

$$\begin{aligned} \begin{array}{lll} {\mathcal {G}}(\textbf{u})= & {} \left( 4 \dfrac{ \left( u_{1}^{2}-1 \right) u_{2} g_1(\textbf{u})}{ \left( u_{2}^{2}+1 \right) \left( u_{1}^{2}+1 \right) ^{6}}, 2 \dfrac{ \left( u_{1}^{2}-1 \right) \left( u_{2}^{2}-1 \right) g_1(\textbf{u})}{ \left( u_{2}^{2}+1 \right) \left( u_{1}^{2}+1 \right) ^{6}}, \dfrac{g_2(\textbf{u})}{\left( u_{1}^{2}+1 \right) ^{6}}\right) , \end{array} \end{aligned}$$
(5.3)

where \(g_1(\textbf{u})=3 u_{1}^{10}-6 u_{1}^{9}+ 15 u_{1}^{8}+104 u_{1}^{7}+30 u_{1}^{6}-292 u_{1}^{5}+30 u_{1}^{4}+104 u_{1} ^{3}+15 u_{1}^{2}-6 u_{1}+3\) and \(g_2(\textbf{u})=u_{1}^{12}+12 u_{1}^{11}-66 u_{1}^{10}+60 u_{1}^{9}+495 u_{1}^{8}+ 120 u_{1}^{7}-924 u_{1}^{6}+120 u_{1}^{5}+495 u_{1}^{4}+60 u_{1}^{3}-66 u_{1}^{2}+12 u_{1}+1\).

We can adapt the previous reasoning to the case of hypocycloids. The construction of a classical hypocycloid is analogous to that of a cycloid. Here, the moving disk is rolling inside the fixed one (see Fig. 1 right). We consider the generalization in which a sphere of radius \(r>0\) is rolling inside a fixed one of radius \(r<R\).

We assume again that R/r is a rational number. After the application of an affinity on the space, one can describe the generalized hypocycloid in terms of the following circular parametrization:

$$\begin{aligned} \begin{array}{cccl} {\mathcal {T}}:&{}[0,\pi ]\times [0,2\pi ) &{}\longrightarrow &{} {\mathbb {R}}^3\\ &{} (u_{1},u_{2}) &{} \longmapsto &{} \left( (R-r)\sin (u_{1})\cos (u_{2})-r\sin \left( (1-\frac{R}{r})u_{1}\right) \cos (u_{2})\right. ,\\ &{} &{} &{} (R-r)\sin (u_{1})\sin (u_{2})-r\sin \left( (1-\frac{R}{r})u_{1}\right) \sin (u_{2}),\\ &{} &{} &{} \left. (R-r)\cos (u_{1})-r\cos \left( (1-\frac{R}{r})u_{1}\right) \right) . \end{array} \end{aligned}$$

Example 5.2

Consider the case of \(R=7\) and \(r=1\) (see Fig. 2 right). Then, \({\mathcal {T}}\) can be written in the form

$$\begin{aligned}{\mathcal {T}}(u_{1},u_{2})= \left( {\mathcal {T}}_1(u_{1},u_{2}),{\mathcal {T}}_2(u_{1},u_{2}),{\mathcal {T}}_3(u_{1},u_{2})\right) ,\end{aligned}$$

where

$$\begin{aligned} \begin{array}{lll} {\mathcal {T}}_1(\textbf{u})&{}=&{}6\sin (u_{1})\cos (u_{2})+32\cos (u_{2})\sin (u_{1})\cos (u_{1})^5-32\cos (u_{2})\sin (u_{1})\cos (u_{1})^3\\ &{}&{}+6\cos (u_{2})\sin (u_{1})\cos (u_{1}), \\ {\mathcal {T}}_2(\textbf{u})&{}=&{}6\sin (u_{1})\sin (u_{2})+32\sin (u_{2})\sin (u_{1})\cos (u_{1})^5-32\sin (u_{2})\sin (u_{1})\cos (u_{1})^3\\ &{}&{}+6\sin (u_{2})\sin (u_{1})\cos (u_{1}),\\ {\mathcal {T}}_3(\textbf{u})&{}= &{}6\cos (u_{1})-32\cos (u_{1})^6+48\cos (u_{1})^4-18\cos (u_{1})^2+1. \end{array} \end{aligned}$$

Applying Algorithm 3, we get that the implicit equation of the hypocycloid is the 12-degree surface

$$\begin{aligned}{} & {} x^{12}+6x^{10}y^2+6x^{10}z^2+15x^8y^4+30x^8y^2z^2+15x^8z^4+20x^6y^6+60x^6y^4z^2+60x^6y^2z^4\\{} & {} \qquad +\,20x^6z^6+15x^4y^8+60x^4y^6z^2+90x^4y^4z^4+60x^4y^2z^6+15x^4z^8+6x^2y^{10}+30x^2y^8z^2\\{} & {} \qquad +\,60x^2y^6z^4+60x^2y^4z^6+30x^2y^2z^8+6x^2z^{10}+y^{12}+6y^{10}z^2+15y^8z^4+20y^6z^6\\{} & {} \qquad \,+15y^4z^8+6y^2z^{10}+z^{12}+30x^{10}+150x^8y^2+150x^8z^2+300x^6y^4+600x^6y^2z^2\\{} & {} \qquad +\,300x^6z^4+300x^4y^6+900x^4y^4z^2+900x^4y^2z^4+300x^4z^6+150x^2y^8+600x^2y^6z^2\\{} & {} \qquad +\,900x^2y^4z^4+600x^2y^2z^6+150x^2z^8+30y^{10}+150y^8z^2+300y^6z^4+300y^4z^6+150y^2z^8\\{} & {} \qquad +\,30z^{10}+915x^8+3660x^6y^2+3660x^6z^2+5490x^4y^4+10980x^4y^2z^2+5490x^4z^4\\{} & {} \qquad +\,3660x^2y^6+10980x^2y^4z^2+10980x^2y^2z^4+3660x^2z^6+915y^8+3660y^6z^2+5490y^4z^4\\{} & {} \qquad +\,3660y^2z^6+915z^8-653184x^6z-1959552x^4y^2z+3265920x^4z^3-1959552x^2y^4z\\{} & {} \qquad +\,6531840x^2y^2z^3-1959552x^2z^5-653184y^6z+3265920y^4z^3-1959552y^2z^5+93312z^7\\ {}{} & {} \qquad +\,28420x^6+85260x^4y^2\\{} & {} \qquad +\,85260x^4z^2+85260x^2y^4+170520x^2y^2z^2+85260x^2z^4+28420y^6+85260y^4z^2\\{} & {} \qquad +\,85260y^2z^4+28420z^6+900375x^4+1800750x^2y^2+1800750x^2z^2+900375y^4\\{} & {} \qquad +\,1800750y^2z^2+900375z^4+2205918750x^2+2205918750y^2+2205918750z^2\\ {}{} & {} \quad =64339296875. \end{aligned}$$

5.2 Computing Intersections

Let us say that we want to compute the intersection of two algebraic surfaces. Usually one takes, if possible, a parametrization of one of the surfaces, and substitute it in the implicit equation of the other. This provides an (either polynomial or trigonometric) equation that encodes the parameter values to be substituted in the parametrization to achieve the intersection set. In order to approximate the solutions of this equation, one may perform a change of variable to the trigonometric equation to reach a polynomial equation. Alternatively one may apply from the beginning the conversion algorithm to treat the problem purely algebraically. In the following example we illustrate this idea.

Example 5.3

In this example, we consider the epicycloid of Example 5.1, let us call it \({\mathcal {V}}_1\), and the sphere \({\mathcal {V}}_2\) of equation \(x_{1}^{2}+x_{2}^{2}+x_{3}^{2}=36\). We want to compute \({\mathcal {V}}_1\cap {\mathcal {V}}_2\). The construction of the generalized epicycloid with such sphere suggests a non-empty intersection, as it can be observed in Fig. 3.

Fig. 3
figure 3

Detail on the intersection of an epicycloid with a sphere

Although the parametrization of \({\mathcal {V}}_2\) is simple, the implicit equation of \({\mathcal {V}}_1\) is huge. So, we try to use a parametrization of \({\mathcal {V}}_1\) and the implicit equation of the sphere. First, we observe that if we use the trigonometric parametrization \({\mathcal {T}}(\textbf{t})\) (see (5.2)), we get the equation

$$\begin{aligned} E_{\textrm{trig}}:=-192\cos (u_1)^5+240\cos (u_1)^3-60\cos (u_1)+1=0.\end{aligned}$$

In this situation, we may consider the change of variable \(\cos (u_1)=t\) to get the polynomial equation

$$\begin{aligned} -192t^5 + 240t^3 - 60t + 1=0,\end{aligned}$$

roots of which can be approximated as

$$\begin{aligned} \{ -0.9457680976, -0.6012020728, 0.01668524304, 0.5742047825, 0.9560801449\}.\end{aligned}$$

Moreover, undoing the change we get the the following values for \(u_1\)

$$\begin{aligned} \{2.810747371, 2.215800875, 1.554110309, 0.9591638134, 0.2974732482\}.\end{aligned}$$

Now, each of these values generates a circle, namely

$$\begin{aligned} \begin{array}{l} \left( 2.864463759 \cos (u_2), 2.864463759 \sin (u_2), -5.27208188\right) , \\ \left( 4.128879847 \cos (u_2), 4.128879847 \sin (u_2), -4.353429821\right) , \\ \left( 5.899215807 \cos (u_2), 5.899215807 \sin (u_2), 1.095104028\right) , \\ \left( 5.416251840 \cos (u_2), 5.416251840 \sin (u_2), 2.581514285\right) , \\ \left( 0.7814521191\cos (u_2), 0.7814521191 \sin (u_2), 5.94889339\right) . \end{array} \end{aligned}$$
(5.4)

Alternatively, we may use the rational parametrization \({\mathcal {G}}(\textbf{t})\) of \({\mathcal {V}}_1\) given in (5.3) to get the equation

$$\begin{aligned} E_{\textrm{rat}}:= & {} u_{1}^{10}-120u_{1}^{9}+5u_{1}^{8}+1440u_{1}^{7}+10u_{1}^{6}-3024u_{1}^{5}+10u_{1}^{4}+1440{u_1}^{3}+5u_{1}^{2}\\{} & {} -120 u_{1}+1=0 , \end{aligned}$$

which roots are all real and can be approximated as

$$\begin{aligned} \begin{array}{r} \{-2.992499717, -1.400811244, -0.7138720538, -0.3341687869, 0.008343202240, \\ 0.3157206162, 0.739367548, 1.352507292, 3.167357305, 119.8580558\}. \end{array} \end{aligned}$$

Substituting these roots in \({\mathcal {G}}(\textbf{u})\), we get the following five circles of intersection (compared to (5.4))

$$\begin{aligned} \begin{array}{l} \left( 1.56290425{\dfrac{u_{2}}{u_{2}^{2}+ 1.0}}, 0.781452121{\dfrac{u_{2}^{2}- 1.0}{u_{2}^{2}+ 1.0}}, 5.948893399\right) ,\\ \left( 5.72892752{\dfrac{u_{2}}{u_{2}^{2}+ 1.0}}, 2.864463754{\dfrac{u_{2}^{2}- 1.0}{u_{2}^{2}+ 1.0}},- 5.272081897\right) ,\\ \left( 8.25775970{\dfrac{u_{2}}{u_{2}^{2}+ 1.0}}, 4.128879847{\dfrac{u_{2}^{2}- 1.0}{u_{2}^{2}+ 1.0}},- 4.353429820\right) ,\\ \left( 10.83250368{\dfrac{u_{2}}{u_{2}^{2}+ 1.0}}, 5.416251839{\dfrac{u_{2}^{2}- 1.0}{u_{2}^{2}+ 1.0}}, 2.581514281\right) ,\\ \left( 11.79843163{\dfrac{u_{2}}{u_{2}^{2}+ 1.0}}, 5.899215810{\dfrac{u_{2}^{2}- 1.0}{u_{2}^{2}+ 1.0}}, 1.095104026\right) . \end{array} \end{aligned}$$
(5.5)

In order to check that the result is correct, we compute a Gröbner basis of the ideal of \({\mathcal {V}}_1\cap {\mathcal {V}}_2\) w.r.t. a lexicographic order to get

$$\begin{aligned} \{1492992 x_{3}^5-67184640x_{3}^3+604661760 x_{3}-576284939, x_{1}^2+x_{2}^2+x_{3}^2-36 \}.\end{aligned}$$

The roots of the univariate polynomial in the basis are

$$\begin{aligned}\{-5.272081883, -4.353429821, 1.095104026, 2.581514286, 5.948893392 \}\end{aligned}$$

that are the level planes where the circles lie on. On the other hand, substituting these 5 roots in the second polynomial we get the circles. In Fig. 4, we plot the five intersection circles.

Fig. 4
figure 4

View of the intersection circles in Example 5.3

The previous intersection decomposed as a union of genus zero curves, and hence, the manipulation was easy for both trigonometric and rational parametrizations of \({\mathcal {V}}_1\). Let us now consider \({\mathcal {V}}_1\) as above and let us replace \({\mathcal {V}}_2\) by the plane of equation \(x+y=1\). We proceed as before. First, we substitute the trigonometric parametrization \({\mathcal {T}}(\textbf{t})\) (see (5.2)) in the plane equation. We get

$$\begin{aligned} \begin{array}{ll} E_{\textrm{trig}}:=&{} 6 \sin \! \left( u_{1}\right) \cos \! \left( u_{2}\right) -32 \cos \! \left( u_{2}\right) \sin \! \left( u_{1}\right) \cos ^{5}\left( u_{1}\right) +32 \cos \! \left( u_{2}\right) \sin \! \left( u_{1}\right) \cos ^{3}\left( u_{1}\right) \\ &{}-\,6 \cos \! \left( u_{2}\right) \sin \! \left( u_{1}\right) \cos \! \left( u_{1}\right) +6 \sin \! \left( u_{1}\right) \sin \! \left( u_{2}\right) -32 \sin \! \left( u_{2}\right) \sin \! \left( u_{1}\right) \cos ^{5}\left( u_{1}\right) \\ &{} +\,32 \sin \! \left( u_{2}\right) \sin \! \left( u_{1}\right) \cos ^{3}\left( u_{1}\right) -6 \sin \! \left( u_{2}\right) \sin \! \left( u_{1}\right) \cos \! \left( u_{1}\right) -1. \end{array} \end{aligned}$$

Now, \({\mathcal {V}}_1\cap {\mathcal {V}}_2\) is the Zariski closure of \(\{{\mathcal {T}}(\textbf{t})\,|\, E_{\textrm{trig}}(\textbf{t})=0\}\). However, \(E_{\textrm{trig}}=0\) does not seem easy to handle. Alternatively, we may use the rational parametrization \({\mathcal {G}}(\textbf{t})\) of \({\mathcal {V}}_1\) given in (5.3) to get

$$\begin{aligned} \begin{array}{ll} E_{\textrm{rat}}:=&{} 5 u_{1}^{2} u_{2}^{12}-12 u_{1}^{2} u_{2}^{11}+12 u_{1} u_{2}^{12}+18 u_{1}^{2} u_{2}^{10}-24 u_{1} u_{2}^{11}-7 u_{2}^{12}+220 u_{1}^{2} u_{2}^{9}+48 u_{1} u_{2}^{10}\\ &{}+\,12 u_{2}^{11}+15 u_{1}^{2} u_{2}^{8}+440 u_{1} u_{2}^{9}-30 u_{2}^{10}-792 u_{1}^{2} u_{2}^{7}+60 u_{1} u_{2}^{8}-220 u_{2}^{9}-20 u_{1}^{2} u_{2}^{6}\\ &{} -\,1584 u_{1} u_{2}^{7}-45 u_{2}^{8}+792 u_{1}^{2} u_{2}^{5}+792 u_{2}^{7}-45 u_{1}^{2} u_{2}^{4}+1584 u_{1} u_{2}^{5}-20 u_{2}^{6}-220 u_{1}^{2} u_{2}^{3}\\ &{}-\,60 u_{1} u_{2}^{4}-792 u_{2}^{5}-30 u_{1}^{2} u_{2}^{2}-440 u_{1} u_{2}^{3}+15 u_{2}^{4}+12 u_{1}^{2} u_{2}-48 u_{1} u_{2}^{2}+220 u_{2}^{3}\\ &{}-\,7 u_{1}^{2}+24 u_{1} u_{2}+18 u_{2}^{2}-12 u_{1}-12 u_{2}+5. \end{array} \end{aligned}$$

Then, \({\mathcal {V}}_1\cap {\mathcal {V}}_2\) is the Zariski closure of \(\{{\mathcal {G}}(\textbf{t})\,|\, E_{\textrm{rat}}(\textbf{t})=0\}\). The genus of the curve defined by \(E_{\textrm{rat}}\) is 11. Nevertheless although, in general, only curves of genus at most 6 can be parametrized by radicals (see [40]), since \(\deg _{u_1}(E_{\textrm{rat}})=2\), one can parametrize \(E_{\textrm{rat}}\) by radicals, and hence one can give a (radical) parametric expression of the intersection variety. On the other hand, since we are working symbolically with polynomials, we can compute the topological graph of the curve defined by \(E_{\textrm{rat}}\). The topological graph consists of vertices that correspond to the singular points and to the ramification points of the curve, and edges that represent the real branches of the curve. For the computation of the graph (see, e.g., [11, 13, 35]), in most algorithms, first a linear change of coordinates is performed in the polynomial so that the curve is settled in general positions (essentially, two different vertices are not over the same vertical). Then, the vertices are computed by means of resultants of the defining polynomial and its first partial derivatives, in combination with interval isolation of the real roots of the determined univariate polynomial. Next, one obtains the number of real branches of the curve passing through the vertices and connect them. We observe that this approach deeply depends on the manipulation of polynomials and hence the obtained representation in this example is very suitable. More precisely, using the algorithm described in [13] one gets the graph displayed in Fig. 5 (it should be noticed that the algorithm used returns the graph of a linear transformation of the given curve, mainly the one placing the curve in general position) which certifies the correctness of the plot in that figure.

Fig. 5
figure 5

Curve of genus 11 defined by \(E_{\textrm{rat}}\) in Example 5.3. Left: topological graph. Right: plot

5.3 Radical Trigonometric Parametrizations

In [42], the authors introduce the notion of radical parametrization, radical variety and tower variety. Essentially, a radical parametrization is a tuple of rational functions involving radicals, maybe nested, of polynomials. The radical variety is the Zariski closure of the image of the parametrization, seen as a function, and the tower variety is an algebraic variety constructed from the parameters and the radical elements included in the definition of the radical tower associated to the radical parametrization.

Now, let us assume that we are given a radical hybrid trigonometric parametrization \({\mathcal {P}}(\textbf{t})\), that is, a tuple of rational functions involving radicals, maybe nested, of polynomial expressions of sines, cosines (circular and/or hyperbolic) and monomial as described in Definition 2.1. We may ask for the implicit equation of the parametrization; that is, for the generators of the Zariski closure of \({\mathcal {P}}(\textrm{dom}({\mathcal {P}}))\). For this purpose, one may apply Algorithm 1 to the hybrid trigonometric radicands to achieve a radical (unirational) parametrization so that the results in [42] can be applied. Let us illustrate this idea by an example.

Example 5.4

We consider the parametrization

$$\begin{aligned} {\mathcal {P}}(u_1)=\left( \root 3 \of {1+\sqrt{1+\sin \left( u_{1} \right) }},\sqrt{\cos \left( u_{1} \right) +1} \right) .\end{aligned}$$

We want to compute the implicit equation of the Zariski closure of \({\mathcal {P}}(\textrm{dom}({\mathcal {P}}))\). For this purpose, we first apply Algorithm 1 to the the trigonometric radicands of \({\mathcal {P}}(u_1)\). We get

$$\begin{aligned} {\mathcal {R}}(u_1)=\left( \root 3 \of {1+\sqrt{\dfrac{u_{1}^{2}-1}{u_{1}^{2}+1}+1}}, \sqrt{1+\dfrac{2u_{1}}{u_{1}^{2}+1}} \right) . \end{aligned}$$

In this situation, following the steps in [42], we define the polynomials

$$\begin{aligned} \left\{ \begin{array}{ll} E_1:=\delta _{1}^{2}(u_{1}^{2}+1)-2 u_{1}^{2}, &{} \text {(}\delta _1\text { defines the radical} \sqrt{\frac{u_{1}^{2}-1}{u_{1}^{2}+1}+1} \text {)}, \\ E_2:=\delta _{2}^{3}-\delta _{1}-1, &{} \text {(}\delta _2\text { defines the radical }\root 3 \of {1+\delta _1}\text {)}, \\ E_3:=\delta _{3}^{2}(u_{1}^{2}+1)-u_{1}^{2}-2\,u_{1}-1, &{} \text {(} \delta _3 \text { defines the radical }\sqrt{1+\frac{2u_{1}}{u_{1}^{2}+1}}\text {)}, \\ E_4:=X-\delta _2, &{} \text {(}E_4 \text { defines the first component of }{\mathcal {R}}\text {)},\\ E_5:=Y-\delta _3, &{} \text {(}E_5 \text { defines the second component of }{\mathcal {R}}\text {)},\\ E_6:= W (u_{1}^2+1)-1, &{} \text {(}E_6\text { forces the denominators not to vanish )}. \end{array} \right. \end{aligned}$$

We consider the incidence variety

$$\begin{aligned} {\mathcal {B}}=\left\{ (u_1,\delta _1,\delta _2,\delta _3,X,Y,W)\in {\mathbb {C}}^7\, \text {s.t.} \, E_1=\cdots =E_6=0\right\} \end{aligned}$$

as well as the projection \(\pi :{\mathcal {B}}\rightarrow {\mathbb {C}}^2; (u_1,\delta _1,\delta _2,\delta _3,X,Y,W)\mapsto (X,Y)\). Then, \(\overline{\pi ({\mathcal {B}})}\) is the Zariski closure of \({\mathcal {P}}(\textrm{dom}({\mathcal {P}}))\). Using elimination theory techniques, as Gröbner bases, one gets the implicit equation of \({\mathcal {P}}(\textrm{dom}({\mathcal {P}}))\), namely,

$$\begin{aligned}{X}^{12}-4\,{X}^{9}+4\,{X}^{6}+{Y}^{4}-2\,{Y}^{2}.\end{aligned}$$

The genus of this curve is 3 and hence \({\mathcal {P}}(u_1)\) cannot be reparametrized into a rational parametrization.

5.4 Radical Trigonometric Differential Equations

In this subsection, we deal with ordinary differential equations (ode) of any order

$$\begin{aligned} F(x,y(x),\ldots ,y^{(n)}(x))=0, \end{aligned}$$
(5.6)

whose coefficients are rational expressions of radicals, maybe nested, of circular trigonometric functions; as for instance

$$\begin{aligned} \sqrt{\sin \! \left( x \right) +\cos \! \left( x \right) }+\frac{4 y \! \left( x \right) ^{2} \left( \sin \! \left( x \right) +\cos \! \left( x \right) \right) \left( \frac{d}{d x}y \! \left( x \right) \right) ^{2}}{\left( \cos \! \left( x \right) -\sin \! \left( x \right) \right) ^{2}} =0. \end{aligned}$$
(5.7)

Obviously, in the previous description, odes whose coefficients are rational expressions of circular trigonometric functions are considered to be included. The goal is to transform (5.6) into an ode

$$\begin{aligned} G(t,Y(t),\ldots ,Y^{(n)}(t))=0, \end{aligned}$$
(5.8)

whose coefficients are now rational expressions of radicals of rational functions. In this situation, the results in [6] can be applied to check whether (5.8) can be additionally transformed into an ode whose coefficients are rational functions. The final goal is to transform, if necessary, the given equation to reach a simpler one.

Let us consider a change of variable \(x=r(t)\) such that the derivative of r(t) is a rational function. Then, byFootnote 1 Lemma 3.1. in [6], one gets that if \(Y(t)=y(r(t))\) then, for \(i\in {\mathbb {N}}\), \(y^{(i)}(r(t))\) can be expressed as

$$\begin{aligned} y^{(i)}(r(t))=\sum _{k=0}^{i-1} a_k(t) Y^{(k)}(t), \end{aligned}$$

where \(a_k(t)\) are rational expressions of radicals of rational functions. In this situation, we apply the results developed in the previous theoretical sections as follows. We consider the change

$$\begin{aligned} \cos (x)=\dfrac{2t}{t^2+1},\,\,\sin (x)=\dfrac{t^2-1}{t^2+1} \end{aligned}$$
(5.9)

and hence, the change of variable

$$\begin{aligned} x=r(t):=\arctan \left( \dfrac{t^2-1}{2t}\right) . \end{aligned}$$
(5.10)

Since the derivative of r(t) is a rational function, the proposed change transforms an ode of the type (5.6) into an ode of the type (5.8). Furthermore, if Y(t) is a solution of (5.8), applying the results in the previous sections, we get that

$$\begin{aligned} Y\left( \dfrac{\cos (x)}{1-\sin (x)} \right) \end{aligned}$$
(5.11)

is a solution of (5.6). Let us illustrate the previous ideas by an example.

Example 5.5

Let us consider the differential equation (5.7). Applying the command dsolve of the computer algebra system Maple, one gets the solutions expressed as

$$\begin{aligned} y \! \left( x \right) = \pm \sqrt{\mp \left( \int \frac{\sqrt{2 \left( \sin \! \left( x \right) +\cos \! \left( x \right) \right) ^{\frac{3}{2}} \cos \! \left( x \right) \sin \! \left( x \right) -\left( \sin \! \left( x \right) +\cos \! \left( x \right) \right) ^{\frac{3}{2}}}}{\sin \! \left( x \right) +\cos \! \left( x \right) }d x \right) +c_{1}}, \end{aligned}$$

which is not very useful. On the contrary, we apply the transformation introduced in (5.9) and (5.10) we get the new differential equation

$$\begin{aligned} \left( t^{2}-2 t -1\right) ^{2} \sqrt{t^{2}+2 t -1}+Y \! \left( t \right) ^{2} \left( \frac{\hbox {d}}{\hbox {d} t}Y \! \left( t \right) \right) ^{2} \sqrt{\left( t^{2}+1\right) ^{7}} \left( t^{2}+2 t -1\right) =0\,\, , \end{aligned}$$

which has radical coefficients. Now, applying the dsolve Maple command one gets the solutions

$$\begin{aligned} Y \! \left( t \right) = \pm \frac{\sqrt{6}\, \sqrt{2 \,\textrm{i} \,\root 4 \of {t^{2}+1} \root 4 \of {\left( t^{2}+2 t -1\right) ^{3}}\mp c_{1} \,t^{2}+c_{1}}}{3 \sqrt{t^{2}+1}}\,\,\, . \end{aligned}$$

Now, using (5.11) we get the solutions of (5.7)

$$\begin{aligned} y(x)=\pm \frac{\sqrt{6}\, \sqrt{2 \,\textrm{i} \root 4 \of {\left( \sin \! \left( x \right) +\cos \! \left( x \right) \right) ^{3}}+c_{1}}}{3}\,\,\, , \end{aligned}$$
$$\begin{aligned} y(x)=\pm \frac{\textrm{i}}{3} \sqrt{6}\, \sqrt{2 \,\textrm{i} \root 4 \of {\left( \sin \! \left( x \right) +\cos \! \left( x \right) \right) ^{3}} -c_{1}}\,\,\, . \end{aligned}$$

Remark 5.6

  1. 1.

    A similar treatment can be applied if, in equation (5.6), instead of circular trigonometric functions one has hyperbolic trigonometric functions. In this case, (5.9) and (5.10) are replaced by

    $$\begin{aligned}\cosh (x)=\dfrac{t^2+1}{2t},\sinh (x)=\dfrac{t^2-1}{2t}, \,\, x=r(t):=\textrm{arctanh}\left( \dfrac{t^2-1}{t^2+1}\right) .\end{aligned}$$

    Observe that the derivative of r(t) is a rational function.

  2. 2.

    The analogous treatment can be performed to partial differential equations. Similarly to systems of either odes or pdes.

5.5 Generalized Ricatti Differential Equation

In the work [26], the extended generalized Riccati Equation Mapping Method is applied to the (1+1)-Dimensional Modified KdV Equation

$$\begin{aligned} u_t-u^2u_x+\delta u_{xxx}=0, \end{aligned}$$
(5.12)

for some fixed \(\delta >0\). More precisely, solutions of the generalized Riccati equation, namely

$$\begin{aligned} G'=r+pG+qG^2, \end{aligned}$$
(5.13)

are used in order to provide solutions of (5.12). The authors arrive at different families of solutions, classified into soliton and soliton-like solutions (written in terms of rational functions of hyperbolic ones), and periodic solutions (written as rational functions of trigonometric ones), under different cases of the parameters involved.

In the following, we see how taking the particular solutions of (5.13) provided in [26] and using the ideas of this paper, we can generate all families of solutions in [26]. More precisely, using the notation in [26], we take the solution of (5.13)

$$\begin{aligned} G_1(\eta )= -\dfrac{1}{2q} \left( p+\delta \tanh \left( \dfrac{\delta }{2}\eta \right) \right) ,\end{aligned}$$

where \(\delta =\sqrt{{p}^{2}-4\,qr}\). Therefore,

$$\begin{aligned}{\mathcal {P}}(\eta )=(G_1(\eta ),G_{1}^{\,\prime }(\eta )).\end{aligned}$$

is a parametrization of the algebraic variety \({\mathcal {V}}\) associated with (5.13), namely the conic \(y=r+px+qx^2\) (see [12]). Since we do not know whether \(\delta \) is a rational number, \({\mathcal {P}}(\eta )\) may not satisfy the conditions in Definition 2.1. However, the reparametrization

$$\begin{aligned}{\mathcal {T}}(\eta )={\mathcal {P}}\left( \frac{2}{\delta } \eta \right) \end{aligned}$$

does, and it is a hyperbolic parametrization of \({\mathcal {V}}\). Algorithm 1 provides a rational parametrization of the variety, given by

$$\begin{aligned} \left( -{\frac{1}{2q} \left( p+{\frac{\delta \, \left( {\eta }^{2}-1 \right) }{{\eta }^{2}+1}} \right) },-{\frac{{\delta }^{2}{\eta }^{2}}{q \left( {\eta }^{2}+1 \right) ^{2}}}\right) , \end{aligned}$$

that can be properly reparametrized as

$$\begin{aligned} {\mathcal {G}}(\eta ):=(g_1(\eta ),g_2(\eta ))=\left( -{\frac{\delta \,\eta +\eta \,p-\delta +p}{2q \left( \eta +1 \right) }},-{\frac{{\delta }^{2}\eta }{q \left( \eta +1 \right) ^{2}}}\right) . \end{aligned}$$

The previous parametrization is no longer a solution of (5.13), so we search for a function \(t\mapsto \phi (t)\) such that \({\mathcal {G}}(\phi (t))\) provides a solution of (5.13). We ask the derivative of \(g_1(\phi (t))\) with respect to t to coincide with \(g_2(\phi (t))\) to obtain a differential condition on \(\phi \). Namely,

$$\begin{aligned} -\delta \phi (t)+\phi (t)'=0,\end{aligned}$$

with general solution

$$\begin{aligned}\phi (t)= C \textrm{e}^{\delta t}.\end{aligned}$$

So, we get the general solution

$$\begin{aligned}S(\eta ,C)=-{\frac{\delta \,C\,{\textrm{e}^{\delta \,\eta }}+C \,{\textrm{e}^{\delta \,\eta }}p-\delta +p}{2q \left( C\,{\textrm{e}^{ \delta \,\eta }}+1 \right) }}\end{aligned}$$

of the generalized Riccati equation. Now, from \(S(\eta ,C)\) one may obtain the families of solutions in [26]. For instance, using the notation in [26], \(S(\eta ,1)=G_1(\eta )\), \(S(\eta ,-1)=G_2(\eta )\), \(S(\eta ,\pm i)=G_3(\eta )\), \(S(\eta ,\mp 1)=G_4(\eta )\), etc.

We observe that if one proceeds analogously replacing the rational parametrization by the hyperbolic parametrization \({\mathcal {T}}(\eta )=(h_1(\eta ),h_2(\eta ))\), the procedure does not succeed. More precisely, we consider an unknown function \(\psi (t)\) and search for all such functions which satisfy \(h_2(\psi (t))=\frac{\hbox {d}}{\hbox {d}t}(h_1(\psi (t))).\) We only get \(\psi (t)=t+C\), for C being an arbitrary constant.

6 Conclusions

We have introduced a new type of parametrizations, namely those involving rationally circular and hyperbolic trigonometric functions and monomials being each of these three block depending of different sets of parameters. We have seen that the algebraic varieties defined by these new objects are precisely the real unirational varieties. In addition, we provide algorithms to deal with the computation of the generators of the variety, and to convert from trigonometric to unirational and vice versa. We have also illustrated by means of examples that having the option of parametrizing in these two different ways is an advantage for dealing with some applications; for some a rational parametrization is better, for others a trigonometric parametrization is more suitable.