## 1 Introduction

We study orthogonal polynomials of two variables with respect to an inner product defined on a planar cubic curve. This is a continuation of recent work by the last two authors that studies orthogonal polynomials on simple one-dimensional geometries embedded in two-dimensional space, including wedges [15] and quadratic curves [17], as well as higher-dimensional cases constructed via surfaces of revolution [16, 22, 23].

It is assumed the cubic curve $${\gamma }$$ is of the standard form $$y^2 = \phi (x)$$, where $$\phi$$ is a cubic polynomial of one variable. We consider polynomials that are orthogonal with respect to the inner product

\begin{aligned} {\langle }f, g {\rangle }_{\gamma }= \int _{\varOmega _{\gamma }} f(x,y) g(x,y) w(x) \mathrm {d}\sigma (x,y), \end{aligned}

where $$\varOmega _{\gamma }$$ is the set on which the cubic curve $${\gamma }$$ is defined and w is an appropriate weight function, and the inner product is well defined on the space $${{\mathbb {R}}}[x,y]/{\langle }y^2 - \phi (x){\rangle }$$. These orthogonal polynomials are algebraic polynomials of two variables restricted to $${\gamma }$$ and their structure is determined by the characteristics of the curve. In particular, the dimension of the space of the orthogonal polynomials of degree n is 3 for all $$n \ge 3$$, so that it does not increase with n, as with orthogonal polynomials of two variables on either an algebraic surface or on a domain with non-empty interior [4].

Our main result shows that the orthogonal structure on the cubic curve can be understood, by making use of symmetry, through a mixture of two univariate orthogonal systems. To wit, we are able to construct orthogonal polynomials on the curve explicitly in terms of univariate orthogonal polynomials. Moreover, this structural connection propagates to quadrature rules and polynomial interpolation based on the roots of the orthogonal polynomials. Hence, we have developed a toolbox for the computational and analytical study of functions on cubic curves. We provide two applications to showcase the usage of our results. The first is the approximation of functions with cubic singularities. We compare the results to Hermite–Padé approximation, a common technique for approximating functions with singularities, demonstrating that our approximation converges faster and is more robust to degeneracies. The second application is differential equations, which demonstrates the effectiveness of a spectral collocation method, based on our toolbox, for solving differential equations with singular solutions. The examples include the computation of an elliptic integral that can be expressed in terms of the Legendre’s incomplete integral of the first kind.

The paper is organized as follows. The orthogonal structure on the cubic curve is established in the next section, where we clarify the families of cubic curves that we consider, which leads to several distinguished cases, and show how orthogonal polynomials can be constructed explicitly in terms of univariate orthogonal polynomials; the section also contains several families of examples. In the third section we consider quadrature rules on the cubic curve as well as polynomial interpolation based on the nodes of the quadrature rules, both from a theoretical and a computational perspective. The applications are discussed in the fourth section and the final section is on possible future work.

## 2 Orthogonal Polynomials on Cubic Curves

### 2.1 Cubic Curves

Throughout this paper we let $$\phi$$ be a cubic polynomial defined by

\begin{aligned} \phi (x) = a_0 x^3 + a_1 x^2 + a_2 x + a_3, \quad a_i \in {{\mathbb {R}}}, \quad a_0 \ne 0. \end{aligned}
(1)

We consider the cubic curve $${\gamma }$$ on the plane defined by the standard form

\begin{aligned} y^2 = \phi (x), \quad (x,y) \in {{\mathbb {R}}}^2, \end{aligned}

since all irreducible bivariate cubics can be transformedFootnote 1 into this form [1, 2]. We let $${\gamma }= \{(x,y): y^2 = \phi (x)\}$$ be the graph of the curve. Without loss of generality, we assume that $$a_0>0$$, so that $$\phi (x) > 0$$ for sufficiently large $$x > 0$$. Let

\begin{aligned} \varOmega _{\gamma }:= \{x: \phi (x) > 0\}, \end{aligned}

which is the set on which the cubic curve is defined. The cubic polynomial $$\phi$$ can have either one real zero or three real zeros, so that $$\varOmega _{\gamma }$$ can be either one interval or the union of two intervals. This leads to three possibilities:

1. (I)

$$\varOmega _{\gamma }= (A,\infty )$$: the curve has one component;

2. (II)

$$\varOmega _{\gamma }= (A_1, B_1) \cup (A_2, \infty )$$ with $$A_1< B_1 < A_2$$: the curve has two disjoint components;

3. (III)

$$\varOmega _{\gamma }= (A,B) \cup (B,\infty )$$: the curve has two touching components.

In the first case, $$\phi$$ has one real zero A. In the second case, $$\phi$$ has three real zeros $$A_1< B_1 < A_2$$. In the third case, $$\phi$$ has a real zero at A and a double zero at B. For examples, see Figs. 1 and 2 below.

One important family of cubic curves included in our definition is that of elliptic curves[10]. An elliptic curve is a plane curve defined by

\begin{aligned} y^2 = x^3 + a x + b, \end{aligned}
(2)

where a and b are real numbers and the curve has no cusps, self-intersections, or isolated points. This holds if and only if the discriminant

\begin{aligned} \varDelta _E = -16(4a^{3}+27b^{2}) \end{aligned}

is not equal to zero. The graph has two components if $$\varDelta _E > 0$$ and one component if $$\varDelta _E < 0$$. Two elliptic curves are depicted in Fig.  1, the left-hand one has one component, whereas the right-hand one has two components.

We can write the elliptic curve in a different form. Let $$\phi (x) = x^3 + a x + b$$. By the definition, $$\phi (A) = 0$$ or $$b = - A^3 - a A$$, so that

\begin{aligned} \phi (x) = x^3 + a x - A^3 - a A = (x-A) (x^2 + A x +A^2+a). \end{aligned}

We need $$x^2 + A x + A^2 + a \ge 0$$ for $$x \ge A$$, which holds only if its discriminant $$A^2- 4 (A^2+a) < 0$$ or $$a > - (3/4)A^2$$. Under this condition, we have

\begin{aligned} 4 a^3 + 27 b^2 = 4 a^3 + 27 A^2 (A^2+a)^2 > - 4 \frac{3^3}{4^3} A^6 +27 A^2 \left( \frac{A^2}{4}\right) ^2 = 0, \end{aligned}

so that the elliptic curve does indeed have one component. Thus, setting $$c = a + \frac{3}{4}A^2$$ and $$b = - A^3 - a A$$ we see that the elliptic curve (2) becomes

\begin{aligned} y^2 = (x-A) \left( \left( x+\tfrac{A}{2}\right) ^2 + c\right) , \quad A\in {{\mathbb {R}}}. \end{aligned}
(3)

If $$c > 0$$, then $$\phi (x) = (x-A) (x+\frac{A}{2})^2 + c$$ has one real zero, so that the elliptic curve has one component. If $$c < 0$$, then the curve has two components. One of the advantages of writing the curve in the form (3) is that the roots of $$\phi$$ are explicitly given.

With a linear change of variables, the standard form of the cubic curve (1) can be transformed to one of the form (2), which will be an elliptic curve if the cubic (1) has no cusps, self-intersections or isolated points [20]. The orthogonal polynomial basis we provide in the next subsection is valid for standard-form cubics and elliptic curves. Hence we also consider cubic curves that are not elliptic to illustrate that our basis can handle cusps and self-intersections, which may be significant in applications. As examples of cubic curves that are not elliptic, we can have curves of the form $$y^2 = a (x^3 - b x^2)$$, which will self-intersect when $$b>0$$ and will be treated as two components that touch at one point. One example of such curves is depicted in Fig. 2.

As an example of the third case, that of closed cubic curves, we mention tear drop curves defined by

\begin{aligned} (2a)^2 y^2 = (x-a)^2 (x+a), \quad -a< x < a. \end{aligned}

For $$a=1$$, this curve is inside the unit circle and is depicted in Fig. 2.

Our definition also includes the curve $$y^2 = x^3$$, which is the case of $$a= b = 0$$ in (2), but the curve has a singular point and is not an elliptic curve.

### 2.2 Orthogonal Polynomials on Cubic Curves

Let $$y^2=\phi (x)$$ be a cubic curve and let w be a non-negative weight function defined on $$\varOmega _{\gamma }$$. We consider orthogonal polynomials in (xy) that are restricted to the cubic curve, which are orthogonal with respect to an inner product defined, on an appropriate polynomial subspace, by

\begin{aligned} {\langle }f,g{\rangle }_{{\gamma },w} = \int _{{\gamma }} f(x,y) g(x,y) w(x) \mathrm {d}\sigma (x,y), \end{aligned}
(4)

where $$\mathrm {d}\sigma$$ is the arc length measure on the curve. Depending on the support set of w, the integral domain could be compact in the cases I and II.

The bilinear form $${\langle }\cdot ,\cdot {\rangle }_{{\gamma },w}$$ defines an inner product on the space $${{\mathbb {R}}}[x,y] / {\langle }y^2 - \phi (x){\rangle }$$. For $$n\ge 3$$, the monomials of degree exactly n, $$x^k y^{n-k}$$ for $$0 \le k \le n$$, remain of degree n modulo the ideal generated by the relation $$y^2 - \phi (x) = 0$$ only when $$k =0,1,2$$ since the relation can be expressed as $$x^3 = \psi (x,y)$$ with $$\psi$$ being a polynomial of degree 2. In particular, this shows that $${{\mathscr {B}}}_n = \{y^n, x y ^{n-1}, x^2 y^{n-2}\}$$ is a basis of the space of polynomials of degree exactly n in $${{\mathbb {R}}}[x,y] / {\langle }y^2 - \phi (x){\rangle }$$.

Let $${{\mathscr {V}}}_n:={{\mathscr {V}}}_n({\gamma },w)$$ be the space of orthogonal polynomials of degree n in two variables with respect to this inner product. Applying the Gram–Schmidt process to the basis $${{\mathscr {B}}}_n$$, for example, inductively on n, we obtain the following proposition:

### Proposition 1

For $$n \in {{\mathbb {N}}}_0$$, we have $$\dim {{\mathscr {V}}}_0 =1$$, $$\dim {{\mathscr {V}}}_1 =2$$ and

\begin{aligned} \dim {{\mathscr {V}}}_n =3, \quad n \ge 2. \end{aligned}

Let $$p_n(w)$$ be a family of univariate orthogonal polynomials with respect to the standard inner product on $$\varOmega _{\gamma }$$,

\begin{aligned} {\langle }f,g {\rangle }_{w} = \int _{\varOmega _{\gamma }} f\left( x \right) g\left( x \right) w(x) \mathrm {d}x. \end{aligned}
(5)

