1 Introduction

In 1975, Koornwinder described a general procedure for constructing multivariate orthogonal polynomials from univariate ones [5, §3.7.2]. The procedure allows for the construction of seven classes of bivariate orthogonal polynomials from Jacobi polynomials, some of which were previously known [11]. In this paper, we consider a four-parameter variant of Koornwinder’s class IV polynomials (the four-parameter variant was not constructed by Koornwinder) defined as [2]

(1)

where a, b, c > −1, n and k are integers such that n ≥ k ≥ 0, is the Jacobi polynomial of degree k [9, Table 18.3.1], and is the Jacobi polynomial of degree k shifted to have support on (0, 1). Koornwinder’s construction derives the polynomials with d = 0, which we denote by . The polynomials in (1) are orthogonal on the right-angled triangle {(x, y): 0 < x < 1, 0 < y < 1 − x} with respect to the weight function w a,b,c,d(x, y) = x a y b(1 − x − y)c(1 − x)d.

The basis has been used extensively by the spectral element community, see the overview in [4]. The recurrence relations we derive can be employed to reduce partial differential operators to sparse matrices, enabling efficient solution of linear partial differential equations defined on triangles, which will be the topic of a future paper. This is analogous to the ultraspherical spectral method for solving ordinary differential equations on bounded intervals [10]. A similar idea using a hierarchy of Zernike polynomials, which are bivariate orthogonal polynomials on the unit disk, is used in [15] to develop a sparse spectral method for solving partial differential equations defined on the disk [15]. On the disk, polar coordinates allow for radially symmetric partial differential operators to be reduced to ordinary differential operators acting on Jacobi polynomials [15]. This simplification does not translate to non-radially symmetric partial differential operators on the disk, nor partial differential operators on the triangle.

Several of the formulae in this paper have already be derived by directly employing recurrence relations satisfied by Jacobi polynomials [16]. Our approach via ladder operators is a more systematic study that derives previously unreported recurrence relations for . We also hope to use ladder operators to derive sparse recurrence relations for multivariate orthogonal polynomials built from Jacobi polynomials on higher-dimensional simplices.

Throughout this paper, the recurrence relations hold for choices of the parameters n, k, a, b, c, and d that make the Jacobi polynomials well-defined. Moreover, we take . Also, note that orthogonal polynomials remain orthogonal after an affine transformation so the recurrence relations in this paper for (1) on a right-angled triangle can be extended to any triangle, including triangles with the corners permuted.

The paper is structured as follows. In the next section, we give 12 ladder operators for Jacobi polynomials and use them to derive sparse recurrence relations for . In Sect. 3 we give 24 ladder operators for (1) and write down the corresponding sparse recurrence relations for . In Sect. 4, we use the ladder operators to derive a collection of sparse recurrence relations for differentiation, conversion, and multiplication that are satisfied by . Section 5 applies these sparse recurrence relations to efficiently calculating Laplacians of functions on the triangle.

2 Ladder Operators for Jacobi Polynomials

We give 12 ordinary differential operators that increment or decrement the parameters and degree of Jacobi polynomials by zero or one. Each ladder operator maps to , where \(|\tilde {n} - n|\leq 1\), \(|\tilde {a} - a|\leq 1\), and \(|\tilde {b} - b|\leq 1\).

Definition 1

The following operators are ladder operators for Jacobi polynomials:

$$\displaystyle \begin{aligned}\begin{aligned} {\mathcal{L}}_{1}u &= \tfrac{du}{dx} &\\ {\mathcal{L}}_{1}^{\dagger} u & = ((1+x)a - (1-x) b)u - (1-x^2) \tfrac{du}{dx} &\\ {\mathcal{L}}_{2}u &= (a+b+n+1)u + (1+x)\tfrac{du}{dx} &\\ {\mathcal{L}}_{2}^{\dagger} u & = (2a + (1-x) n)u-(1-x^2)\tfrac{du}{dx} &\\ {\mathcal{L}}_{3}u &= (a+b+n+1)u-(1-x)\tfrac{du}{dx} &\\ {\mathcal{L}}_{3}^{\dagger} u &= (2b+(1+x)n)u+(1-x^2)\tfrac{du}{dx} &\\ {\mathcal{L}}_{4}u &= ((1+x)a-(1-x)(b+n+1))u-(1-x^2)\tfrac{du}{dx} &{\mathcal{L}}_{4}^{\dagger} u &=-nu+(1+x)\tfrac{du}{dx} \\ {\mathcal{L}}_{5}u& = ((1+x)(a+n+1)-(1-x)b)u-(1-x^2)\tfrac{du}{dx}&{\mathcal{L}}_{5}^{\dagger} u&=nu+(1-x)\tfrac{du}{dx} \\ {\mathcal{L}}_{6}u&=bu+(1+x)\tfrac{du}{dx} & {\mathcal{L}}_{6}^{\dagger} u&=au-(1-x)\tfrac{du}{dx}. \end{aligned} \end{aligned} $$

