Differentiation matrices in polynomial bases

Explicit differentiation matrices in various polynomial bases are presented in this work. The idea is to avoid any change of basis in the process of polynomial differentiation. This article concerns both degree-graded polynomial bases such as orthogonal bases, and non-de-gree-graded polynomial bases including the Lagrange and Bernstein bases.


Introduction
Consider a scalar (complex) polynomial P(x) of degree n and a basis given by fB 0 ðxÞ; B 1 ðxÞ; . . .; B nÀ1 ðxÞ; B n ðxÞg. This basis determines the representation PðxÞ ¼ P n j¼0 a j B j ðxÞ, where a j 2 C and, regardless of the basis, the coefficient of x n in the expression is nonzero. Alternatively, this polynomial can be written as where I is the unit matrix of size n þ 1. We want to find a matrix D, the differentiation matrix, of size n þ 1 such that the kth order derivative of P(x), shown by d k PðxÞ dx k or P ðkÞ ðxÞ, can be written as For a polynomial of degree n, D has to be a nilpotent matrix of degree n þ 1. D has a well-known structure and can be easily found for the monomial basis. For convenience, let us assume n ¼ 5 and the generalizations for all positive n will be clear. If  2   6  6  6  6  6  6  6  6  4   3   7  7  7  7  7  7  7  7  5 : ð1:4Þ Differentiation in bases other than the monomial basis has been occasionally studied. One of the most important applications of polynomial differentiation in other bases is in spectral methods like collocation method [14]. Differentiation matrices for Chebyshev and Jacobi polynomials were computed [13]. The differentiation of Jacobi polynomials through Bernstein basis was studied [12]. Chirikalov [2] computed the differentiation matrix for the Hermite basis.
In this paper, we present explicit formulas for D in different polynomial bases. Constructing D is fairly straightforward and having D, we can easily find derivatives of higher order by raising D to higher powers accordingly. Another important advantage of having a formula for D in a basis is that we do not need to change the basis-often to the monomial basis-to differentiate P(x). Conversion between bases has been exhaustively studied in [6], but it can be unstable [8].
Section ''Degree-graded bases'' of this paper considers degree-graded bases and finds D in general for them. Orthogonal bases are all among degree-graded bases. Section ''Degree-graded bases'' then discusses other important special cases such as the monomial and Newton bases as well as the Hermite basis. Section ''Bernstein basis'' and ''Lagrange basis'' concern the Bernstein and Lagrange bases, respectively, and find D for them.
The Bernstein (Bézier) basis and the Lagrange basis are most useful in computer-aided geometric design (see [5], for example). For some problems in partial differential equations with symmetries in the boundary conditions Legendre polynomials can be successfully used the most natural. Finally, in approximation theory, Chebyshev polynomials have a special place due to their minimumnorm property (see e.g., [11]).

Degree-graded bases
Real polynomials f/ n ðxÞg 1 n¼0 with / n ðxÞ of degree n which are orthonormal on an interval of the real line (with respect to some nonnegative weight function) necessarily satisfy a three-term recurrence relation (see Chapter 10 of [3], for example). These relations can be written in the form where the a j ; b j ; c j are real, a j 6 ¼ 0, / À1 ðxÞ 0, / 0 ðxÞ 1. The choices of coefficients a j ; b j ; c j defining three wellknown sets of orthogonal polynomials (associated with the names of Chebyshev and Legendre) are summarized in Table 1.
Orthogonal polynomials have well-established significance in mathematical physics and numerical analysis (see e.g., [7]). More generally, any sequence of polynomials f/ j ðxÞg 1 j¼0 with / j ðxÞ of degree j is said to be degreegraded and obviously forms a linearly independent set; but is not necessarily orthogonal.
A scalar polynomial of degree n can now be written in terms of a set of degree-graded polynomials PðxÞ ¼ P n j¼0 a j / j ðxÞ, where a j 2 C and a n 6 ¼ 0. We can then write ð2nÞ! 2 n ðn!Þ 2 2 n a n 1 for n ¼ 0; 1 2 otherwise nþ1 2nþ1 Q is a size n lower triangular matrix that has the following structure for i ¼ 1; . . .; n.
Any entry, q, with a negative or zero index is set to 0 in the above formula.

