Integrals over Chebyshev Polynomials

How can I compute

for general non-negative integers , , and , where is the ChebyshevT function?

Mathematica cannot compute the general integral directly. However, the integrand simplifies to the following.

Here is the ChebyshevU function (see Section 3.2.9 of The Mathematica Book). These orthogonal polynomials have very simple definitions in terms of trigonometric functions:

which suggests the change of variables , .

Moreover, there is a very simple addition theorem for the product of two ChebyshevU functions,

This result can be proved using Mathematica as follows. Assume without loss of generality that . Then we want to show that

Using the trigonometric definition for , this sum can be computed explicitly and simplified using ComplexExpand.

It is clear that this result is just .

Now we are in a position to compute the given integral in closed form:

The integral in the last line can be computed and simplified by applying the conditions that and .

Note that although appears in the denominator of this expression, there is no problem if because the integral vanishes in that case.

More generally, the integral vanishes if is odd, and the summation limits ( ranges from to in steps of 2) imply that the original integral vanishes unless is even. This restriction results from the parity (i.e., whether the function is even or odd) of the Chebyshev polynomials. For example, with , , and , the resulting polynomial is odd with respect to the interchange , and hence the integral of this quantity over will vanish identically.

Hence, for even, the summand can be written as

We see that both sides of this equation are symmetric with respect to the interchange , as expected, which also means that we can choose the labels and so that .

Mathematica implementation is immediate.

We also enter this "catch-all" rule.

Note that Mathematica can compute this sum in closed form as follows.

So, if required, we also have a relatively simple expression for the original integral.

Entering the original integral as a check, we put , , and and compare this with the summation result.

Next we check all cases , , and (we can truncate this last range because of the symmetry under the interchange ).

An alternate approach involves using the generating functions,

and

valid for . Formally, we have

We now compute and simplify the integral on the right-hand side.

Although valid, this result can be further simplified. For example, most readers would prefer to see for instead of since it is straightforward to show that these expressions are equivalent.

However, there does not seem to be a straightforward way of forcing this simplification.

Series expansion generates the required integrals.

As a check, we compute the left-hand side up to the same order using or .