In particular, $$p_n(\phi w)$$ denotes orthogonal polynomials with respect to $$\phi (x) w(x)$$ on $$\varOmega _{\gamma }$$. A basis for $${{\mathscr {V}}}_n$$ can be given explicitly in terms of orthogonal polynomials with respect to w and $$\phi w$$. For simplicity we redefine the weight in (4) such that the arclength measure $$w(x)\sqrt{1 + (y')^2}\mathrm {d}x$$ becomes $$w(x)\mathrm {d}x$$, then the inner product (4) is

\begin{aligned} {\langle }f,g {\rangle }_{{\gamma },w}&= \int _{\varOmega _{\gamma }} \left[ f\left( x, \sqrt{\phi (x)} \right) g\left( x, \sqrt{\phi (x)} \right) \right. \nonumber \\&\quad \left. + f\left( x, - \sqrt{\phi (x)} \right) g\left( x, -\sqrt{\phi (x)} \right) \right] w(x) \mathrm {d}x. \end{aligned}
(6)

More precisely, the domain $$\varOmega _{\gamma }$$ in the integral should be replaced by $$\mathrm {supp}(w) \subset \varOmega _{\gamma }$$, where $$\mathrm {supp}(w)$$ denotes the support set of w. For example, in case I, we could choose w so that it has support set [AB] for some $$B \in {{\mathbb {R}}}$$.

We now define an explicit basis for the space $${{\mathscr {V}}}_n(w)$$ of orthogonal polynomials on the cubic curve $${\gamma }$$. We denote this basis by $$Y_{n,i}$$ and denote its squared norm by $$H_{n,i}$$. The squared norm of $$p_n(w;x)$$ is denoted by $$h_n(w) = {\langle }p_n, p_n {\rangle }_{w}$$.

### Theorem 1

Let $${\gamma }$$ be a cubic curve and let w be a weight function defined on $$\varOmega _{\gamma }$$.

1. 1.

For $$n =0$$ and $$n=1$$, we define

\begin{aligned} Y_0(x,y) =1, \quad Y_{1,1}(x,y) = p_1(w;x), \quad Y_{1,2}(x,y)=y. \end{aligned}

Then $${{\mathscr {V}}}_0 = \mathrm {span} \{Y_0\}$$ and $${{\mathscr {V}}}_1 = \mathrm {span} \{Y_{1,1}, Y_{1,2}\}$$. Moreover,

\begin{aligned} H_0 = 2 h_0(w), \quad H_{1,1} = 2 h_1(w), \quad H_{1,2} = 2 h_0(\phi w). \end{aligned}
2. 2.

For $$m \in {{\mathbb {N}}}_0$$ and $$m \ge 1$$, we define

\begin{aligned} Y_{2m,1}(x,y)&= p_{3m}(w;x), \\ Y_{2m,2}(x,y)&= p_{3m-1}(w;x), \\ Y_{2m,3}(x,y)&= y p_{3m-2}(\phi w; x), \end{aligned}

and

\begin{aligned} Y_{2m+1,1}(x,y)&= p_{3m+1}(w;x), \\ Y_{2m+1,2}(x,y)&= y p_{3m}(\phi w;x), \\ Y_{2m+1,3}(x,y)&= y p_{3m-1}(\phi w; x). \end{aligned}

Then $$Y_{n,i}$$ is a polynomial of degree n in $${{\mathbb {R}}}[x,y] / {\langle }y^2 - \phi (x){\rangle }$$ for $$i=1,2,3$$ and

\begin{aligned} {{\mathscr {V}}}_n = \mathrm {span} \{Y_{n,1}, Y_{n,2}, Y_{n,3} \}, \quad n \ge 2. \end{aligned}

Moreover, the norms of these polynomials are given by

\begin{aligned} H_{2m,1}&= 2 h_{3m}(w), \quad H_{2m,2} = 2 h_{3m-1}(w), \quad H_{2m,3} = 2 h_{3m-2}(\phi w),\\ H_{2m+1,1}&= 2 h_{3m+1}(w), \quad H_{2m+1,2} = 2 h_{3m}(\phi w), \quad H_{2m+1,3} = 2 h_{3m-1}(\phi w). \end{aligned}

### Proof

For $$n \ge 2$$, we first show that $$Y_{n,i}$$ is of degree n in $${{\mathbb {R}}}[x,y] / {\langle }y^2 - \phi (x){\rangle }$$. Throughout this proof, we introduce a function $$\psi (x,y)$$ so that the equation of the cubic curve becomes

\begin{aligned} \psi (x,y) = x^3, \quad \psi (x,y) = a_0^{-1}( y^2 - a_1 x^2-a_2 x - a_3). \end{aligned}

Now, for $$n =2m$$, we write

\begin{aligned} p_{3m}(w;x)&= \sum _{k=0}^{3m} b_k x^k = b_0 + b_1 x + \sum _{j=1}^{m} b_{3j-1} x^{3j-1} + \sum _{j=1}^{m} b_{3j} x^{3j} \\&\quad + \sum _{j=1}^{m-1} b_{3j+1} x^{3j+1} \\&= b_0 + b_1 x + \sum _{j=1}^{m} b_{3j-1} (\psi (x,y))^{j-1}x^2 + \sum _{j=1}^{m} b_{3j} (\psi (x,y))^j \\&\quad + \sum _{j=1}^{m-1} b_{3j+1} x (\psi (x,y))^j, \end{aligned}

which is a polynomial of degree 2m in xy variables. The same argument also shows that $$p_{3m-1}(w;x)$$ is a polynomial of degree 2m in $${{\mathbb {R}}}[x,y] / {\langle }y^2 - \phi (x){\rangle }$$. Furthermore, it follows that $$p_{3m-2}(w;x)$$ is a polynomial of degree $$2m-1$$ in $${{\mathbb {R}}}[x,y] / {\langle }y^2 - \phi (x){\rangle }$$, which shows that $$Y_{2m,3}$$ is a polynomial of degree 2m mod $${\langle }y^2 - \phi (x){\rangle }$$. A similar argument works for $$Y_{2m+1,i}$$.

We now verify orthogonality. The $$Y_{n,i}$$ are of two forms: either $$Y_{n,i}(x,y) = f(x)$$ or $$Y_{n,i}(x,y) = yg(x)$$. Due to symmetry in the expression of $${\langle }\cdot ,\cdot {\rangle }_{{\gamma },w}$$ in (6),

\begin{aligned} {\langle }f(x), y g(x) {\rangle }_{{\gamma },w} = 0. \end{aligned}
(7)

This establishes orthogonality between all $$Y_{n,i}$$ of the form f(x) and those of the form yg(x). To prove orthogonality between the remaining $$Y_{n,i}$$ (those that are both of the form f(x) and those that are both of the form yf(x)), we relate the bivariate inner product on $${\gamma }$$ to the univariate inner product on $$\varOmega _{\gamma }$$ in both cases: observe that

\begin{aligned} {\langle }f(x), g(x) {\rangle }_{{\gamma },w} = 2{\langle }f(x), g(x) {\rangle }_{w}, \end{aligned}
(8)

and

\begin{aligned} {\langle }yf(x), yg(x) {\rangle }_{{\gamma },w} = 2{\langle }y^2f(x), g(x) {\rangle }_{w}= 2{\langle }\phi f(x), g(x) {\rangle }_{w} = 2{\langle }f(x), g(x) {\rangle }_{\phi w}. \end{aligned}
(9)

Thus, the orthogonality between the remaining $$Y_{n,i}$$ follow from the orthogonality of the $$p_n(w)$$ and $$p_n(\phi w)$$. Hence we have showed that the $$Y_{n,i}$$ form a basis for $${{\mathscr {V}}}_n$$, $$n \ge 0$$. It follows from the last two equations that if $$Y_{n,i} = p_k(w)$$, then $$H_{n,i} = {\langle }Y_{n,i}, Y_{n,i} {\rangle }_{{\gamma },w}= 2{\langle }p_k(w), p_k(w) {\rangle }_{w} = 2h_{k}(w)$$. If $$Y_{n,i} = yp_k(\phi w)$$, then $$H_{n,i} = 2{\langle }p_k(\phi w), p_k(\phi w) {\rangle }_{\phi w} = 2h_{k}(\phi w)$$. $$\square$$

### 2.3 Fourier Orthogonal Series

For w defined on $${{\mathbb {R}}}$$, the Fourier orthogonal series in terms of orthogonal polynomials $$\{p_n(w)\}$$ is defined by

\begin{aligned} f = \sum _{n=0}^\infty \widehat{f}_n(w) p_n(w), \quad p_n(w) = \frac{1}{h_n(w)} \int _{{\mathbb {R}}}f(t) p_n(w;t) w(t) \mathrm {d}t, \end{aligned}

where the identity holds in $$L^2(w)$$ as long as polynomials are dense in $$L^2(w)$$, which we assume to be the case. Furthermore, let $$s_n(w;f)$$ denote the n-th orthogonal partial sum of this expansion; that is,

\begin{aligned} s_n(w;f) = \sum _{k=0}^n \widehat{f}_k(w) p_k(w), \quad n =1,2,\ldots . \end{aligned}

Likewise, let $${\gamma }$$ be a cubic curve and w be a weight function defined on $${\gamma }$$, we define the Fourier orthogonal series of $$f\in L^2({\gamma }, w)$$ by

\begin{aligned} f = \widehat{f}_0 Y_0 + \widehat{f}_{1,1}Y_{1,1} + \widehat{f}_{1,2}Y_{1,2} + \sum _{n=2}^\infty \sum _{i=1}^3 \widehat{f}_{n,i} Y_{n,i}, \quad \hbox {with} \quad \widehat{f}_{n,i} =\frac{ {\langle }f, Y_{n,i}{\rangle }_{{\gamma },w}}{H_{n,i}(w)}, \end{aligned}

The n-th partial sum of this expansion is denoted by $$S_n(w;f)$$; that is

\begin{aligned} S_n(w; f) = \widehat{f}_0 Y_0 + \widehat{f}_{1,1}Y_{1,1} + \widehat{f}_{1,2}Y_{1,2} + \sum _{k=2}^n \sum _{i=1}^3 \widehat{f}_{k,i} Y_{k,i}. \end{aligned}

The next theorem shows that this partial sum can be written in terms of the partial sums of orthogonal series with respect to w and $$\phi w$$. Let $$\Vert \cdot \Vert _w$$ denote the norm of $$L^2({\gamma },w)$$.

### Theorem 2

Let $${\gamma }$$ be a cubic curve and let w be a weight function defined on $$\varOmega _{\gamma }$$. For $$f \in L^2({\gamma },w)$$, define

\begin{aligned} \begin{aligned} f_e(x)&:= \frac{f\left( x, \sqrt{\phi (x)}\right) + f\left( x, - \sqrt{\phi (x)}\right) }{2}, \\ f_o(x)&:= \frac{f\left( x, \sqrt{\phi (x)}\right) - f\left( x, - \sqrt{\phi (x)}\right) }{2 \sqrt{\phi (x)}} \end{aligned} \end{aligned}
(10)

for $$x \in \varOmega _{\gamma }$$. Then

\begin{aligned} \begin{aligned} S_{2m} (w; f, x, y)&= s_{3m} (w; f_e, x) + y s_{3m-2} (\phi w; f_o, x), \quad (x,y) \in {\gamma }, \\ S_{2m+1} (w; f, x, y)&= s_{3m+1} (w; f_e, x) + y s_{3m} (\phi w; f_o, x), \quad (x,y) \in {\gamma }. \end{aligned} \end{aligned}

Furthermore, the $$L^2({\gamma },w)$$ norm of $$S_n(w;f)$$ satisfies

\begin{aligned} \begin{aligned} \left\| S_{2m}(w; f)\right\| _{{\gamma },w}^2&= 2 \Vert s_{3m} (w; f_e) \Vert _{w}^2 +2 \Vert s_{3m-2} (\phi w; f_o)\Vert _{\phi w}^2, \\ \Vert S_{2m+1}(w; f)\Vert _{{\gamma },w}^2&= 2 \Vert s_{3m+1} (w; f_e) \Vert _{w}^2 +2 \Vert s_{3m} (\phi w; f_o)\Vert _{\phi w}^2. \end{aligned} \end{aligned}
(11)

### Proof

It follows from the definitions of $$f_e$$ and $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ that

\begin{aligned} {\langle }f, Y_{2m,1} {\rangle }_{{\gamma },w} = 2{\langle }f_e, p_{3m}(w) {\rangle }_{w}, \end{aligned}

Since $$H_{2m,1} = 2h_{3m}(w)$$, we obtain $$\widehat{f}_{2m,1} = \{\widehat{f}_e\}_{3m}(w)$$. The same argument shows also that $$\widehat{f}_{2m,2} = \{\widehat{f}_e\}_{3m-1}(w)$$, $$\widehat{f}_{2m+1,1} = \{\widehat{f}_e\}_{3m+1}(w)$$, $$\widehat{f}_0 = \{\widehat{f}_e\}_0(w)$$ and $$\widehat{f}_{1,1} = \{\widehat{f}_e\}_1(w)$$. Furthermore, from the definitions of $$f_o$$ and $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ we have

\begin{aligned} {\langle }f, Y_{2m,3} {\rangle }_{{\gamma },w} = 2{\langle }f_o, p_{3m-2}(\phi w) {\rangle }_{\phi w}, \end{aligned}

so that $$\widehat{f}_{2m,3} = \{\widehat{f}_o\}_{3m-2}(\phi w)$$. The same argument also shows that $$\widehat{f}_{2m+1,2} = \{\widehat{f}_o\}_{3m}(\phi w)$$, $$\widehat{f}_{2m+1,3} = \{\widehat{f}_o\}_{3m-1}(\phi w)$$ and $$\widehat{f}_{1,2} = \{\widehat{f}_o\}_{0}(\phi w)$$.

Setting $$F_k(x) = \{\widehat{f}_e\}_k(w) p_k(w;x)$$ and $$G_k(x) = \{\widehat{f}_o\}_k(\phi w) p_k(\phi w;x)$$, we can write the partial sum with $$n = 2m$$ as

\begin{aligned} S_{2m}(w; f)(x,y)&= F_0(x) + F_1(x) + y G_0(x) \\&\quad + \sum _{k=1}^{m} \left[ G_{3k+1}(x) +F_{3k-1}(x) + y G_{3k-2} (x) \right] \\&\quad + y \sum _{k=1}^{m-1} \left[ F_{3k+1}(x) + y G_{3k}(x) + y G_{3k-1} (x) \right] \\&= \sum _{k=0}^{3m+1} F_k (x) + y \sum _{k=0}^{3m-2} G_k(x) = s_{3m} (w; f_e, x) + y s_{3m-2} (w; f_o, x). \end{aligned}

A similar proof works for $$S_{2m+1}(w;f)$$. By (7) and the Parseval identity, we see that

\begin{aligned} \Vert S_{2m}(w;f)\Vert _w^2&= \Vert s_{3m} (w; f_e, x) \Vert _{{\gamma },w}^2 + \Vert y s_{3m-2} (\phi w; f_o, x)\Vert _{{\gamma },w}^2 \\&= 2\Vert s_{3m} (w; f_e) \Vert _{w}^2 + 2\Vert s_{3m-2} (\phi w; f_o)\Vert _{\phi w}^2, \end{aligned}

where the second identity follows since $$|s_{3m} (w; f_e, x)|^2$$ does not contain y, whereas $$|y s_{3m} (\phi w; f_o, x)|^2$$ contains a $$y^2$$, which is equal to $$\phi (x)$$. The proof for the norm of $$S_{2m+1}(w;f)$$ is similar. This completes the proof. $$\square$$

### Corollary 1

Let $${\gamma }$$ be a cubic curve and let w be a weight function defined on $$\varOmega _{\gamma }$$. Let $$f \in L^2({\gamma },w)$$. Then $$S_n(w; f)$$ converges to f in $$L^2({\gamma },w)$$.

### Proof

For $$f\in L^2({\gamma },w)$$, it follows from (6) and $$|a+b|^2 \le 2 (|a|^2+|b|^2)$$ that

\begin{aligned} \Vert f_e\Vert _w^2 \le \frac{1}{2} \int _{\varOmega _{\gamma }} \left[ |f\big (x,\sqrt{\phi (x)} \big )|^2 + |f\big (x,- \sqrt{\phi (x)} \big )|^2\right] w(x)\mathrm {d}x = \frac{1}{2} \Vert f\Vert _{{\gamma },w}^2 \end{aligned}

and similarly $$\Vert f_o\Vert _{\phi w}^2 \le \frac{1}{2} \Vert f\Vert _{{\gamma },w}^2$$. Hence, $$f_e \in L^2(w)$$ and $$f_o \in L^2(\phi w)$$. It follows that $$s_n(w; f_e)$$ converges to $$f_e$$ in $$L^2(w)$$ and $$s_n(w; f_o)$$ converges to $$f_o$$ in $$L^2(\phi w)$$. Consequently, the convergence of $$S_n(w; f)$$ in $$L^2({\gamma },w)$$ follows from (11). $$\square$$

### 2.4 Jacobi Operators

Let $$\widehat{Y}_{n,i} = Y_{n,i}/\sqrt{H_{n,i}}$$. Then $$\{\widehat{Y}_{n,i}\}$$ is an orthonormal basis of $${{\mathscr {V}}}_n$$. Define

\begin{aligned} {\widehat{\mathbb {Y}}}_0 =\left[ \widehat{Y}_0\right] , \quad {\widehat{\mathbb {Y}}}_1 = \left[ \begin{array}{c} \widehat{Y}_{1,1} \\ \widehat{Y}_{1,2} \end{array} \right] \quad \hbox {and}\quad {\widehat{\mathbb {Y}}}_n = \left[ \begin{array}{c} \widehat{Y}_{n,1}\\ \widehat{Y}_{n,2} \\ \widehat{Y}_{n,3} \end{array} \right] , \quad n \ge 2. \end{aligned}

The general theorem of orthogonal polynomials of several variables shows that

\begin{aligned} x \widehat{{\mathbb {Y}}}_n&= A_{n,1} \widehat{{\mathbb {Y}}}_{n+1} + B_{n,1} \widehat{{\mathbb {Y}}}_n + A_{n-1,1}^t \widehat{{{\mathbb {Y}}}}_{n-1}, \end{aligned}
(12)
\begin{aligned} y \widehat{{{\mathbb {Y}}}}_n&= A_{n,2} \widehat{{{\mathbb {Y}}}}_{n+1} + B_{n,2} \widehat{{{\mathbb {Y}}}}_n + A_{n-1,2}^t \widehat{{{\mathbb {Y}}}}_{n-1}, \end{aligned}
(13)

where $$A_{0,i}$$ are $$1\times 2$$ matrices and $$B_{0,i}$$ is a real number; $$A_{1,i}$$ are $$2\times 3$$ matrices and $$B_{1,i}$$ are $$2\times 2$$ matrices; $$A_{n,i}$$ and $$B_{n,i}$$ are $$3\times 3$$ matrices for all $$n \ge 2$$. The matrices $$A_{n,i}$$ and $$B_{n,i}$$ are determined by orthogonality relations:

\begin{aligned} A_{n,1}= & {} {\langle }x \widehat{{\mathbb {Y}}}_n \widehat{{\mathbb {Y}}}_{n+1}^t {\rangle }_{{\gamma },w}, \, A_{n,2} = {\langle }y \widehat{{\mathbb {Y}}}_n \widehat{{\mathbb {Y}}}_{n+1}^t {\rangle }_{{\gamma },w}, \, B_{n,1} = {\langle }x \widehat{{\mathbb {Y}}}_n \widehat{{\mathbb {Y}}}_{n}^t {\rangle }_{{\gamma },w}, \, \\ B_{n,2}= & {} {\langle }y \widehat{{\mathbb {Y}}}_n \widehat{{\mathbb {Y}}}_{n}^t {\rangle }_{{\gamma },w}. \end{aligned}

In particular, by (7), (8) and (9) it is easy to see that these matrices are of the form

\begin{aligned} A_{1,1}&= \left[ \begin{matrix} 0 &{} *&{} 0 \\ 0 &{} 0 &{} *\end{matrix}\right] , \quad A_{2m,1} = \left[ \begin{matrix} *&{} 0 &{} 0 \\ 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} *\end{matrix}\right] \quad \hbox {and}\quad A_{2m+1,1} = \left[ \begin{matrix} 0 &{} *&{} 0 \\ 0 &{} 0 &{} *\\ 0 &{} 0 &{} 0 \end{matrix}\right] ,\quad m \ge 1 \\ B_{1,1}&= \left[ \begin{matrix} *&{} 0 \\ 0 &{} *\end{matrix}\right] , \quad B_{2m,1} = \left[ \begin{matrix} *&{} *&{} 0 \\ *&{} *&{} 0 \\ 0 &{} 0 &{} *\end{matrix}\right] \quad \hbox {and}\quad B_{2m+1,1} = \left[ \begin{matrix} *&{} 0 &{} 0 \\ 0 &{} *&{} *\\ 0 &{} *&{} *\end{matrix}\right] , \quad m \ge 1. \end{aligned}

and

\begin{aligned} A_{1,2}&= \left[ \begin{matrix} 0&{} 0 &{} *\\ *&{} *&{} 0 \end{matrix}\right] , \quad A_{2m,2} = \left[ \begin{matrix} 0 &{} *&{} *\\ 0 &{} 0 &{} *\\ *&{} 0 &{} 0 \end{matrix}\right] \quad \hbox {and}\quad A_{2m+1,2} = \left[ \begin{matrix} 0 &{} 0 &{} *\\ *&{} *&{} 0 \\ 0 &{} *&{} 0 \end{matrix}\right] ,\quad m \ge 1 \\ B_{1,2}&= \left[ \begin{matrix} 0 &{} *\\ *&{} 0 \end{matrix}\right] , \quad B_{2m,2} = \left[ \begin{matrix} 0&{} 0 &{} *\\ 0 &{} 0 &{}*\\ *&{} *&{} 0 \end{matrix}\right] \quad \hbox {and}\quad B_{2m+1,2} = \left[ \begin{matrix} 0 &{} *&{} *\\ *&{} 0 &{} 0 \\ *&{} 0 &{} 0 \end{matrix}\right] , \quad m \ge 1. \end{aligned}

These three-term relations in two variables hold when (xy) are on the cubic curve $${\gamma }$$ or modulo the polynomial ideal $${\langle }y^2-\phi (x){\rangle }$$. It is worth mentioning that we obtain, for example,

\begin{aligned} x \widehat{Y}_{2m,2} = (B_{2m,1})_{2,1} \widehat{Y}_{2m,1} + (B_{2m,1})_{2,2} \widehat{Y}_{2m,2} + (A_{2m-1,1})_{2,1} \widehat{Y}_{2m-1,1}, \end{aligned}

where $$(A)_{i,j}$$ stands for (ij)-element of the matrix A, in which the lefthand side is a polynomial of degree $$n+1$$, where the righthand side is of degree n. This holds without contradiction because $$(x,y) \in {\gamma }$$.

### 2.5 Examples of Orthogonal Polynomials on Cubic Curves

Recall from Theorem 1 that we require two one-variable orthogonal polynomial families to construct an orthogonal basis on the cubic curve. We shall always choose w to be either the Jacobi or Laguerre weight. As we shall argue below the second family of orthogonal polynomials $$p_n(\phi w)$$ will be non-classical if at least one of the roots of $$\phi$$ is not at an endpoint of $$\mathrm {supp}(w)$$. Otherwise, if all the roots of $$\phi$$ are at the endpoint(s) of $$\mathrm {supp}(w)$$, the second orthogonal polynomial family will also be Jacobi or Laguerre but with different parameters for its weight function.

The following cases arise:

1. 1.

$$\phi$$ has one simple real root, or $$\phi = (x-a)g_2(x)$$, where $$g_2(x)$$ is a second degree polynomial with a pair of complex conjugate roots.

2. 2.

$$\phi$$ has one triple real root, or $$\phi = k(x-a)^3$$, where k is a constant.

3. 3.

$$\phi$$ has a simple and a double real root, or $$\phi = k(x -a)(x-b)^2$$ where $$a < b$$ or $$b < a$$. The latter case is not of interest since then b represents an isolated point of the curve $$y^2 = \phi$$.

4. 4.

$$\phi$$ has three distinct real roots, or $$\phi = k(x-a)(x-b)(x-c)$$, $$a<b<c$$.

In each of these cases the domain $$\varOmega _{\gamma }$$ on which the orthogonal polynomials are defined is either a semi-infinite interval $$[A, \infty )$$ or the union of a compact interval [ab] and a semi-infinite interval. On semi-infinite intervals, we additionally consider the cases for which the support of the weight is (i) also semi-infinite, or (ii) compact. Through a linear change of variables we may, without loss of generality, let $$\mathrm {supp}(w) \subset \varOmega _{\gamma }$$ be the canonical compact interval $$[-1, 1]$$ or the semi-infinite interval $$[0, \infty )$$. If $$\varOmega _{\gamma }$$ is the union of a compact and semi-infinite interval, we may consider $$[-1, 1]$$ and $$[0, \infty )$$ separately. If $$\mathrm {supp}(w)$$ includes the root(s) of $$\phi$$, then these will be mapped to $$-1$$ and/or 1 if the domain is compact and to 0 if the domain is semi-infinite. This implies that on $$[-1, 1]$$, if we let the weight w be the Jacobi weight $$w_{\alpha ,\beta }$$, then there exists a polynomial $$g_k(x)$$ of degree k, $$0 \le k \le 3$$, that is strictly positive on $$\mathrm {supp}(w)$$ and whose roots are outside $$\mathrm {supp}(w)$$, such that

\begin{aligned} \phi = w_{i,j}g_k, \quad 0 \le i, j \le 3, \quad 0\le k \le 3, \quad i + j + k =3. \end{aligned}
(14)

Hence, $$\phi$$ has $$i+j$$ roots at the endpoints of $$[-1, 1]$$ and k roots outside $$[-1, 1]$$. The weight function of the second orthogonal polynomial family is $$\phi w = w_{\alpha +i,\beta +j}g_k$$, which is a non-classical weight if $$k>0$$ and classical if $$k=0$$. On $$[0, \infty )$$, if we let w be the Laguerre weight $$w_{\alpha } = x^{\alpha }e^{-x}$$, then

\begin{aligned} \phi = x^j g_k, \quad 0 \le j \le 3, \quad 0 \le k \le 3, \quad j + k =3. \end{aligned}
(15)

Here $$\phi$$ has j roots at the endpoint of $$[0, \infty )$$ and k roots outside $$[0, \infty )$$. The weight function of the second family is $$\phi w = w_{\alpha +j}g_k$$, which is non-classical if $$k>0$$ and classical if $$k=0$$.

We consider three cubic curves as examples. For the first two, orthogonal polynomials can be given explicitly in terms of classical orthogonal polynomials. The third example discusses orthogonality on elliptic curves.

#### 2.5.1 Orthogonal Polynomials on the Curve $$y^2 = x^3$$

In this example, the curve and the weight functions are

\begin{aligned} y^2 = \phi = x^3 \quad \hbox {and} \quad w_{\alpha }(x) = x^{\alpha }e^{-x}, \quad {\alpha }> -1. \end{aligned}

Since all the roots of $$\phi$$ are at 0, the endpoint of $$\mathrm {supp}(w)$$, the orthogonal polynomial basis on the curve can be constructed entirely out of Laguerre polynomials. The polynomial $$p_n(w;x) = L_n^{({\alpha })}(x)$$ is the classical Laguerre polynomial of degree n,

\begin{aligned} L_n^{({\alpha })}(x) =\frac{({\alpha }+1)_n}{n!} \sum _{k=0}^n \frac{(-n)_k}{({\alpha }+1)_k } \frac{x^k}{k!}. \end{aligned}

Moreover, $$p_n(\phi w; x) = L_n^{({\alpha }+3)}(x)$$ is also an Laguerre polynomial with parameter $${\alpha }+3$$. In this setting the inner product on the curve becomes

\begin{aligned} {\langle }f,g{\rangle }_{{\gamma },w}&= \int _0^\infty \left[ f(x,x^{3/2})g(x,x^{3/2}) \right. \\&\quad \left. + f(x, - x^{3/2})g(x, - x^{3/2})\right] w_{\alpha }(x) \mathrm {d}x. \end{aligned}

The orthogonal basis $${{\mathscr {B}}}_n$$ of the space $${{\mathscr {V}}}_n$$ in Theorem 1 becomes

\begin{aligned} {{\mathscr {B}}}_{2m}&= \left\{ L_{3m}^{({\alpha })}(x), L_{3m-1}^{({\alpha })}(x), y L_{3m-2}^{({\alpha }+3)}(x)\right\} , \\ {{\mathscr {B}}}_{2m+1}&= \left\{ L_{3m+1}^{({\alpha })}(x), y L_{3m}^{({\alpha }+3)}(x), y L_{3m-1}^{({\alpha }+3)}(x)\right\} . \end{aligned}

The norm of the Laguerre polynomial $$L_n^{({\alpha })}$$ is given by

\begin{aligned} h_n^{({\alpha })} = \frac{1}{\Gamma ({\alpha }+1)} \int _0^\infty [L_n^{({\alpha })}(x)]^2 e^{-x} \mathrm {d}x = \left( {\begin{array}{c}n+{\alpha }\\ n\end{array}}\right) , \end{aligned}

from which the norm of the basis in $${{\mathscr {V}}}_n$$ can be derived as in Theorem 1.

#### 2.5.2 Jacobi Polynomials on Tear Drop Curves

In this example, the curve is the tear drop curve

\begin{aligned} y^2= \phi (x)= \tfrac{1}{4} (1-x)^2 (1+x), \quad -1 \le x \le 1. \end{aligned}
(16)

and the weight function is the Jacobi weight, for $${\alpha }, {\beta }> -1$$,

\begin{aligned} w_{{\alpha },{\beta }}(x) = (1-x)^{\alpha }(1+x)^{\beta }, \quad -1 \le x \le 1. \end{aligned}
(17)

Since all the roots of $$\phi$$ are at the endpoints of $$\mathrm {supp}(w_{{\alpha },{\beta }})$$, the orthogonal basis on the tear drop curve can be constructed entirely out of Jacobi polynomials. The polynomial $$p_n(w;x)$$ is the usual Jacobi polynomial $$P_n^{({\alpha },{\beta })}(x)$$

\begin{aligned} P_n^{({\alpha },{\beta })}(x) = \left( {\begin{array}{c}n+{\alpha }\\ n\end{array}}\right) {}_2F_1 \left( \begin{matrix} -n, n+{\alpha }+{\beta }\\ {\alpha }+1 \end{matrix}; \frac{1-x}{2} \right) , \end{aligned}

and $$p_n(\phi w)$$ is also a Jacobi polynomial, $$p_n(\phi w) = P_n^{({\alpha }+2,{\beta }+1)}$$. In this setting the inner product on the curve becomes

\begin{aligned} {\langle }f,g{\rangle }_{{\gamma },w}&= \int _{-1}^1 \left[ f\left( x,\sqrt{\phi (x)}\right) g\left( x,\sqrt{\phi (x)}\right) \right. \\&\quad \left. + f\left( x,-\sqrt{\phi (x)}\right) g\left( x,-\sqrt{\phi (x)}\right) \right] w_{{\alpha },{\beta }}(x) \mathrm {d}x. \end{aligned}

The orthogonal basis $${{\mathscr {B}}}_n$$ of the space $${{\mathscr {V}}}_n$$ in Theorem 1 becomes

\begin{aligned} {{\mathscr {B}}}_{2m}&= \left\{ P_{3m}^{({\alpha },{\beta })}(x), P_{3m-1}^{({\alpha },{\beta })}(x), y P_{3m-2}^{({\alpha }+2,{\beta }+1)}(x)\right\} , \\ {{\mathscr {B}}}_{2m+1}&= \left\{ P_{3m+1}^{({\alpha },{\beta })}(x), y P_{3m}^{({\alpha }+2,{\beta }+1)}(x), y P_{3m-1}^{({\alpha }+2,{\beta }+1)}(x)\right\} . \end{aligned}

#### 2.5.3 Orthogonal Polynomials on Elliptic Curves

We consider two elliptic curves. The first one is given by

\begin{aligned} y^2 = x^3 - 2 x + 4 = (x+2) \left( (x -1)^2 +1\right) =: \phi (x), \end{aligned}

which has one component. We set $$u = x+2$$ so that $$\phi = u\left( (u -3)^2 +1\right)$$ has a root at $$u=0$$ and we can choose the classical Laguerre weight

\begin{aligned} w_{\alpha }(u) = u^{\alpha }e^{-u}, \quad {\alpha }> -1, \end{aligned}

defined for $$u \ge 0$$. In this setting, the $$\lbrace p_n(w) \rbrace$$ are given by the Laguerre polynomials $$L_n^{({\alpha })}$$. Since $$\phi (u)$$ has two roots outside $$\mathrm {supp}(w_{{\alpha }})$$, the orthogonal polynomial family $$\lbrace p_n(\phi w) \rbrace$$ is non-classical and orthogonal with respect to

\begin{aligned} \phi (u) w_{\alpha }(u) = ((u -3)^2+1) u^{{\alpha }+1} e^{-u}, \quad u \ge 0. \end{aligned}

The inner product in this setting becomes

\begin{aligned} {\langle }f,g {\rangle }_{{\gamma },w_{\alpha }}&= \int _{0}^\infty \left[ f \left( u, \sqrt{\phi (u)} \right) g \left( u, \sqrt{\phi (u)} \right) \right. \\&\quad \left. + f \left( u, - \sqrt{\phi (u)} \right) g \left( u, - \sqrt{\phi (u)} \right) \right] w_{\alpha }(u) \mathrm {d}u. \end{aligned}

If we choose a weight function w that is supported on $$x \in [-2, 2]$$, say, then the inner product is defined on a finite segment of $${\gamma }$$. We set $$x = 2u$$, where $$u \in [-1, 1]$$ and choose the Jacobi weight $$w = w_{{\alpha },{\beta }}(u)$$. In this case, the $$\lbrace p_n(w) \rbrace$$ are given by the Jacobi polynomials $$P_n^{({\alpha },{\beta })}$$ and the $$\lbrace p_n(\phi w) \rbrace$$ are non-classical orthogonal polynomials (since $$\phi$$ has two roots outside $$\mathrm {supp}(w)$$) with respect to the weight

\begin{aligned} \phi (u) w_{{\alpha },{\beta }}(u) = 2\left( (2u-1)^2 + 1 \right) w_{{\alpha },{\beta }+1}(u). \end{aligned}

Our second elliptic curve is given by

\begin{aligned} y^2 = x^3 - 4 x = x (x^2-4), \end{aligned}

which has two components. The first one is a closed curved with $$-2\le x \le 0$$ and the second one is an open curve defined for $$x \ge 2$$. On the first component we set $$u = x + 1 \in [-1, 1]$$ and choose $$w = w_{{\alpha },{\beta }}(u)$$ in which case $$p_n(w;u) = P_n^{({\alpha },{\beta })}(u)$$ and the polynomials $$\lbrace p_n(\phi w;u) \rbrace$$ are orthogonal with respect to $$\phi w = w_{{\alpha }+1,{\beta }+1}(u-3)$$. On the second component we let $$u = x -2$$ and choose $$w = w_{{\alpha }}(u)$$ so that $$p_n(w;u) = L_n^{({\alpha })}(u)$$ and the polynomials $$\lbrace p_n(\phi w;u) \rbrace$$ are orthogonal with respect to $$\phi w = w_{{\alpha }+1}(u+4)(u+2)$$.

### Remark

For a particularly convenient and flexible method for numerically computing these non-classical orthogonal polynomials $$p_n(\phi w)$$, based on the Lanczos algorithm, see [13, 14]. This is described in more detail in Sect. 4.

## 3 Quadrature Rules and Polynomial Interpolation

We consider quadrature rules and polynomials interpolation on the cubic curve.

First we recall Gauss quadrature for a weight function w defined on the real line. Let $$\varPi _N^{(x)}$$ denote the space of univariate polynomials of degree at most N in x variable. Let $$x_{k,N}$$, $$1\le k \le N$$, be the zeros of the orthogonal polynomial $$p_N(w)$$ of degree N. These zeros are the nodes of the N-point Gaussian quadrature rule, which is exact for polynomials of degree $$2N-1$$,

\begin{aligned} \int _{{\mathbb {R}}}f(x) w(x) \mathrm {d}x = \sum _{k=1}^N \lambda _{k,N} f(x_{k,N}), \quad \forall f\in \varPi _{2N-1}^{(x)}, \end{aligned}

where $${\lambda }_{k,N}$$ are the Gaussian quadrature weights. Let $${\gamma }$$ be a cubic curve. We denote by $$\varPi _n({\gamma })$$ the space of polynomials of degree at most n restricted to the curve $${\gamma }$$. By Theorem 1,

\begin{aligned} \varPi _{2m+1}({\gamma }) = \varPi _{3m+1}^{(x)} \cup y\varPi _{3m}^{(x)} \quad \hbox {and}\quad \varPi _{2m}({\gamma }) = \varPi _{3m}^{(x)} \cup y \varPi _{3m-2}^{(x)}. \end{aligned}
(18)

From Proposition 1 it follows

\begin{aligned} \dim \varPi _0({\gamma }) =1 \quad \hbox {and}\quad \dim \varPi _n({\gamma }) = 3 n, \quad n \ge 1. \end{aligned}

### Theorem 3

Let $${\gamma }$$ be a cubic curve and w(x) be a weight function on $$\varOmega _{\gamma }$$. For $$n = 2m$$, let $$N = N_n = 3m$$ and for $$n = 2m+1$$, let $$N = N_n = 3m+1$$. Let

\begin{aligned} I_n (f):= \sum _{k=1}^{N} {\lambda }_{k,N} \left[ f(x_{k,N},y_{k,N})+f(x_{k,N},-y_{k,N})\right] , \quad y_{k,N} = \sqrt{\phi (x_{k,N})}, \end{aligned}
(19)

where $$x_{k,N}$$ are zeros of $$p_{N}(w)$$ and $${\lambda }_{k,N}$$ are the corresponding weights of the N-point Gauss quadrature rule. Then

\begin{aligned} \int _{\gamma }f(x,y) w(x) \mathrm {d}\sigma (x,y) = I_n(f), \quad \forall f\in \varPi _{2n-1}({\gamma }). \end{aligned}
(20)

### Proof

Since $$\varPi _{2n-1}({\gamma }) = \bigoplus _{k=0}^{2n-1} {{\mathscr {V}}}_k({\gamma },w)$$, we verify the quadrature rule for the basis of $${{\mathscr {V}}}_k({\gamma },w)$$ in Theorem 1 for $$0 \le k \le 2n-1$$. Since $$Y_{2j,3}$$, $$Y_{2j+1,2}$$ and $$Y_{2k+1,3}$$ contain a single factor y, both sides of (20) are zero by (6) and (19). Thus, we need to verify (20) for

\begin{aligned}&\{Y_{2j,1}, Y_{2j,2}: 1 \le j \le n-1\} \cup \{Y_{2j+1,1}: 1\le j\le n-1\} \\&\quad = \{p_{3j}(w), p_{3j-1}(w): 1 \le j \le n-1\} \cup \{p_{3j+1}(w): 1\le j\le n-1\} = \varPi ^*. \end{aligned}

For $$n = 2m$$, the highest degree of $$p_\ell (w)$$ in the set is $$3n-2 = 6m-2 < 2N_{2m}-1$$, whereas for $$n= 2m+1$$, it is $$3n-2 = 6m+1 = 2 N_{2m+1}-1$$. For $$f(x,y) = p_\ell (w;x)$$, (20) becomes, by (6),

\begin{aligned} \int _{\varOmega _{\gamma }} p_\ell (w;x) w(x) \mathrm {d}x = \sum _{k=1}^{N} {\lambda }_{k,N} p_\ell (w; x_{k,N}), \end{aligned}

which holds, by the Gaussian quadrature, for $$0 \le \ell \le 2N_n-1$$. Consequently, it holds for all polynomials in $$\varPi ^*$$. This verifies (20) for all polynomials in $$\varPi _{2n-1}({\gamma })$$ and completes the proof. $$\square$$

### Remark

For $$n = 2m+1$$, the quadrature 20 uses $$2 N_{2m+1} = 6m + 2 = 3 n-1$$, whereas for $$n = 2m$$, the quadrature 20 uses $$2 N_{2m} = 6m = 3 n$$ points. It is exact for the space $$\varPi _{2n-1}({\gamma })$$, which has the dimension $$3 (2n-1) = 6 n - 3$$.

The quadrature (19) on the cubic curve is an analogue of the Gaussian quadrature rule on the real line. We now consider polynomial interpolation based on the nodes of this quadrature rule.

### 3.2 Lagrange Interpolation

First we recall the univariate Lagrange interpolation polynomial on the zeros $$x_{k,N}$$, $$1 \le k \le N$$, of $$p_N(w)$$, denoted by $$L_N (w; f)$$, which is the unique polynomial of degree at most $$N-1$$ that satisfies

\begin{aligned} L_N (w; f, x_{k,N}) = f(x_{k,N}), \quad 1 \le k \le N, \end{aligned}

for any continuous function f. It is well-known that $$L_N(w; f)$$ is given by

\begin{aligned} L_N (w;f,x) = \sum _{k=1}^N f(x_{k,N})\ell _k(x), \quad \ell _k(x) = \frac{p_N(w;x)}{(x-x_{k,N}) p_N'(w_{k,N})}. \end{aligned}
(21)

By the Christoffel–Darboux formula, we can also write $$\ell _k$$ as

\begin{aligned} \ell _k(x) = \frac{K_N(w; x,x_{k,N})}{K_N(w; x_{k,N},x_{k,N})}, \quad K_N(x,y) = \sum _{k=0}^{N-1} \frac{p_k(w;x)p_k(w;y)}{h_k(w)}. \end{aligned}
(22)

### Theorem 4

Let $${\gamma }$$ be a cubic curve and w(x) be a weight function on $$\varOmega _{\gamma }$$. For $$f \in C(\varOmega _{\gamma })$$, let $$f_o$$ and $$f_e$$ be defined as in (10). For $$n = 0,1,2\ldots$$, let $$N = N_n$$ be defined by $$N_{2m} = 3m$$ and $$N_{2m+1} = 3m+1$$. Let

\begin{aligned} {{\mathscr {L}}}_n (w; f, x,y):= L_{N} (w; f_e, x) + y L_{N} (w; f_o, x), \end{aligned}
(23)

Then $${{\mathscr {L}}}_n(w;f)$$ is a polynomial that satisfies

\begin{aligned} \begin{aligned} {{\mathscr {L}}}_n(w; f, x_{k,N}, y_{k,N})&= f(x_{k,N},y_{k,N}), \\ {{\mathscr {L}}}_n(w; f, x_{k,N}, - y_{k,N})&= f(x_{k,N},- y_{k,N}), \end{aligned} \quad 1 \le k\le N. \end{aligned}

Furthermore, it is the unique interpolation polynomial in $$\varPi _n({\gamma })$$ if $$n = 2m+1$$ and in $$\varPi _{n}({\gamma })\cup \{ Y_{2m+1,3}\}$$ if $$n = 2m$$.

### Proof

If $$n = 2m+1$$, then $$N =3m+1$$ and we interpolate at $$2N = 6m+2$$ points. In this case, both $$L_N(w;f_e)$$ and $$L_N(w;f_o)$$ are elements of $$\varPi _{3m}^{(x)}$$. Since $$\varPi _{2m+1}({\gamma }) = \varPi _{3m+1}^{(x)} \cup y\varPi _{3m}^{(x)}$$, it follows that $${{\mathscr {L}}}_n(w;f) \in \varPi _{2m+1}({\gamma })$$. Since $$Y_{2m+1,1}(x,y) = p_{3m+1}(w;x)$$ vanishes on all interpolation points, there are $$\dim \varPi _{2m+1}({\gamma }) - 1 = 6m+2$$ independent functions over the set of nodes in the space $$\varPi _{2m+1}({\gamma })$$. Similarly, if $$n=2m$$, then $$N = 3m$$ and we interpolate at $$2N = 6m$$ points. In this case, both $$L_N(w;f_e)$$ and $$L_N(w;f_o)$$ are elements of $$\varPi _{3m-1}^{(x)}$$. Since $$\varPi _{2m}({\gamma }) = \varPi _{3m}^{(x)} \cup y \varPi _{3m-2}^{(x)}$$, it follows that $${{\mathscr {L}}}_n(w;f) \in \varPi _{2m}({\gamma }) \cup \{Y_{2m+1,3}\}$$ since $$Y_{2m+1,3} = y p_{3m-1}( w;x)$$. Since $$Y_{2m,1}(x,y) =p_{3m}(w;x)$$ vanishes at all nodes, we see that there are $$\dim \varPi _{2m}({\gamma }) - 1 + 1= 6m$$ independent functions over the set of nodes in the space. Now, for $$1\le k \le N$$, we obtain from the Lagrange interpolation of $$L_N(w; f)$$ that

\begin{aligned} {{\mathscr {L}}}_n(w; f, x_{k,N}, y_{k,N})&= L_N (w; f_e, x_{k,N}) + y_{k,N} L_{N} (w; f_o, x_{k,N}) \\&= f_e(x_{k,N}) + y_{k,N} f_o(x_{k,N}) = f(x_{k,N}, y_{k,N}); \end{aligned}

similarly, we also obtain that

\begin{aligned} {{\mathscr {L}}}_n(w; f, x_{k,N}, - y_{k,N}) = f_e(x_{k,N}) - y_{k,N} f_o(x_{k,N}) = f(x_{k,N}, - y_{k,N}), \end{aligned}

so that $${{\mathscr {L}}}_n(w;f)$$ satisfies the desired interpolation conditions.

Finally, since zeros of $$p_N(w)$$ are all in the interior of $$\varOmega _{\gamma }$$, it follows that $$y_{k,N} = \sqrt{\phi (x_{k,N})} > 0$$ for all k. Consequently, if $$f(x_{k,N}, y_{k,N}) =0$$ for all $$1 \le k \le N$$, then $$L_N (w; f_e, x_{k,N}) =0$$ and $$L_N (\phi w; f_o, x_{k,N}) =0$$ for all k, so that, by the uniqueness of the Lagrange interpolation, $$f_e = 0$$ and $$f_o = 0$$. Consequently, $$f =0$$, which proves that the interpolation polynomials are unique in their respective spaces. $$\square$$

For computational purposes, it is convenient to express the interpolant defined in Theorem 4 as a truncated expansion in the orthogonal polynomial basis on $${\gamma }$$. We recall a classical result for univariate interpolants, according to which (21) can be expressed as an expansion in the orthogonal polynomials $$p_n(w)$$,

\begin{aligned} L_N(w;f,x) = \sum _{k=0}^{N-1} a_{k,N}p_k(w;x), \end{aligned}
(24)

where

\begin{aligned} a_{k,N} = \frac{{\langle }f, p_k(w) {\rangle }_N}{{\langle }p_k(w), p_k(w) {\rangle }_N} = \frac{{\langle }f, p_k(w) {\rangle }_N}{h_k(w)}, \quad 0 \le k \le N-1, \end{aligned}

and $${\langle }\cdot , \cdot {\rangle }_{N}$$ denotes the discretised univariate inner product $${\langle }\cdot , \cdot {\rangle }_{w}$$ based on the N-point Gaussian quadrature rule:

\begin{aligned} {\langle }f(x),g(x){\rangle }_N := \sum _{k=1}^N {\lambda }_{k,N} f(x_{k,N})g (x_{k,N}), \end{aligned}

where, as before, $$x_{k,N}$$ and $${\lambda }_{k,N}$$ are the Gaussian quadrature nodes (the roots of $$p_{N}(w)$$) and weights, respectively.

According to the following bivariate analogue of the univariate result just mentioned, we require a system of M orthogonal functions with respect to an M-point discrete inner product to construct an interpolant expanded in an orthogonal basis.

### Proposition 2

[17] Suppose we have a discrete inner product for a basis $$\lbrace \phi _j \rbrace _{j=0}^{M-1}$$ of the form

\begin{aligned} {\langle }f, g {\rangle }_{M} = \sum _{j = 1}^M w_j f(x_j,y_j)g(x_j,y_j) \end{aligned}

satisfying $${\langle }\phi _m, \phi _n {\rangle }_{M} = 0$$ for $$m \ne n$$ and $${\langle }\phi _n, \phi _n {\rangle }_{M} \ne 0$$. Then the function

\begin{aligned} {{\mathscr {L}}}_M f(x,y) = \sum _{n = 0}^{M-1} f_{n}^{M}\phi _n(x,y) \end{aligned}

interpolates f(xy) at $$(x_j,y_j)$$, where $$f_n^M := \frac{{\langle }\phi _n, f {\rangle }_M}{{\langle }\phi _n, \phi _n {\rangle }_{M}}$$.

We first consider the inner product $${\langle }\cdot , \cdot {\rangle }_{N,{\gamma }}$$ coming from discretization of $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ via Gauss quadrature,

\begin{aligned} {\langle }f,g {\rangle }_{N,{\gamma }}&:=\sum _{k=1}^N \lambda _{k,N}\left[ f(x_{k,N},y_{k,N})g(x_{k,N},y_{k,N}) \right. \nonumber \\&\quad \left. + f(x_{k,N},-y_{k,N})g(x_{k,N},-y_{k,N}) \right] , \end{aligned}
(25)

where $$x_{k,N}$$ and $$\lambda _{k,N}$$ are the N-point Gauss quadrature nodes and weights and $$y_{k,N} = \sqrt{\phi (x_{k,N})}$$. From Proposition 2, we require a system of 2N orthogonal functions with respect to $${\langle }f,g {\rangle }_{N,{\gamma }}$$ to construct an interpolant expanded in an orthogonal basis. The next result shows that only $$2N-1$$ functions from the orthogonal basis on $${\gamma }$$ given in Theorem 1 are orthogonal with respect to $${\langle }f,g {\rangle }_{N,{\gamma }}$$.

### Proposition 3

With $$n = 2m+1$$ and $$N = N_n = 3m + 1$$, the $$2N-1$$ functions

\begin{aligned}&\left\{ Y_0, Y_{1,1}, Y_{1,2} \right\} \cup \left\{ Y_{k,1}, Y_{k,2}, Y_{k,3} \right\} _{k=2}^{n-1}\cup \lbrace Y_{n,3} \rbrace \nonumber \\&\quad = \left\{ p_k(w), yp_k(\phi w) \right\} _{k = 0}^{3m-1}\cup \left\{ p_{3m}(w) \right\} , \end{aligned}
(26)

and with $$n = 2m$$ and $$N = N_n = 3m$$, the $$2N-1$$ functions

\begin{aligned}&\left\{ Y_0, Y_{1,1}, Y_{1,2} \right\} \cup \left\{ Y_{k,1}, Y_{k,2}, Y_{k,3} \right\} _{k=2}^{n} {\setminus } \lbrace Y_{n,1} \rbrace \nonumber \\&\quad = \left\{ p_k(w), yp_k(\phi w) \right\} _{k = 0}^{3m-2}\cup \left\{ p_{3m-1}(w) \right\} \end{aligned}
(27)

are the largest sets of functions from among the $$Y_{k,i}$$ defined in Theorem 1 that are orthogonal and have nonzero norms with respect to $${\langle }\cdot ,\cdot {\rangle }_{N,{\gamma }}$$.

### Proof

From the symmetry of $${\langle }\cdot ,\cdot {\rangle }_{N,{\gamma }}$$, we have, similar to the property (7) of the continuous inner product,

\begin{aligned} {\langle }f(x),yg(x) {\rangle }_{N,{\gamma }} = 0. \end{aligned}

This proves the orthogonality between the basis functions $$Y_{k,i}$$ of the form f(x) and those of the form yg(x). To demonstrate orthogonality between the remaining $$Y_{k,i}$$ (those that are both of the from f(x) or both of the form yf(x)), we note that since N-point Gaussian quadrature is exact for polynomials of degree $$\le 2N - 1$$,

\begin{aligned} {\langle }p_k(w),p_j(w) {\rangle }_{N,{\gamma }} = 2{\langle }p_k(w),p_j(w) {\rangle }_{N} = 2{\langle }p_k(w),p_j(w) {\rangle }_{w}=2\delta _{k,j}h_k(w), \end{aligned}
(28)

for $$0 \le k, j \le N - 1$$. Since $$\phi$$ has degree 3,

\begin{aligned} {\langle }yp_k(\phi w),yp_j(\phi w) {\rangle }_{N,{\gamma }}&= 2{\langle }\phi p_k(\phi w),p_j(\phi w) {\rangle }_{N} \nonumber \\&= 2{\langle }p_k(\phi w),p_j(\phi w) {\rangle }_{\phi w} = 2\delta _{k,j}h_k(\phi w), \end{aligned}
(29)

for $$0 \le k,j \le N - 2$$. Equations (28) and (29) demonstrate the orthogonality of the sets of functions in (27) and (26) as well as their nonzero norms. The aforementioned bounds on the indices k and j and the fact that $$p_N(w)$$ vanishes at all the quadrature nodes imply that it is not possible to add a function $$p_k(w)$$, with $$k \ge N$$ or $$yp_k(\phi w)$$, with $$k \ge N-1$$ to the sets (27) or (26) such that it is orthogonal and have a nonzero norm with respect to $${\langle }\cdot ,\cdot {\rangle }_{N,{\gamma }}$$. In particular, it is not possible to add $$yp_{N-1}$$ to (27) or (26) since $${\langle }yp_{N-1},yp_{N-2}{\rangle }_{N,{\gamma }} = 2{\langle }\phi p_{N-1},p_{N-2}{\rangle }_{N} \ne 0$$. $$\square$$

We conclude that it is not possible to construct an interpolant via Gauss quadrature in the manner of Proposition 2. It is nevertheless possible to construct an interpolant à la Proposition 2 if $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ is discretised via Gauss–Radau or Gauss–Lobatto quadrature [6].

As shown in the proof of Theorem 4, the set of 2N functions $$\lbrace p_k(w), yp_n(\phi w) \rbrace _{k = 0}^{N-1}$$ at the 2N nodes $$(x_{k,N},\pm y_{k,N})$$, $$k = 1, \ldots , N$$ are linearly independent. Hence, the interpolant in Theorem 4 can be represented in the form

\begin{aligned} {{\mathscr {L}}}_n (w; f, x,y) = \sum _{k = 0}^{N-1} a_{k,N} p_k(w;x) + y\sum _{k = 0}^{N-1} b_{k,N} p_k(\phi w;x), \end{aligned}
(30)

and the coefficients $$a_{k,N}$$ and $$b_{k,N}$$ can be obtained by solving a $$2N \times 2N$$ Vandermonde-like linear system whose columns consist of $$p_k(w)$$ and $$yp_n(\phi w)$$, evaluated at $$(x_{k,N},\pm y_{k,N})$$ for $$k = 1, \ldots , N$$. However, since this procedure requires $$\mathscr {O}(N^3)$$ operations, we introduce an alternative method with which the coefficients can be obtained with a complexity of either $$\mathscr {O}(N^2)$$ (for a general weight w) or $$\mathscr {O}(N \log N)$$ (for the Chebyshev weight).

We now introduce a new inner product and orthogonal basis with respect to which it is possible to construct an interpolant with Gaussian quadrature. Although the inner product $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ is the natural parametrization of (4), the new inner product gives rise to a new orthogonal basis that is more efficient for computational purposes compared to the basis in Theorem 1, as we shall demonstrate.

We define the inner product $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$ as

\begin{aligned} \left[ f,g \right] _{{\gamma },w} := \int _{\varOmega _{\gamma }} \left[ f_e\left( x \right) g_e\left( x \right) + f_o\left( x \right) g_o\left( x \right) \right] w(x) \mathrm {d}x , \end{aligned}
(31)

where $$f_e, g_e, f_o, g_o$$ are the even and odd parts, respectively, of functions f(xy) and g(xy) on $${\gamma }$$, as defined in (10). Note that the odd part of functions on $${\gamma }$$ have removable singularities at points (xy) where $$y = \sqrt{\phi (x)} = 0$$.

In the inner product space defined by $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$, the orthogonal polynomial basis on $${\gamma }$$ is exactly the same as in Theorem 1 (where the inner product space is equipped with $${\langle }\cdot ,\cdot {\rangle }_{{\gamma },w}$$), except that the $$Y_{n,i}$$ that are of the form $$yp_k(\phi w)$$ are replaced by $$yp_k( w)$$. That is, whereas the orthogonal polynomial basis in Theorem 1 is constructed from $$p_n(w)$$ and $$p_n(\phi w)$$, the orthogonal basis with respect to $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$ is constructed solely out of $$p_n(w)$$. Hence, in the inner product space with $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$, one only requires univariate classical orthogonal polynomials.

The results in Theorem 2 and Corollary 1 also hold for the orthogonal basis with respect to $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$, mutatis mutandis. A notable difference between the inner products $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ and $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$ is that, unlike the Jacobi operators for $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ in Sect. 2.4, the latter gives rise to a non-symmetric Jacobi operator for multiplication by y. This is because the inner product $$\left[ \cdot , \cdot \right] _{{\gamma },w}$$ is not self-adjoint with respect to multiplication by y. That is,

\begin{aligned} \left[ yf(x), yg(x) \right] _{{\gamma },w} \ne \left[ y^2 f(x), g(x) \right] _{{\gamma },w}, \end{aligned}

because $$\left[ yf(x), yg(x) \right] _{{\gamma },w} = {\langle }f(x), g(x) {\rangle }_{w}$$ and $$\left[ y^2 f(x), g(x) \right] _{{\gamma },w} = \left[ \phi f(x), g(x) \right] _{{\gamma },w} = {\langle }\phi f(x), g(x) {\rangle }_{w}$$.

### 3.4 Interpolation via Quadrature with Respect to $$\left[ \cdot ,\cdot \right] _{{\gamma },w}$$

Discretising $$\left[ \cdot , \cdot \right] _{{\gamma },w}$$ via Gauss quadrature, we obtain

\begin{aligned}{}[f,g]_N := \sum _{k=1}^N {\lambda }_{k,N} \left[ f_e(x_{k,N})g_e (x_{k,N}) + f_o(x_{k,N})g_o (x_{k,N})\right] . \end{aligned}

We shall need the following result.

### Proposition 4

With $$n = 2m+1$$ and $$N = N_n = 3m + 1$$, the 2N functions

\begin{aligned} \left\{ Y_0, Y_{1,1}, Y_{1,2} \right\} \cup \left\{ Y_{k,1}, Y_{k,2}, Y_{k,3} \right\} _{k=2}^n{\setminus } \lbrace Y_{n,1} \rbrace = \left\{ p_k(w), yp_k(w) \right\} _{k = 0}^{3m}, \end{aligned}
(32)

and with $$n = 2m$$ and $$N = N_n = 3m$$, the 2N functions

\begin{aligned} \left\{ Y_0, Y_{1,1}, Y_{1,2} \right\} \cup \left\{ Y_{k,1}, Y_{k,2}, Y_{k,3} \right\} _{k=2}^n\cup \lbrace Y_{n+1,3} \rbrace {\setminus } \lbrace Y_{n,1} \rbrace = \left\{ p_k(w), yp_k(w) \right\} _{k = 0}^{3m-1} \end{aligned}
(33)

are orthogonal and have nonzero norms with respect to $$[\cdot ,\cdot ]_N$$.

### Proof

It follows from the definition (10) that for a function on $${\gamma }$$ that depends only on x,

\begin{aligned} \left( f(x) \right) _e = f(x), \quad \left( f(x) \right) _o = 0, \end{aligned}

and for a function on $${\gamma }$$ of the form yg(x),

\begin{aligned} \left( yg(x) \right) _e = 0, \quad \left( yg(x) \right) _o = g(x). \end{aligned}

Hence, $$\left[ f(x), y g(x) \right] _{N} = 0$$, which proves orthogonality between functions in the sets (33) and (32) of the form $$p_k(w)$$ and those of the form $$yp_k(w)$$. We note that since the N-point Gaussian quadrature rule is exact for polynomials of degree $$\le 2N-1$$, it follows that

\begin{aligned}{}[p_k(w), p_j(w)]_N&= {\langle }p_k(w), p_j(w){\rangle }_N ={\langle }p_k(w), p_j(w){\rangle }_w=\delta _{k,j}h_k(w), \\ [y p_k(w), y p_j(w)]_N&= {\langle }p_k(w), p_j(w) {\rangle }_N = {\langle }p_k(w), p_j(w){\rangle }_w=\delta _{k,j}h_k(w), \end{aligned}

for $$0 \le k, j \le N-1$$. This demonstrates both the orthogonality between functions in (33) and (32) that are both of the form f(x) or both of the form yf(x) and the nonzero norms of the functions in (33) and (32) with respect to $$[\cdot ,\cdot ]_N$$. $$\square$$

### Theorem 5

The interpolant defined in Theorem 4 can be represented in the form

\begin{aligned} {{\mathscr {L}}}_n (w; f, x,y) = \sum _{k = 0}^{N-1} a_{k,N} p_k(w;x) + y\sum _{k = 0}^{N-1} b_{k,N} p_k(w;x), \end{aligned}
(34)

with

\begin{aligned} a_{k,N} = \frac{{\langle }f_e, p_k(w) {\rangle }_{N}}{h_k(w)}, \quad b_{k,N} = \frac{{\langle }f_o, p_k(w) {\rangle }_{N}}{h_k(w)}, \quad 0 \le k \le N-1, \end{aligned}

and where $$N = N_n = 3m+1$$ if $$n = 2m+1$$ and $$N = N_n = 3m$$ if $$n = 2m$$.

### Proof

It follows from Proposition 4 that for $$0 \le k \le N-1$$,

\begin{aligned} \frac{\left[ f, p_k(w) \right] _{N}}{\left[ p_k(w), p_k(w) \right] _{N}} = \frac{{\langle }f_e, p_k(w) {\rangle }_{N}}{{\langle }p_k(w), p_k(w) {\rangle }_{N}} = \frac{{\langle }f_e, p_k(w) {\rangle }_{N}}{h_k(w)} = a_{k,N} , \end{aligned}

and

\begin{aligned} \frac{\left[ f, yp_k(w) \right] _{N}}{\left[ yp_k(w), yp_k(w) \right] _{N}} = \frac{{\langle }f_o, p_k(w) {\rangle }_{N}}{{\langle }p_k(w), p_k(w) {\rangle }_{N}} = \frac{{\langle }f_o, p_k(w) {\rangle }_{N}}{h_k(w)} = b_{k,N}. \end{aligned}

By the previously mentioned result for univariate interpolants in Sect. 3.3, this implies that

\begin{aligned} \sum _{k = 0}^{N-1} a_{k,N} p_k(w;x) = L_N(w;f_e,x), \quad \sum _{k = 0}^{N-1} b_{k,N} p_k(w;x) = L_N(w;f_o,x). \end{aligned}
(35)

Comparing (35), (34) and (23), the result follows. $$\square$$

Note that if w is chosen to be the Chebyshev weight, one can compute the coefficients of the interpolant, $$a_{k,N}$$ and $$b_{k,N}$$, in $$\mathscr {O}(N \log N)$$ operations using the fast cosine transform. A fast transform is also available for the uniform Legendre weight $$w = 1$$ [9], and potentially for any Jacobi weight [8]. Since fast transforms are not available for the non-classical polynomials $$p_n(\phi w)$$, $$\mathscr {O}(N^2)$$ operations are required to compute the coefficients of the interpolant obtained via (Gauss–Radau or Gauss–Lobatto) quadrature. The inner product $$\left[ \cdot , \cdot \right] _{{\gamma },w}$$ is therefore preferable to $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ for computing interpolants via quadrature.

## 4 Applications

We can approximate functions of the form

\begin{aligned} g(t) := f\left( t,\sqrt{\phi (t)}\right) , \end{aligned}
(36)

by recasting them as bivariate functions f(xy) on the cubic curve $$\gamma = \left\{ (x,y) \; : \; y^2 = \phi (x) \right\}$$. If f(xy) is an analytic function of x and y on $$\gamma$$, then the bivariate interpolant on $$\gamma$$ will converge much faster compared to the univariate interpolant of g(t) since g has square root-type singularities at the zero(s) of $$\phi$$ while f is smooth on the cubic curve. Similarly, if $$\phi$$ has an inverse $$\phi ^{-1}$$ on an interval, then we can approximate functions of the form

\begin{aligned} f\left( \phi ^{-1}(t^2),t\right) , \end{aligned}
(37)

which have cubic-type singularities where $$\phi ^{-1}$$ has zeros, by an interpolant f(xy) on $$\gamma$$ by setting $$y = t$$ and $$x = \phi ^{-1}(t^2)$$. First we approximate a function of the form (37) and in the next section we consider functions of the form (36) that arise as solutions to differential equations.

To compute $$p_k(w)$$ (and $$p_k(\phi w)$$) we use a variant of the Stieltjes procedure where orthogonal polynomials are calculated via computing the connection coefficients with Legendre polynomials, that is, it computes the expansion

\begin{aligned} p_k(w) = \sum _{j=0}^k c_{kj} {\tilde{P}}_k \end{aligned}

where $${\tilde{P}}_k$$ are normalized Legendre polynomials. Provided w is a polynomial then the inner products are computable exactly via the Legendre Jacobi operator J, that is,

\begin{aligned} \langle {\tilde{P}}_k, {\tilde{P}}_j\rangle _w = {\mathbf {e}}_k^\top w(J) {\mathbf {e}}_j. \end{aligned}

Therefore we can readily determine $$c_{kj}$$ by orthogonalizing via Gram–Schmidt.Footnote 2 This representation makes differentiation straightforward as we know $$P_k'(x) = (k+1)/2 P_{k-1}^{(1,1)}(x)$$ [11, (18.9.15)]. In practice, we take the Legendre weight $$w(x) = 1$$ so that $$p_k(w) = {\tilde{P}}_k$$ and we need only calculate $$p_k(\phi )$$.

### 4.1 Function Approximation

To approximate the function

\begin{aligned} g(t) = J_1(10t + 20\root 3 \of {t^2 + \epsilon ^2}), \quad t \in [-1, 1], \end{aligned}
(38)

where J denotes the Bessel function of the first kind, we can set $$y^2 = \phi (x) = x^3 - \epsilon ^2$$, hence $$\phi ^{-1}(y^2) = \root 3 \of {y^2 + \epsilon ^2}$$. Then

\begin{aligned} g(t) = f(x,y) = J_1(10y + 20x), \end{aligned}

which is defined on $$\gamma$$, where

\begin{aligned} \gamma = \left\{ (x,y) : y^2 = x^3 - \epsilon ^2, \, y \in [-1, 1], \, x \in [\epsilon ^{2/3}, (1 + \epsilon ^2)^{1/3}] \right\} . \end{aligned}
(39)

For comparison purposes with standard bases, we also approximate (38) using algebraic Hermite–Padé (HP) approximation [5]. Given the function values $$f(x_{k,N})$$, $$1 \le k \le N$$, $$x_{k,N} \in [a, b]$$, to find the HP approximant of f on [ab], we require polynomials $$p_0, \ldots , p_m$$ on [ab] of specified degrees $$d_0, \ldots , d_m$$ such that

\begin{aligned} \Vert p_0 + p_1 f + p_2 f^2 + \cdots + p_m f^m \Vert _{N} = \text {minimum}. \end{aligned}
(40)

Here, the norm $$\Vert \cdot \Vert _N^2 := \langle \cdot , \cdot \rangle _{N}$$ is induced by the following discrete inner product

\begin{aligned} \langle f, g \rangle _{N} = \sum _{k = 1}^{N} w_k f(x_{k,N}) g(x_{k,N}). \end{aligned}
(41)

We assume some kind of normalization so that the trivial solution $$p_0 = \ldots = p_m = 0$$ is not admissible. The HP approximant of f(x), viz. $$\psi (x)$$, is the algebraic function defined by

\begin{aligned} p_0(x) + p_1(x) \psi (x) + p_2(x) \psi ^2(x) + \cdots + p_m(x) \psi ^m(x) = 0. \end{aligned}
(42)

In practice, we compute the polynomials $$p_0, \ldots , p_m$$ by expanding them in an orthonormal polynomial basis with respect to the discrete inner product (41). Then (40) reduces to a least squares problem whose solution we compute with the SVD. Hence the implicit normalization used is that the vector of polynomial coefficients of $$p_0, \ldots , p_m$$ in the orthonormal basis is a unit vector. This computational approach is similar to that used in [7, 19] for the case $$m = 1$$, which corresponds to rational interpolation or least squares fitting.

Throughout we shall consider diagonal HP approximants for which the degrees of the polynomials $$p_0, \ldots , p_m$$ are equal, say degree d. We require that the number of points at which f is sampled is greater than or equals to the number of unknown polynomial coefficients:

\begin{aligned} N \ge m(d+1) + d. \end{aligned}

If $$N = m(d+1) + d$$, then the minimum attained by the solution to the least squares problem (40) is zero

\begin{aligned} N = m(d+1)+d, \Rightarrow \Vert p_0 + p_1 f + p_2f^2 + \cdots + p_mf^m \Vert _{N} = \text {minimum} = 0. \end{aligned}
(43)

We call this the interpolation case. If $$N > m(d+1) + d$$, then the minimum attained by the least squares solution will be nonzero in general. Throughout we shall approximate functions with HP interpolants.

Note that if $$m=1$$ and $$p_1(x) = 1$$ in (43), then the HP approximant, $$\psi (x) = -p_0(x)$$, is a polynomial interpolant of f on the grid; if $$m=1$$, then the HP approximant, $$\psi = -p_0(x)/p_1(x)$$, is a rational interpolant of f (with poles in the complex x-plane). If $$m \ge 2$$, then for every x, $$\psi (x)$$ will generally be an m-valued approximant of f (with poles and algebraic branch points in the complex x-plane). We want to pick only one branch of the m-valued function $$\psi$$ to approximate f. One way to do this is to solve (42) with Newton’s method using a polynomial or rational approximant as first guess.

Figure 3 compares the rate of convergence to g(t) in (38) of HP approximants with $$m=0, 1, 2, 3$$ (polynomial, rational, quadratic and cubic HP interpolants) and interpolants on the cubic curve (39) which were obtained via quadrature in the Chebyshev basis as described in Sect. 3.4. The figure shows that the interpolant on the cubic curve $$\gamma$$ converges super-exponentially (since f is an entire function in x and y), which is significantly faster than HP approximants (which in addition appear to have stability/ill-conditioning issues). Moreover, it is robust as $$\epsilon \rightarrow 0$$, whereas HP interpolants break down in accuracy.

### 4.2 Differential Equations on Cubic Curves

The Bessel function (38) and other singular functions of the form $$f(x,\sqrt{\phi (x)})$$ or $$f(\phi ^{-1}(x^2),x)$$ can arise as solutions to linear differential equations of the form

\begin{aligned} \sum _{\lambda =0}^{m} a_{{\lambda }}(x,y)\frac{\mathrm {d}^{{\lambda }}}{\mathrm {d}x^{{\lambda }}}u(x) = g(x,y), \end{aligned}
(44)

for $$y^2 = \phi (x)$$, subject to boundary conditions. As discussed in Sect. 2.5, we can let $$x \in \mathrm {supp}(w) = [-1, 1] \subset \varOmega _{{\gamma }}$$ or $$x \in \mathrm {supp}(w)= [0, \infty ) \subset \varOmega _{{\gamma }}$$. For now, we consider $$x \in [-1, 1]$$.

Recall that $$\phi$$ may vanish at the endpoint(s) of $$\varOmega _{{\gamma }}$$. If $$\phi$$ vanishes on $$\mathrm {supp}(w)$$, which can only happen at the endpoint(s) of $$\mathrm {supp}(w)$$, the differential equation is singular in x. This is to be expected since linear differential equations with singular solutions must be singular. However, this does not imply that the solution will be singular on $${\gamma }$$. For example, the Bessel function (38) is the solution to a differential equation of the form (44) that is a singular function of x but an entire function of x and y on the curve (39).

For the orthogonal basis with respect to the inner product $$[\cdot , \cdot ]_{{\gamma },w}$$, which consists of only $$p_n(w)$$, solutions to (44) can be computed with the ultraspherical spectral method [12] if the $$p_n(w)$$ are chosen to be the Chebyshev polynomials. This approach represents (44) as banded matrices in coefficient space, in contrast to the dense matrices that arise in collocation methods. It is also possible to devise a spectral method with banded operators for the basis consisting of $$p_n(w)$$ and $$p_n(\phi w)$$. For this basis, unlike the basis consisting solely of $$p_n(w)$$, the operators are not known explicitly but can be constructed efficiently with quadrature.

In the examples that follow, however, we compute solutions to (44) with a spectral collocation method since we found that it was just as accurate (for the first example below) or more accurate (for the second example) than the ultraspherical spectral method.Footnote 3 In particular, we approximate the solution as

\begin{aligned} u(x,y)&\approx u_0^n Y_0 + u_{1,1}^n Y_{1,1} + u_{1,2}^n Y_{1,2}\nonumber \\&\quad + \sum _{k=2}^{n-1} \sum _{i=1}^3 u_{k,i}^n Y_{n,i} + u_{n,2}^n Y_{n,2} + u_{n,3}^n Y_{n,3}, \end{aligned}
(45)

if n is odd [cf. (32)] and

\begin{aligned} u(x,y)&\approx u_0^n Y_0 + u_{1,1}^n Y_{1,1} + u_{1,2}^n Y_{1,2} \nonumber \\&\quad + \sum _{k=2}^{n-1} \sum _{i=1}^3 u_{k,i}^n Y_{n,i} + u_{n,2}^n Y_{n,2} + u_{n,3}^n Y_{n,3} + u_{n+1,3}^n Y_{n+1,3}, \end{aligned}
(46)

if n is even [cf. (33)]. It follows from (32) and (33) that an equivalent representation of the right-hand sides of (45) and (46) is given by the right-hand side of (34) (for the basis consisting of only $$p_n(w)$$) or (30) (for the basis constructed from $$p_n(w)$$ and $$p_n(\phi w)$$). The coefficients $$u_{k,i}^n$$ [or, equivalently, $$a_{k,N}$$ and $$b_{k,N}$$ in (34) or (30)] are determined by solving a linear system so that the ODE is satisfied on a grid. We let the grid be $$(x_{k,N},\pm y_{k,N})$$, $$k = 1, \ldots , N$$, where the $$x_{k,N}$$ are the roots of $$p_N(w)$$ and $$y_{k,N} = \sqrt{\phi (x_{k,N})}$$. Recall that if $$n = 2m + 1$$, then $$N = 3m +1$$ and if $$n = 2m$$, then $$N = 3m$$.

To implement the collocation method, we use the fact that

\begin{aligned} \frac{\mathrm {d}}{\mathrm {d}x}u(x,y)&\approx \frac{\mathrm {d}}{\mathrm {d}x} \left[ \sum _{k=0}^{N-1} a_{k,N}p_k(w) + y\sum _{k=0}^{N-1} b_{k,N}p_k(w) \right] \nonumber \\&= \sum _{k=0}^{N-1} a_{k,N}p_k'(w) + y\sum _{k=0}^{N-1} b_{k,N}\left( p_k'(w) + \frac{\phi '}{2\phi }p_k'(w) \right) , \end{aligned}
(47)

and higher order derivatives can be derived recursively in a similar manner. Note that since the collocation points $$x_{k,N}$$ are in the interior of $$\mathrm {supp}(w)$$, $$\phi (x_{k,N}) \ne 0$$ and hence (47) is well defined at the collocation points.

#### 4.2.1 Example 1: Elliptic Integral

The elliptic integral

\begin{aligned} \int _{-1}^{1}\frac{\mathrm {d}x}{\sqrt{(x+1+\epsilon )(x+2)(x+3)}}, \quad \epsilon > 0, \end{aligned}

which can be expressed in terms of $$F(\alpha ,k)$$, Legendre’s incomplete integral of the first kind [11, Ch. 19], is the solution to the differential equation

\begin{aligned} y \frac{\mathrm {d}}{\mathrm {d}x} u(x,y) = 1, \quad x \in [-1, 1], \quad y^2 = \phi (x) = (x+1+\epsilon )(x+2)(x+3), \end{aligned}
(48)

subject to $$u(-1,\sqrt{\phi (-1)}) = 0$$ and evaluated at $$(x,y) = (1,\sqrt{\phi (1)})$$. For $$\epsilon = 0$$, the integral can be computed efficiently with Gauss–Jacobi quadrature because the singularity of the integrand at $$x = -1$$ is incorporated into the weight and the remainder of the integrand is analytic on $$[-1, 1]$$. If the singularity is close to $$-1$$, i.e., for $$0 < \epsilon \ll 1$$, Gauss–Jacobi quadrature is expensive because one needs a high degree polynomial to resolve the nearly singular integrand. By solving the differential equation on the curve $$y^2 = \phi$$, the computational cost of computing the integral is essentially independent of $$\epsilon$$ because the coefficients of the differential equation are polynomials (and hence analytic) on the curve for all $$\epsilon \ge 0$$. Figure 4 illustrates a solution to (48) which is accurate to 15 digits.

#### 4.2.2 Example 2: Variable Coefficient, Singular Differential Equation

The function

\begin{aligned} f(x) = \sin \left( c_1x + c_2x \sqrt{(1-x^2)(2-x)}\right) , \quad x \in [-1, 1], \end{aligned}

has square-root singularities at $$x = \pm 1$$. On the cubic curve

\begin{aligned} {\gamma }= \left\{ (x,y) : x\in [-1, 1], y^2 = \phi (x) = (1 - x^2)(2 - x) \right\} , \end{aligned}

the function becomes

\begin{aligned} f(x) = u(x,y) = \sin (c_1x + c_2x y), \end{aligned}
(49)

and satisfies a second-order equation of the form (44) with

\begin{aligned} \begin{aligned} y\phi a_2(x,y)&= \frac{c_2 x}{2}\phi \phi ' + c_2 \phi ^2 + y c_1 \phi \in \varPi _6({\gamma }), \\ y\phi a_1(x,y)&= -y\phi \left( \partial _x + \frac{\phi '}{2y} \partial _y\right) a_2(x,y) \in \varPi _5({\gamma }), \\ y\phi a_0(x,y)&= y\phi a_2^3(x,y) \in \varPi _{9}({\gamma }). \end{aligned} \end{aligned}
(50)

