I recently had to think a bit more deeply than is usually necessary about the nature of the higher-order terms in multivariate Taylor expansions of smooth functions of the form . The result was a realisation that the fundamental structure of these higher-order terms is actually quite simple and that working them out manually brings up some interesting combinatorial issues, including use of the *partition function* from advanced number theory. I want to record some of my thoughts about this here.

For a univariate function , Taylor’s theorem says that if is times differentiable at some point then there exists a function such that

where as . The -th order Taylor polynomial

then serves as an approximation to the function . If the function is infinitely many times differentiable, we can approximate to any desired level of accuracy by choosing the Taylor polynomial to be of high enough degree.

In the univariate case the -th order term in the Taylor polynomial is

In the present note I am interested in how this generalises to the multivariate case , where the Taylor expansion is about a vector . In the bivariate case , where the Taylor expansion is about the point , the -th order term in the Taylor expansion is given by the formula

This enables any higher-order term in the Taylor polynomial to be quickly obtained (and notice that the binomial coefficient values can be quickly read from the appropriate line of Pascal’s triangle). For example, the fourth-order term would be

In order to generalise this as easily as possible to multivariate cases with , I found it convenient to adopt the following notation:

and so on, and

Given the function , we allow the indices above to take values from to . To my surprise, I then realised that if we use the Einstein summation convention, it is possible to represent any Taylor expansion as

This generic formula will apply to any number of variables . Notice that the number of indices in each term corresponds to the order of that term. So, for example, the fifth-order term in the Taylor expansion will involve five indices, the sixth-order term will involve six indices, and so on.

To test out this formula, let us use it to work out the fourth-order term for the bivariate case again. The relevant term in the above form of the Taylor expansion is

Since each of the indices , , , will be allowed to take values or , the above expression represents a sum involving terms. In general, the -th order term in the Taylor expansion of a function will involve terms. The terms in the above case are

However, due to the equality of cross-partials involving the same index numbers, this reduces to

which matches what we previously obtained using the formula.

In a similar way, we could proceed to systematically calculate the fourth-order term in the trivariate case . The relevant term in the generic Taylor expansion is the same one as before, namely

However, since each of the indices will take values from to in the trivariate case, the above expression now represents a sum of terms. The terms are

Again due to equality of cross-partials involving the same index numbers, this reduces to

Note that the coefficient of each of the terms is the multinomial coefficient

where . This gives the number of ordered arrangements of objects in which there are objects of type , objects of type , , objects of type .

In our case we have and . Thus, the coefficient of for example is , because there are two s, two s and zero s, and setting , , we get

Similarly, in the case of the coefficient is because , , , so

Note also that within the square brackets in the reduced expression above there are different `types’ of terms. Why ? The answer has to do with the concept of *partitions* from number theory. A partition of a positive integer is a way of writing that integer as a sum of positive integers. Two sums that differ only in the order of the integers are considered to be the same partition. Now, the number has five partitions, namely

In the multinomial coefficients in the square brackets in the reduced expression above we are trying to obtain the sum in all possible ways by assigning values to , and . There are ways of achieving this with the partition (one example is , , ); there are ways of achieving this with the partition (one example is , , ); there are ways of achieving this with the partition (one example is , , ); there are ways of achieving this with the partition (one example is , , ); and finally it is impossible to use the partition since we are only summing three terms. Thus there are ways to achieve the sum by applying the partitions of to the values of , and , which explains why there are terms in the square brackets in the reduced expression above.

Can we use these insights to quickly work out the fourth-order term in the Taylor expansion of the quadvariate function ? Since and , this fourth-order term will be a sum of terms. Can we work out how many terms there will be in the reduced expression in which equivalent cross-partials are grouped together? Yes we can, using the partitions of again. In the multinomial coefficients in the square brackets in the reduced expression we will be trying to obtain the sum in all possible ways by assigning values to , , and . There are ways of achieving this with the partition (one example is , , , ); there are ways of achieving this with the partition (one example is , , , ); there are ways of achieving this with the partition (one example is , , , ); there are ways of achieving this with the partition (one example is , , , ); and finally there is exactly one way to use the partition , namely , , , . Thus there are ways to achieve the sum by applying the partitions of to the values of , , and , so there should be different types of terms in the reduced expression. These will be

The coefficient on each of these terms is the relevant multinomial coefficient, and note that these coefficients add up to . The following are examples of how I calculated the multinomial coefficients in this quadvariate case:

For the term involving we have , , , , so

For the term involving we have , , , , so

For the term involving we have , , , , so

Finally, for the term involving we have , , , , so