A function is called D-finite if it satisfies an ordinary linear differential equation with polynomial coefficients,
A function is called algebraic if it satisfies a polynomial equation with polynomial coefficients,
It is well known  that when is D-finite and is algebraic, the composition is again D-finite. For the special case this reduces to Abel’s theorem, which says that every algebraic function is D-finite. This particular case was investigated closely in , where a collection of bounds was given for the orders and degrees of the differential equations satisfied by a given algebraic function. It was also pointed out in  that differential equations of higher order may have significantly lower degrees, an observation that gave rise to a more efficient algorithm for transforming an algebraic equation into a differential equation. Their observation has also motivated the study of order-degree curves: for a fixed D-finite function , these curves describe the boundary of the region of all pairs such that satisfies a differential equation of order and degree .
We have fixed some randomly chosen operator of order and degree and a random
Experiments suggested that order-degree curves are often just simple hyperbolas. A priori knowledge of these hyperbolas can be used to design efficient algorithms. For the case of creative telescoping of hyperexponential functions and hypergeometric terms, as well as for simple D-finite closure properties (addition, multiplication, Ore-action), bounds for order-degree curves have been derived [4, 3, 8]. However, it turned out that these bounds are often not tight.
A new approach to order-degree curves has been suggested in , where a connection was established between order-degree curves and apparent singularities. Using the main result of this paper, very accurate order-degree curves for a function can be written down in terms of the number and the cost of the apparent singularities of the minimal order annihilating operator for . However, when the task is to compute an annihilating operator from some other representation, e.g., a definite integral, then the information about the apparent singularities of the minimal order operator is only a posteriori knowledge. Therefore, in order to design efficient algorithms using the result of , we need to predict the singularity structure of the output operator in terms of the input data. This is the program for the present paper.
First (Section 2), we derive an order-degree bound for D-finite substitution using the classical approach of considering a suitable ansatz over the constant field, comparing coefficients, and balancing variables and equations in the resulting linear system. This leads to an order-degree curve which is not tight. Then (Section 3) we estimate the order and degree of the minimal order annihilating operator for the composition by generalizing the corresponding result of  from to arbitrary D-finite . The derivation of the bound is a bit more tricky in this more general situation, but once it is available, most of the subsequent algorithmic considerations of  generalize straightforwardly. Finally (Section 4) we turn to the analysis of the singularity structure, which indeed leads to much more accurate results. The derivation is also much more straightforward, except for the required justification of the desingularization cost. In practice, it is almost always equal to one, and although this is the value to be expected for generic input, it is surprisingly cumbersome to give a rigorous proof for this expectation.
Throughout the paper, we use the following conventions:
is a field of characteristic zero, is the usual commutative ring of univariate polynomials over . We write or for the commutative ring of bivariate polynomials and for the non-commutative ring of linear differential operators with polynomial coefficients. In this latter ring, the multiplication is governed by the commutation rule .
is an operator of order with polynomial coefficients of degree at most .
is a polynomial of degrees and . It is assumed that is square-free as an element of and that it has no divisors in , where is the algebraic closure of .
is an operator such that for every solution of and every solution of , the composition is a solution of . The expression can be understood either as a composition of analytic functions in the case , or in the following sense. We define such that for every , for every solution of and every solution of , annihilates , which is a well-defined element of . In the case these two definitions coincide.
2 Order-Degree-Curve by Linear Algebra
Let be a solution of , i.e., suppose that , and let be a solution of , i.e., suppose that . Expressions involving and can be manipulated according to the following three well-known observation:
(Reduction by ) For each polynomial with there exists a polynomial with and such that
The polynomial is the result of the first step of computing the pseudoremainder of by w.r.t. .
(Reduction by ) There exist polynomials of degree at most such that
To see this, write for some polynomials of degree at most . Then we have
By the assumptions on , the denominator cannot be zero. In other words, in . For each , consider an ansatz for polynomials of degrees at most and , respectively, and compare coefficients with respect to . This gives inhomogeneous linear systems over with variables and equations, which only differ in the inhomogeneous part but have the same matrix for every . The claim follows using Cramer’s rule, taking into account that the coefficient matrix of the system has many columns with polynomials of degree and many columns with polynomials of degree (which is also the degree of the inhomogeneous part). Note that does not depend on .
(Multiplication by ) For each polynomial with there exist polynomials of degree at most such that
where is the discriminant of . To see this, first apply Observation 1 (Reduction by ) to rewrite as for some of degree . Then consider an ansatz with unknown polynomials of degrees at most and , respectively, and compare coefficients with respect to . This gives an inhomogeneous linear system over with variables and equations. The claim then follows using Cramer’s rule.
This is evidently true for . Suppose it is true for some . Then
The first term in the summand expression already matches the claimed bound. To complete the proof, we show that
for some polynomials of degree at most . Indeed, the only critical term is . According to Observation 2, can be rewritten as for some of degree at most . This turns the left hand side of (1) into an expression of the form for some polynomials of degree at most . An -fold application of Observation 1 brings this expression to the form for some polynomials of degree at most . Now Observation 3 completes the induction argument.
Let be such that
Then there exists an operator of order and degree such that for every solution of and every solution of the composition is a solution of . In particular, there is an operator of order and degree .
Let be a solution of and be a solution of . Then we have and , and we seek an operator such that . Let and consider an ansatz
with undetermined coefficients .
Let be as in Lemma 2. Then applying to and multiplying by gives an expression of the form
where the are -linear combinations of the undetermined coefficients . Equating all the to zero leads to a linear system over with at most equations and exactly variables. This system has a nontrivial solution as soon as
The claim follows because .
3 A Degree Bound for the Minimal Operator
According to Theorem 3, there is operator of order and degree . Usually there is no operator of order less than , but if such an operator accidentally exists, Theorem 3 makes no statement about its degree. The result of the present section (Theorem 8 below) is a degree bound for the minimal order operator, which also applies when its order is less than , and which is better than the bound of Theorem 3 if the minimal order operator has order .
The following Lemma is a variant of Lemma 2 in which is allowed to appear in the denominator, and with exponents larger than . This allows us to keep the -degrees smaller.
Let be a solution of and be a solution of . For every , there exist polynomials for such that and for all , and
This is true for . Suppose it is true for some . Then
We consider the summands separately. In , is already a polynomial in and of bidegree at most . Since and is divisible by , is also a polynomial with the same bound for the bidegree.
Futhermore, we can write
where the expression in the parenthesis satisfies the stated bound.
Let be -linearly independent solutions of , and let be distinct solutions of . By we denote the -dimension of the -linear space spanned by for all and . The order of the operator annihilating is at least . We will construct an operator of order annihilating using Wronskian-type matrices.
There exists a matrix such that
the bidegree of every entry of the -th row of does not exceed and
if and only if the vector
if and only if the vectorlies in the column space of the matrix .
With the notation of Lemma 4, let be the matrix whose -th entry is . Then meets the stated degree bound.
By we denote the Wronskian matrix for . Then if and only if the vector lies in the column space of the matrix . Hence, it is sufficient to prove that and have the same column space. The following matrix equality follows from the definition of
The latter matrix is nondegenerate since it is a Wronskian matrix for the -linearly independent power series , …, with respect to the derivation . Hence, and have the same column space.
In order to express the above condition of lying in the column space in terms of vanishing of a single determinant, we want to “square” the matrix .
There exists a matrix such that the degree of every entry does not exceed and the matrix
has rank .
Let be the Vandermonde matrix for , and let
denote the identity matrix. Thenis nondegenerate and has the form , for some with entries of degree at most . Since is nondegenerate, we can choose rows which span a complimentary subspace to the row space of . Discarding all other rows from , we obtain with the desired properties.
By (, resp.) we will denote the matrix (, resp.) without the -th row.
For every the determinant of is divisible by
We show that is divisible by for every . Without loss of generality, it is sufficient to show this for and . We have
Since for every polynomial we have , every entry of the first columns in the above matrix is divisible by . Hence, the whole determinant is divisible by .
The minimal operator annihilating for every and such that and has order and degree at most
We construct using for . We consider some and by we denote the -dimensional vector . If , then the first rows of the matrix are linearly dependent, so it is degenerate. On the other hand, if this matrix is degenerate, then Lemma 6 implies that is a linear combination of the columns of , so Lemma 5 implies that . Hence . Due to Lemma 7, the latter condition is equivalent to , where . Thus we can take . It remains to bound the degrees of the coefficients of .
Since is symmetric with respect to , it can be written as an element of where is the -th elementary symmetric polynomial in , and the total degree of with respect to ’s does not exceed . Substituting with the corresponding coefficient of and clearing denominators, we obtain a polynomial in of degree at most .
Since the order of is equal to the dimension of the space of all compositions of the form , where and , is the minimal annihilating operator for this space.
Although the bound of Theorem 8 for beats the bound of Theorem 3 for by a factor of , it is apparently still not tight. Experiments we have conducted with random operators lead us to conjecture that in fact, at least generically, the minimal order operator of order has degree
. By interpolating the degrees of the operators we found in our computations, we obtain the expression in the following conjecture.
For every there exist and such that the corresponding minimal order operator has order and degree
and there do not exist and for which the corresponding minimal operator has order and larger degree.
4 Order-Degree-Curve by singularities
A singularity of the minimal operator is a root of its leading coefficient polynomial . In the notation and terminology of , a factor of this polynomial is called removable at cost if there exists an operator of order such that and . A factor is called removable if it is removable at some finite cost , and non-removable otherwise. The following theorem [7, Theorem 9] translates information about the removable singularities of a minimal operator into an order-degree curve.
Let , and let be pairwise coprime factors of which are removable at costs , respectively. Let and
where we use the notation . Then there exists an operator such that and and .
The order-degree curve of Theorem 11 is much more accurate than that of Theorem 3. However, the theorem depends on quantities that are not easily observable when only and are known. From Theorem 8 (or Conj. 10), we have a good bound for . In the the rest of the paper, we discuss bounds and plausible hypotheses for the degree and the cost of the removable factors. The following example shows how knowledge about the degree of the operator and the degree and cost of its removable singularities influence the curve.
The figure below compares the data of Example 1 with the curve obtained from Theorem 11 using , , , . This curve is labeled (a) below. Only for a few orders , the curve slightly overshoots. In contrast, the curve of Theorem 3, labeled (b) below, overshoots significantly and systematically.
The figure also illustrates how the parameters affect the accuracy of the estimate. The value is correctly predicted by Conjecture 10. If we use the more conservative estimate of Theorem 8, we get the curve (e). For curve (d) we have assumed a removability degree of , as predicted by Theorem 17 below, instead of the true value . For (c) we have assumed a removability cost instead of .
4.1 Degree of Removable Factors
Let be a polynomial with , and . Assume that is a root of of multiplicity . Then the squarefree part
of has degree at least .
Let be the Sylvester matrix for and with respect to . The value is of the form , where every has at least common columns with . Since , at least one of these matrices is nondegenerate. Hence, . On the other hand, is equal to the dimension of the space of pairs of polynomials such that and . Then is divisible by