Calculators, Power Series and Chebyshev Polynomials

Aus DMUW-Wiki
Wechseln zu: Navigation, Suche

Of all the familiar functions, such as trigonometric, exponential and logarithmic functions, surely the simplest to evaluate are polynomial functions. The purpose of this article is to introduce the concept of a power series, which can be thought of in the first place as a polynomial function of infinite degree. In particular, we will deduce a series for \sin\ {x} and will see how to improve on the the most straightforward way of approximating its values. This simplest way uses the polynomials obtained by truncating the power series. The improvement will involve Chebyshev polynomials, which are used in many ways for a similar purpose and in many other applications, as well. When a calculator gives values of trigonometric or exponential or logarithmic functions it is doing so by evaluating polynomial functions that are sufficiently good approximations. (For trigonometric functions, the CORDIC algorithm is in fact often the preferred method of evaluation---the subject of another article here, perhaps.)

In the spirit of Felix Klein, there will be some reliance on a graphical approach.

Manipulations with geometric series

The geometric series 1+x+x^2+x^3+\cdots is the simplest power series. The sum of the series exists when |x|<1. In fact,


        1+x+x^2+x^3+\cdots=\frac 1{1-x} \quad \mathrm{when}\ |x|<1. \qquad\qquad (1)

The general form of a power series is


        a_0+a_1x+a_2x^2+a_3x^3+\cdots,

so the geometric series above is a power series in which all the coefficients a_0, a_1, a_2, \ldots, are equal to 1. In this case, since the series converges to 1/(1-x) when |x|<1, we say that the function f, where


        f(x)=\frac1{1-x}, \quad |x|<1,

has the series expansion 1+x+x^2+x^3+\cdots, or that f is represented by this series. We are interested initially to show some other functions that can be represented by power series.

Many such functions may be obtained directly from the result in (1). For example, by replacing x by -x^2, we immediately have a series representation for the function 1/(1+x^2):


1-x^2+x^4-x^6+\cdots=\frac 1{1+x^2}, \quad \mathrm{when}\ |x|<1. \qquad\qquad (2)

We can differentiate both sides of (1) to give a series representation of the function 1/(1-x)^2:


1+2x+3x^2+4x^3+\cdots=\frac 1{(1-x)^2}, \quad \mathrm{when}\ |x|<1.

We can also integrate both sides of (1). Multiply through by -1 (for convenience), then write t for x and integrate with respect to t from 0 to x, where |x|<1:


-\int_0^x (1+t+t^2+t^3+\cdots)\,dt=-\int_0^x\frac {dt}{1-t},

so


-x-\frac{x^2}2-\frac{x^3}3-\frac{x^4}4-\cdots=\log(1-x), \quad \mathrm{when}\ |x|<1.

So this gives a series representation of the function \log(1-x) for |x|<1. In the same way, from (2),


x-\frac{x^3}3+\frac{x^5}5-\frac{x^7}7+\cdots=\tan^{-1}x, \quad \mathrm{when}\ |x|<1.

Much of what we have done here (and will do later) requires justification, but we can leave that to the textbooks.


The power series for the sine function

We will show next how to find a power series representation for \sin\ x.

In general terms, we can write


\sin x=a_0+a_1x+a_2x^2+a_3x^3+\cdots. \qquad\qquad (3)

Put x=0, and immediately we have a_0=0. Differentiate both sides of (3):


\cos x=a_1+2a_2x+3a_3x^2+4a_4x^3+\cdots.

Again put x=0, giving a_1=1. Keep differentiating and putting x=0:

Fehler beim Parsen(Unbekannte Funktion „\a“): -\sin x = 2a_2+3\cdot2a_3x+4\cdot3a_4x^2+5\cdot4a_5x^3+\cdots, \qquad\qquad\qquad\mathrm{so}\a_2=0,



-\cos x = 3\cdot2a_3+4\cdot3\cdot2a_4x+5\cdot4\cdot3a_5x^2+6\cdot5\cdot4a_6x^3+\cdots, \qquad\qquad\qquad\mathrm{so}\ a_3=\frac{-1}{3\cdot2}=\frac{-1}{3!},


\sin x = 4\cdot3\cdot2a_4+5\cdot4\cdot3\cdot2a_5x+6\cdot5\cdot4\cdot3a_6x^2+\cdots, \qquad\qquad\qquad\mathrm{so}\ a_4=0,

Fehler beim Parsen(Unbekannte Funktion „\a“): \cos x = 5\cdot4\cdot3\cdot2a_5+6\cdot5\cdot4\cdot3\cdot2a_6x+7\cdot6\cdot5\cdot4\cdot3a_7x^2+\cdots, \qquad\qquad\qquad\mathrm{so}\a_5=\frac1{5\cdot4\cdot3\cdot2}=\frac1{5!}.


In this way, we can find a formula for all the coefficients a_0, a_1, a_2, \ldots, namely,

Fehler beim Parsen(Syntaxfehler): a_{2n}&=0, \\ a_{2n+1}&=\frac{(-1)^n}{(2n+1)!},


for n=0, 1, 2, \ldots. (The coefficients of even index and those of odd index are specified separately.)

Thus


\sin x=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\cdots.

This is the power series representation that we were after. From the way we developed it, it is reasonable that the series will represent \sin x for values of x at and near 0 (say for |x|<1, as for all the earlier examples), so it is surprising to know that it can be shown that the series represents \sin x for all values of x. Then partial sums of the series, obtained by stopping after some finite number of terms, should give polynomial functions that can be used to find approximate values of the sine function, such as you find in tables of trigonometric functions or as output on a calculator.