Figure 5 shows f(x) and the accuracy of the approximate solutions obtained by solving the differential equation, subject to Dirichlet boundary conditions, with a collocation method using two orthogonal bases (one in the inner product space defined by $${\langle }\cdot , \cdot {\rangle }_{{\gamma },w}$$ and the other in the space defined by $$[\cdot , \cdot ]_{{\gamma },w}$$). The accuracy obtained with both bases are comparable and roughly four digits of accuracy are lost, most likely due to the large condition numbers of the matrices that arise in the collocation methods. The coefficients decay super-exponentially because the solution is an entire function of x and y on the $${\gamma }$$. By contrast, a conventional spectral method using an orthogonal basis on $$[-1, 1]$$ could only achieve algebraic convergence to the solution because of its singularities at $$x = \pm 1$$.

## 5 Conclusion

We have constructed orthogonal polynomials on cubic curves and demonstrated that they can be used for function approximation and solving differential equations. There are some clear questions left to explore:

1. 1.

Higher order algebraic curves. In the case where there is symmetry upon reflection across the x axis we may be able to reduce to one-dimensional orthogonal polynomials, but a general construction is as-of-yet unclear.

2. 2.

Applications to partial differential equations. We mention that the construction of OPs on quadratic curves in [16, 17] led to numerical methods for partial differential equations on non-standard disk-slices and trapeziums in [21] and explicit formulæ for inverting wave operators on a cone [18]. This suggests that the OPs on cubic curves introduced here may be applicable to solving partial differential equations whose boundaries are defined in terms of a cubic curves.