The notation for the ladder operators is chosen so that \({\mathcal {L}}_{s}^{\dagger }{\mathcal {L}}_{s} P_n^{(a,b)}\) and \({\mathcal {L}}_{s}{\mathcal {L}}_{s}^{\dagger } P_n^{(a,b)}\) are scalar multiples of for 1 ≤ s ≤ 6. These ladder operators are carefully constructed to give rise to sparse recurrence relations for Jacobi polynomials.

Lemma 1

The ladder operators give sparse recurrence relations for Jacobi polynomials:

$$\displaystyle \begin{aligned}\begin{aligned} {\mathcal{L}}_{1} P_n^{(a,b)} &= \tfrac{1}{2}(n+a+b+1) P_{n-1}^{(a+1,b+1)} & {\mathcal{L}}_{1}^{\dagger} P_n^{(a,b)} &= 2(n+1) P_{n+1}^{(a-1,b-1)} \\ {\mathcal{L}}_{2} P_n^{(a,b)} &= (n+a+b+1) P_{n}^{(a+1,b)} & {\mathcal{L}}_{2}^{\dagger} P_n^{(a,b)} &= 2(n+a) P_{n}^{(a-1,b)}\\ {\mathcal{L}}_{3} P_n^{(a,b)} &= (n+a+b+1) P_{n}^{(a,b+1)} & {\mathcal{L}}_{3}^{\dagger} P_n^{(a,b)} &= 2(n+b) P_{n}^{(a,b-1)}\\ {\mathcal{L}}_{4} P_n^{(a,b)} &= 2(n+1) P_{n+1}^{(a-1,b)} & {\mathcal{L}}_{4}^{\dagger} P_n^{(a,b)}&= (n+b) P_{n-1}^{(a+1,b)}\\ {\mathcal{L}}_{5} P_n^{(a,b)} &= 2(n+1) P_{n+1}^{(a,b-1)} & {\mathcal{L}}_{5}^{\dagger} P_n^{(a,b)} &= (n+a) P_{n-1}^{(a,b+1)}\\ {\mathcal{L}}_{6} P_n^{(a,b)} &= (n+b) P_{n}^{(a+1,b-1)} & {\mathcal{L}}_{6}^{\dagger} P_n^{(a,b)}& = (n+a) P_{n}^{(a-1,b+1)}. \end{aligned} \end{aligned} $$

Proof

The relationship for \({\mathcal {L}}_{1}\) is a formula for the derivative of [9, 18.9.15] and relationship \({\mathcal {L}}_{1}^{\dagger }\) is equivalent to [9, 18.9.16]. Six more follow from expressing the left- and right-hand sides in terms of 2 F 1 functions using [9, 18.5.7] and the reflection formula \(P_n^{(a,b)}(x) = (-1)^n P_n^{(b,a)}(-x)\): \({\mathcal {L}}_{4}^{\dagger }\) and \({\mathcal {L}}_{4}^{\dagger }\) are equivalent to [9, 15.5.3], \({\mathcal {L}}_{6}^{\dagger }\) is equivalent to [9, 15.5.4], \({\mathcal {L}}_{4}\) and \({\mathcal {L}}_{5}\) are equivalent to [9, 15.5.5], and \({\mathcal {L}}_{6}\) is equivalent to [9, 15.5.6].

The relationship for \({\mathcal {L}}_{2}\) follows from combining [9, 18.9.5] and [9, 18.9.6]. The relationships for \({\mathcal {L}}_{2}^{\dagger }\) follows by writing

$$\displaystyle \begin{aligned}{\mathcal{L}}_{2}^{\dagger} = {\mathcal{L}}_{1}^{\dagger} + (n+a+b) (1-x) \end{aligned}$$

and then using [9, 18.9.5] and [9, 18.9.6]. Finally, \({\mathcal {L}}_{3}\) and \({\mathcal {L}}_{3}^{\dagger }\) follow just as \({\mathcal {L}}_{2}\) and \({\mathcal {L}}_{2}^{\dagger }\), using the reflection formula.