ð2:6Þ
We can write this equation in a matrix-vector form. Without loss of generality, we assume n ¼ 4.   Since a i 6 ¼ 0, H À1 exists and is a lower triangular matrix that has the following row structure in general for  : ð2:13Þ Using these results, we can write the first derivative of a generic first kind Chebyshev polynomial of degree 4 (see Table 1 Special degree-graded bases As mentioned above, the family of degree-graded polynomials with recurrence relations of the form (2.1) include all the orthogonal bases, but are not limited to them. Here, we discuss some of the famous non-orthogonal bases of this kind and, consequently, for which we find the differentiation matrix, D, formulas. In particular, if in (2.1), we let a j ¼ 1 and b j ¼ c j ¼ 0, it will become the monomial basis. Using (2.4) and (2.5), we can easily verify that in this case, D has a form like (1.4).
Another important basis of this kind is the Newton basis. Let a polynomial P(x) be specified by the data f z j ; where the z j s are distinct. If the ''Newton polynomials'' are defined by setting N 0 ðxÞ ¼ 1 and, for k ¼ 1; . . .; n; ðx À z j Þ; ð2:17Þ then PðxÞ ¼ a 0 a 1 . . . a nÀ1 a n ½ I where we have ½P j ¼ P j , and ½P i ; . . .; P iþj ¼ ½P iþ1 ; . . .; P iþj À ½P i ; . . .; P iþjÀ1 z iþj À z i : ð2:20Þ If in (2.1), we let a j ¼ 1, b j ¼ z j and c j ¼ 0, it will become the Newton basis. For n ¼ 4, D, as given by (2.4), has the following form. The confluent case Suppose that a polynomial P(x) of degree n as well as its derivatives are sampled at k nodes, i.e., distinct (finite) points z 0 ; z 1 ; . . .; z kÀ1 . We write P j :¼ Pðz j Þ; P 0 j :¼ P 0 ðz j Þ; . . .; P ðs j Þ j :¼ P ðs j Þ ðz j Þ; j ¼ 0; . . .; k À 1. Here s ¼ ðs 0 ; s 1 ; . . .; s kÀ1 Þ shows the confluencies (i.e., the orders of the derivatives) associated with the nodes and we have P kÀ1 i¼0 s i ¼ n þ 1 À k. If for j ¼ 0; . . .; k À 1, all s j ¼ 0, then k ¼ n þ 1 and we have the Lagrange interpolation. This is an interesting polynomial interpolation that deserves a better consideration: the ''Hermite interpolation'' (See e.g., [2,10]). It is basically similar to the Lagrange interpolation, but at each node, we have the value of P(x) as well as its derivatives up to a certain order. Now, we assume that at each node, z j , we have the value and the derivatives of P(x) up to the s j th order. The nodes at which the derivatives are given are treated as extra nodes. In fact we pretend that we have s j þ 1 nodes, z j , at which the value is P j and remember that P kÀ1 i¼0 s i ¼ n þ 1 À k. In fact, the first s 0 þ 1 nodes are z 0 , the next s 1 þ 1 nodes are z 1 and so on.
Using the divided differences technique, as given by (2.20), to find a j s, whenever we get ½P j ; P j ; . . .; P j where P j is repeated m times, we have ½P j ; P j ; . . .; P j ¼ P and all the values P 0 j to P ðs j Þ j for j ¼ 0; . . .; k À 1 are given. For more details see e.g., [10].
The bottom line is that the Hermite basis can be seen as a special case of the Newton basis, thus a degree-graded basis. For the Hermite basis, like the Newton basis, a j ¼ 1, b j ¼ z i , and c j ¼ 0, but some of the b j s are repeated. Other than that, the differentiation matrix, D, can be similarly found for the Hermite basis.
A polynomial P(x) written in the Bernstein basis is of the form PðxÞ ¼ a 0 a 1 . . . a nÀ1 a n ½ I where the a j s are sometimes called the Bézier coefficients (j ¼ 0; . . .; n). where D is a size n þ 1 tridiagonal matrix that has the following structure for i ¼ 1; . . .; n þ 1.
Proof A little computation using (3.1) shows that b 0 k ðxÞ ¼ k À 1 a À b b kÀ1 ðxÞ þ n À 2k a À b b k ðxÞ þ n À k a À b b kþ1 ðxÞ; ð3:5Þ Math Sci (2016) 10:47-53 51 for k ¼ 0; . . .; n. Any b i ðxÞ with either a negative or larger than n index is set to 0 in (3.5). This is why D is tridiagonal and form here, it is easy to derive (3.4) for D.
For n ¼ 4, the differentiation matrix is as follows.