# Calculation of Chebyshev coefficients

The Chebyshev polynomials can be defined recursively as:

$T_0(x)=1$; $T_1(x)=x$;

$T_{n+1}(x)=2xT_n(x) + T_{n-1}(x)$

The coefficients of these polynomails for a function, $\space f(x)$, under certain conditions can be obtained by the following integral:

$$a_n=\frac{2}{\pi}\int_{-1}^{1}\frac{f(x)T_n(x)}{\sqrt{1-x^2}}dx$$

Fixing some integer $N$, the zeros of $T_{N+1}(x)$ are :

$$x_j=\cos\frac{\pi(i+\frac12)}{n+1}, \space j=0, 1, 2, ...,N$$

The coefficients can then be calculated to be given by:

$$a_n=\frac{2}{n+1}\sum_{j=0}^{N} f(x_j)T_k(x_j)$$

Can I get any help regarding how to calculate these coefficients for the function:

$f(x)=\large\frac{1}{e^\frac{x-\alpha}{\beta} \space +1}$. Where $\alpha$ and $\beta$ are constants.

• Do you need step by step calculation or just numerical values of coefficients? – Ömer Oct 19 '13 at 14:06
• step by step. I want to understand the process. – Hasan Oct 19 '13 at 14:20
• @user1772257, could you post your values of coefficients as well? – Hasan Oct 20 '13 at 22:05
• I didn't calculate them but i can recommend you www2.maths.ox.ac.uk/chebfun/examples/approx/html/… – Ömer Oct 21 '13 at 12:11
• what the hell are "certain conditions"? – Quonux Feb 13 '14 at 1:03

• (I) Notice that the Chebyshev coefficient of $f(x)$ are the Fourier coefficient of $f(\cos x)$, so the problem is equivalent to find the Fourier series of $\frac{1}{e^{\cos x}+1}$;
• (II) Notice that $\frac{1}{e^x+1}$ can be expressed as a power series in terms of Bernoulli numbers;
• (III) Notice that $(\cos\theta)^n$ can be expressed as a combination of $\cos(n\theta),\cos((n-2)\theta)\ldots$ in virtue of the De Moivre identity: $$(\cos\theta)^n = \left(\frac{e^{i\theta}+e^{-i\theta}}{2}\right)^n = \frac{1}{2^n}\sum_{k=0}^n\binom{n}{k}e^{(n-2k)i\theta}=\frac{1}{2^{n-1}}\sum_{k=0}^{\lfloor n/2\rfloor}\binom{n}{k}\cos((n-2k)\theta);$$
• (IV) Use (II) and (III) in order to write $a_n$ as a sum of (Bernoulli numbers)$\cdot$(binomial coefficients).
• Could you explain more of step (III). How does $(cos(x))^n$ fit in? $T_n cos(x)=cos(nx)$ for chebyshev polynomials. Should just a trigonometric identity be used? – Hasan Oct 19 '13 at 16:44
• I made it more explicit. You have $\frac{1}{e^{\cos x}+1}=\sum B_n (\cos x)^n$, then apply (III) in order to extract from the last identity the coefficient of $\cos(nx)$. – Jack D'Aurizio Oct 19 '13 at 16:56