Remark 1

We note that the first-order differential operators occurring in Lemma 1 form together an action of the Lie algebra sl(4) [1, 7, 8].

Figure 1 illustrates the ladder operators and how they increment or decrement the parameters associated to a Jacobi polynomial.

Fig. 1
figure 1

Illustration of the 12 ladder operators for Jacobi polynomials in Definition 1

The ladder operators can be easily adapted to the shifted Jacobi polynomials, denoted by \(\tilde {P}_k^{(a,b)}\), which are supported on (0, 1), with x in place of 1 + x, and no factors of 2. The corresponding recurrence relations for \(\tilde {P}_k^{(a,b)}\) are the same as in Lemma 1, except the multiplicative factors of \(\tfrac {1}{2}\) and 2 are replaced by 1.

3 Ladder Operators for

The 12 ladder operators for the Jacobi polynomials in Sect. 2 allow us to derive 24 ladder operators for . The ladder operators are carefully defined so that they map to a scalar multiple of , where the new parameters in are n, k, a, b, c or d, respectively, incremented or decremented by 0 or 1.

To highlight the symmetries of the right-angled triangle and make the recurrences more convenient to write down, we define

$$\displaystyle \begin{aligned}z := 1-x-y \qquad \mbox{and}\qquad \tfrac{\partial}{\partial z} := \tfrac{\partial}{\partial y} - \tfrac{\partial}{\partial x}, \end{aligned}$$

as in [16]. Now, the variables x, y, and z have the convenient property that any affine transformation that maps the triangle onto itself has the effect of exchanging the roles of x, y, and z.

Definition 2

The following operators are ladder operators for . The first set of 12 are:

$$\displaystyle \begin{aligned}\begin{aligned} {\mathcal{M}}_{0,1}u& = \tfrac{\partial u}{\partial y} & {\mathcal{M}}_{0,1}^{\dagger} u &= (y c - z b)u - y z\tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{0,2}u &=(k+b+c+1)u+y\tfrac{\partial u}{\partial y} & {\mathcal{M}}_{0,2}^{\dagger} u &= \left(c+k-\tfrac{y k}{1-x}\right)u - \tfrac{y}{1-x} z \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{0,3}u &=(k+b+c+1)u-x\tfrac{\partial u}{\partial y} & {\mathcal{M}}_{0,3}^{\dagger} u&=\left(b+\tfrac{k y}{1-x}\right)u + \tfrac{y}{1-x} z \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{0,4}u &= (y c - z (b + k + 1))u - yz \tfrac{\partial u}{\partial y} & {\mathcal{M}}_{0,4}^{\dagger} u &=-\tfrac{k}{1-x}u + \tfrac{y}{1-x} \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{0,5}u&= (y (c + k + 1))u - z b - yz \tfrac{\partial u}{\partial y} & {\mathcal{M}}_{0,5}^{\dagger} u&= \tfrac{k}{1-x}u + \left(1-\tfrac{y}{1-x}\right) \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{0,6}u & = cu-z \tfrac{\partial u}{\partial y} & {\mathcal{M}}_{0,6}^{\dagger} u& = bu+y\tfrac{\partial u}{\partial y}. \end{aligned} \end{aligned} $$

The second set of 12 are:

$$\displaystyle \begin{aligned}\begin{aligned} {\mathcal{M}}_{1,0}u &= \tfrac{k}{1-x}u + \tfrac{\partial u}{\partial x} -\tfrac{y}{1-x} \tfrac{\partial u}{\partial y}, \\ {\mathcal{M}}_{1,0}^{\dagger} u & = (x (k + a + b + c + d + 1) - a)u- x (1 - x) \tfrac{\partial u}{\partial x}+ x y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{2,0}u &= (n+ k + a + b + c + d + 2)u + \tfrac{x k}{1-x}u + x \tfrac{\partial u}{\partial x} - \tfrac{x y}{1 - x} \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{2,0}^{\dagger} u & = (n + k + b + c + d + 1 - x n)u - x (1 - x) \tfrac{\partial u}{\partial x}+ x y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{3,0}u &= (n+a+b+c+d+2)u-(1-x) \tfrac{\partial u}{\partial x} + y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{3,0}^{\dagger} u &= (a+xn)u+x(1-x)\tfrac{\partial u}{\partial x} -x y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{4,0}u &= (x (n + a + b + c + d + 2) - a - n + k - 1)u - x (1 - x) \tfrac{\partial u}{\partial x}+ x y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{4,0}^{\dagger} u &=\tfrac{k}{1-x}u - nu + x \tfrac{\partial u}{\partial x} - \tfrac{x y}{1-x}\tfrac{\partial u}{\partial y}, \qquad {\mathcal{M}}_{5,0}u = nu+(1-x) \tfrac{\partial u}{\partial x}- y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{5,0}^{\dagger} u &= x(n+a+b+c+d+2)u-au-x(1-x) \tfrac{\partial u}{\partial x} +x y \tfrac{\partial u}{\partial y} \\ {\mathcal{M}}_{6,0}u &= au+\tfrac{x k}{1-x}u + x \tfrac{\partial u}{\partial x} - \tfrac{xy}{1-x} \tfrac{\partial u}{\partial y} ,\\ {\mathcal{M}}_{6,0}^{\dagger} u &= (k+b+c+d+1)u-(1-x)\tfrac{\partial u}{\partial x} + y \tfrac{\partial u}{\partial y}. \end{aligned} \end{aligned} $$

The notation for the ladder operators is chosen so that the recurrence relations in Theorem 1 are derived for \({\mathcal {M}}_{s,0}\) (resp. \({\mathcal {M}}_{0,s}\)) by applying \({\mathcal {L}}_{s}\) or \({\mathcal {L}}_{s}^{\dagger }\) to the first (resp. second) Jacobi polynomial in for 1 ≤ s ≤ 6. Moreover, we know that , , , and are scalar multiples of for 1 ≤ s ≤ 6.

The ladder operators in Definition 2 correspond to 24 sparse recurrence relations for . To derive these recurrences, we first express the partial derivatives of as derivatives of shifted Jacobi polynomials.

Proposition 1

The following relationships hold:

(2)
(3)

Proof

The first relationship is immediate. The second relationship follows from the chain-rule:

$$\displaystyle \begin{aligned}(1-x) \tfrac{\partial}{\partial x} \left( f(x) (1-x)^k g\left(\tfrac{y}{1 - x}\right)\right) & = f'(x) (1-x)^{k+1} g\left(\tfrac{y}{1 - x}\right)\\ &\quad -k f(x) (1-x)^k g(x) + y f(x) (1-x)^{k-1} g'\left(\tfrac{y}{1 - x}\right) \end{aligned} $$

and an application of (2) to simplify the last term.

The 24 sparse recurrence relations for are given in the following theorem.

Theorem 1

Let t = a + b + c + d. The first set of 12 are:

The second set of 12 are:

Proof

We present the proof of . By the definition of in (1), the chain rule, and the relationship in (2), we have

$$\displaystyle \begin{aligned} \begin{aligned} \tfrac{\partial}{\partial y} P_{n,k}^{(a,b,c,d)}(x,y) &= \tilde P_{n-k}^{(2k+b+c+d+1,a)}(x)(1-x)^{k-1} [\tilde P_k^{(c,b)}]'\left(\tfrac{y}{1-x}\right)\\ & = (k+c+b+1) \tilde P_{n-k}^{(2k+b+c+d+1,a)}(x)(1-x)^{k-1} \tilde P_{k-1}^{(c+1,b+1)}\left(\tfrac{y}{1-x}\right), \end{aligned} {} \end{aligned} $$
(4)

where the last equality comes from applying \({\mathcal {L}}_{1}\) in Definition 1. The final expression in (4) is equivalent to . The manipulations for the remaining recurrence relations are similar, except with different choices of the operators \({\mathcal {L}}_{s}\) or \({\mathcal {L}}_{s}^{\dagger }\) and combinations of (2) and (3).

4 Sparse Recurrence Relations for

We can combine the ladder operators in Sect. 3 to derive sparse recurrence relations between polynomials with different parameters and their partial derivatives. These recurrence relations are analogous to many of the sparse recurrence relations for Jacobi polynomials [9, §18.9].

4.1 Differentiation

The partial derivatives of can be written in terms of Jacobi polynomials on the triangle with incremented parameters, which is analogous to a recurrence relation for the derivative of a Jacobi polynomial [9, 18.9.15]. A similar recurrence for can be found in [16, Prop. 4.6, 4.7, & 4.8].

Corollary 1

The following recurrence relations hold:

(5)
(6)
(7)

Proof

The recurrence (5) follows from the fact that \(({\mathcal {M}}_{1,0}{\mathcal {M}}_{0,2} + {\mathcal {M}}_{0,4}^{\dagger }{\mathcal {M}}_{6,0}^{\dagger })u = (2k+b+c+1) \tfrac {\partial u}{\partial x}\) when d = 0. The relationship (6) is equivalent to the relation given by \({\mathcal {M}}_{0,1}\) in Theorem 1 when d = 0. Finally, (7) follows from the fact that \(({\mathcal {M}}_{1,0}{\mathcal {M}}_{0,3} - {\mathcal {M}}_{0,5}^{\dagger }{\mathcal {M}}_{6,0}^{\dagger })u = -(2k+b+c+1) \tfrac {\partial u}{\partial z}\).

The derivatives of weighted versions of also satisfy sparse recurrence relations, which are analogous to an expression for the derivative of a weighted Jacobi polynomial [9, 18.9.16].

Corollary 2

The following recurrence relations hold:

Proof

The first recurrence follows from

$$\displaystyle \begin{aligned}\begin{aligned} ({\mathcal{M}}_{0,2}^{\dagger}{\mathcal{M}}_{1,0}^{\dagger} + {\mathcal{M}}_{0,4}{\mathcal{M}}_{6,0})u &= (2k+b+c+1)(cx -a z -xz \tfrac{\partial}{\partial x})u \\ &= - (2k+b+c+1) x^{1-a} z^{1-c} \tfrac{\partial}{\partial x}(x^a z^c u). \end{aligned} \end{aligned}$$

The second recurrence holds since

$$\displaystyle \begin{aligned}{\mathcal{M}}_{0,1}^{\dagger} u = (cy -b z-y z \tfrac{\partial}{\partial y})u = -y^{1-b} z^{1-c} \tfrac{\partial}{\partial x}(y^b z^c u). \end{aligned}$$

The third recurrence is derived from the fact that

$$\displaystyle \begin{aligned}\begin{aligned} ({\mathcal{M}}_{0,3}^{\dagger}{\mathcal{M}}_{1,0}^{\dagger} - {\mathcal{M}}_{0,5}{\mathcal{M}}_{6,0})u &= (2k+b+c+1)(bx - a y + x y (\tfrac{\partial}{\partial y} - \tfrac{\partial}{\partial x}))u\\ &= (2k+b+c+1) x^{1-a} y^{1-b} z^{-c} \tfrac{\partial}{\partial z}(x^a y^b z^c u). \end{aligned} \end{aligned}$$

4.2 Conversion

Recurrence relations for conversion allow us to express in terms of Jacobi polynomials on the triangle with different parameters. Here, we give the recurrence relations that increment the parameters, which are analogues of [9, 18.9.3]. Similar relations can be found in [16, Prop. 4.4].

Corollary 3

The following recurrence relations hold:

(8)
(9)
(10)

Proof

The recurrence relation in (8) follows from the fact that \(({\mathcal {M}}_{30} + {\mathcal {M}}_{50})u = (2n+a+b+c+2)u\) when d = 0. Since \(({\mathcal {M}}_{2,0} - {\mathcal {M}}_{4,0}^{\dagger })u = (2n+a+b+c+d+2)u\) and \(({\mathcal {M}}_{2,0}^{\dagger }-{\mathcal {M}}_{4,0})u = (2n+a+b+c+d+2)(1-x)u\), we obtain

$$\displaystyle \begin{aligned}({\mathcal{M}}_{0,2}{\mathcal{M}}_{2,0} - {\mathcal{M}}_{0,2}{\mathcal{M}}_{4,0}^{\dagger} - {\mathcal{M}}_{0,4}^{\dagger}{\mathcal{M}}_{2,0}^{\dagger} +{\mathcal{M}}_{0,4}^{\dagger}{\mathcal{M}}_{4,0})u = (2k+b+c+1)(2n+a+b+c+d+2)u, \end{aligned}$$

The recurrence relation (10) immediately follows. Similarly, (9) holds since

$$\displaystyle \begin{aligned}({\mathcal{M}}_{0,3}{\mathcal{M}}_{2,0} - {\mathcal{M}}_{0,3}{\mathcal{M}}_{4,0}^{\dagger} +{\mathcal{M}}_{0,5}^{\dagger}{\mathcal{M}}_{2,0}^{\dagger} - {\mathcal{M}}_{0,5}^{\dagger}{\mathcal{M}}_{4,0})u = (2k+b+c+1)(2n+a+b+c+d+2)u. \end{aligned}$$

4.3 Multiplication

Recurrence relations for multiplication allow one to express , , and in terms of a sum of Jacobi polynomials on the triangle with potentially different parameters. The recurrences in Corollary 4 are analogous to the recurrence relations for found in [9, 18.9.6].

Corollary 4

The following recurrence relations hold:

(11)
(12)
(13)

Proof

The recurrence relation in (11) follows from the fact that \(({\mathcal {M}}_{3,0}^{\dagger } + {\mathcal {M}}_{5,0}^{\dagger })u = (2n+a+b+c+d+2) x u\). Since

$$\displaystyle \begin{aligned} ({\mathcal{M}}_{03}^{\dagger}{\mathcal{M}}_{20}^{\dagger} - {\mathcal{M}}_{03}^{\dagger}{\mathcal{M}}_{40} +{\mathcal{M}}_{05}{\mathcal{M}}_{20} - {\mathcal{M}}_{05}{\mathcal{M}}_{40}^{\dagger})u = (2k+b+c+1)(2n+a+b+c+d+2) yu \end{aligned}$$

holds, we find that (??) is satisfied. Finally, (??) follows from

$$\displaystyle \begin{aligned}({\mathcal{M}}_{02}^{\dagger}{\mathcal{M}}_{20}^{\dagger} - {\mathcal{M}}_{02}^{\dagger}{\mathcal{M}}_{40} +{\mathcal{M}}_{04}{\mathcal{M}}_{40}^{\dagger} - {\mathcal{M}}_{04}{\mathcal{M}}_{20})u = (2k+b+c+1)(2n+a+b+c+d+2) zu. \end{aligned}$$

Combining the recurrence relations in Corollaries 3 and 4, we can derive expressions for , , and in terms of a sum of Jacobi polynomials on the triangle with parameters (a, b, c). These are analogous to the three-term recurrence relation for Jacobi polynomials [9, 18.9.2]. Since these recurrence relations are long, we refer the reader to [2, pp. 80–81].

4.4 Differential Eigenvalue Problems

The polynomials are eigenfunctions for second-order differential operators (see [2, (5.3.4)] and [16, Prop. 4.11]), and the ladder operators in Sect. 3 make it easy to derive this fact.

Theorem 2

The polynomial satisfies two second-order differential eigenproblems:

and

Proof

The first equation follows from

and the second from

5 Application: Calculating Laplacians

We can use the recurrence relationships in this paper to calculate partial derivatives too. Slevinsky’s fast triangle transform [13] (which builds on his fast spherical harmonic transform [12]) as implemented in the FastTransform multithreaded C code [14] gives an efficient and stable routine for calculating the expansion coefficients on the triangle in \(O(d^2 \log ^2 d)\) operations, where d is the polynomial degree. The partial derivative recurrences (see Corollary 1) show us how to calculate the expansion coefficients of \(\partial p \over \partial x\) and \(\partial p \over \partial y\) with coefficients associated to the parameters (a + 1, b, c + 1) and (a, b + 1, c + 1), respectively. Moreover, Corollary 3 informs us how to convert from expansions with parameters (a, b, c) to (a + 1, b, c), (a, b + 1, c) and (a, b, c + 1). We can combine these various recurrences relations to compute the coefficients of the Laplacian in the basis \(P_{n,k}^{(2,2,2)}\) in an optimal complexity of O(N) = O(d 2) operations, where d is the polynomial degree and N = d(d + 1)∕2 is the total number of degrees of freedom.

Fig. 2
figure 2

Left: Error when evaluating the Laplacian of \(f(x,y) = \cos {}(n x y/40)\) at (x, y) = (0.1, 0.2) by expanding in degree N = (n + 1)(n + 2)∕2 Jacobi polynomials on the triangle with (a, b, c) = (0, 0, 0) and using the recurrences. Right: Execution times of (1) the fast transform, (2) constructing the recurrences as 8 banded-block-banded matrices, and (3) applying the matrices

For example, the Laplacian of \(f(x,y) = \cos {}(n x y/40)\) can be computed by first approximating f on the unit right-angled triangle to within machine precision by a polynomial, and then employing various recurrence relationships to calculate its Laplacian. To do this efficiently, we store the recurrence relations as banded-block-banded matrices to take advantage of fast banded matrix-vector multiplication.

6 Conclusion

We introduce ladder operators for systematically deriving sparse recurrence relations for differentiation, conversion, and multiplication of Jacobi and orthogonal polynomials on the triangle. We use these recurrences to efficiently apply partial differential operators, in particular for calculating Laplacians (Fig. 2). The importance of these relationships is that they allow general linear partial differential operators with polynomial coefficients to be represented as sparse operators acting on orthogonal polynomial expansions. This application will be the topic of a subsequent paper.