You are on page 1of 12

This article was downloaded by: [Indian Institute of Technology Roorkee] On: 10 April 2013, At: 23:36 Publisher:

Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK

International Journal of Mathematical Education in Science and Technology


Publication details, including instructions for authors and subscription information: http://www.tandfonline.com/loi/tmes20

Lagrange interpolation and Runge's example


Temple H. Fay & Porter G. Webster
a a a

Department of Mathematics, University of Southern Mississippi, Hattiesburg, Mississippi 394065045, USA Version of record first published: 09 Jul 2006.

To cite this article: Temple H. Fay & Porter G. Webster (1996): Lagrange interpolation and Runge's example, International Journal of Mathematical Education in Science and Technology, 27:6, 785-795 To link to this article: http://dx.doi.org/10.1080/0020739960270601

PLEASE SCROLL DOWN FOR ARTICLE Full terms and conditions of use: http://www.tandfonline.com/page/terms-andconditions This article may be used for research, teaching, and private study purposes. Any substantial or systematic reproduction, redistribution, reselling, loan, sublicensing, systematic supply, or distribution in any form to anyone is expressly forbidden. The publisher does not give any warranty express or implied or make any representation that the contents will be complete or accurate or up to date. The accuracy of any instructions, formulae, and drug doses should be independently verified with primary sources. The publisher shall not be liable for any loss, actions, claims, proceedings, demand, or costs or damages whatsoever or howsoever caused arising directly or indirectly in connection with or arising out of the use of this material.

INT. J . MATH. EDUC. SCI. TECHNOL., 1996, VOL. 27, NO. 6, 785-795

Lagrange interpolation and Runge's example by TEMPLE H. FAY and PORTER G. WEBSTER
Department of Mathematics, University of Southern Mississippi, Hattiesburg, Mississippi 39406-5045, USA
(Received 7 November 1994)

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

It is well known that interpolation by polynomials of high degree is not well behaved. In this paper we give a theoretical basis for this by examining C. Runge's famous example of a continuous function f(x) over a closed interval for which the Lagrange interpolating polynomials fail to converge. Runge showed that there is a convergence curve defined in the complex plane whose interior contains the (real) closed interval on which the function f(x) is defined. If /(x) has no (complex) singularities within this convergence curve, then the Lagrange interpolating polynomials will converge uniformly to f(x) over the interval. This discussion uses only elementary topics from advanced calculus and beginning complex variable theory, and thus provides for a capstone series of one or two lectures to show the applicability of these courses on an applied problem of considerable interest. The advent of computer algebra programs such as Mathematica and Maple V make this discussion all the more tractable.

1. Introduction It has been almost 95 years since C. Runge first published his famous example of a continuous function defined over a closed interval for which the Lagrange interpolating polynomials (taken over points (x,-, f(x)) with these,- equally spaced) fail to converge to fix). This example is striking since the function is

Indeed, it goes against one's intuition that polynomial interpolation should behave so poorly. Since numerical approximations are so important, it is appropriate that students have an appreciation of the complexities of even the most simple and intuitive approaches. In traditional advanced calculus and complex variable classes at the under-graduate and beginning graduate level, topics covered typically include Cauchy's Integral Theorem, the Residue Theorem, the Maximum Modulus Principle, the Gamma function, and Stirlimgs approximation formulas. But seldom are these ideas put together to give a practical application. The point of this note is to suggest that Runge's example and the accompanying theory can provide motivation for the selection of topics to be covered in such classes and provide for an elegant capstone series of one or two lectures. We know of no recent text in which this development is readily available. Besides this pedagogical motive, the development includes a procedure for determining precisely when the Lagrange interpolating polynomials will converge uniformly to a function f(x). This is accomplished by determining a convergence
0020-739X/96 $1200 1995 Taylor & Francis Ltd.

786

T. H. Fay and P. G. Webster

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

Figure 1. Runge's example f{x) = \+\$xi.

curve defined in the complex plane whose interior contains the (real) closed interval on which f(x) is defined. If f(x) has no (complex) singular points within this curve, then the Lagrange polynomials will converge uniformly to f(x) over the interval. This derivation is interesting in that it only uses elementary results to obtain an applied result of considerable usefulness. Furthermore, we use computer algebra software packages Maple V, Mathematica, and Derive to investigate this problem. Figures 1 and 2 were produced using Maple V (with Scientific Workplace as the text editor/front end) and figure 3 was produced using the CounterPlot command from Mathematica. Derive was used for some computations, although either Maple V or Mathematica could have been used as well. The next section is abbreviated from [1] and is included to give motivation for the lengthier and deeper following section on the derivation of the convergence curve. 2. Runge's example If we choose to interpolate f(x) = 1/(1 + 25x2) by polynomials at the points (xj, f(x{)) for equidistant Xj = j/n, j 0 +1,... + n, then the Lagrange interpolation polynomials for n = 1, 2, and 3 are given by: 25 2 ^ ~26* 1250 A I x 1 2
3 2 2 5

/>,(*) = 1
2

/>3(*) = 1 -

A;2 754 211600

ill

96 365 24089 96356 228 601250 , 383 000000 6, 200000 000 p4{x) = 1 - 98 366225 , x + x -\ x 3 725137 7 450274 3 725137 3 725137

x +

2 2

2019375
4

1265 625

(2)

Lagrange interpolation and Runge's example

787

These polynomials can be calculated easily in Maple V, Mathematica, or Derive. Plotting these polynomials along with f(x), figure 2 clearly shows that as n increases and for \x\ close to 1, the approximations are getting worse. In fact, we will demonstrate that lim ( Max \f(x)-pn{x)\) = ao (3)

However, for if \x\ < 0-726, then the pn(x) converge uniformly to f(x) as n -* oo. It is our intention to explain this interesting and predictable behaviour.
Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

-0.5

00

x5

-0.5

-1

Figure 2. {a) /.,(*) = 1 - f x2.

Figure 2.

788

T. H. Fay and P. G. Webster

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

Figure 2. (c) p3(x) = 1 - ^ x2 +

Figure 2. (d)

Given a continuous function f(x) defined over a closed interval [a, b~\, first translate and rescale so as to have the domain of f(x) being the interval [ 1, 1]. Consider the problem of whether or not f(x) can be obtained as the uniform limit of Lagrange interpolating polynomials for equidistant points. Runge [2] showed that by considering f(z) where z is a complex variable, that one can write f(z) = Ln(z) + Rn(z) where Ln(z) is the Lagrange interpolating polynomial and Rn(z) is a remainder term which can be estimated. He gave conditions which assure that

Lagrange interpolation and Runge's example

789

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

Figure 2. (e) Runge's example with approximating polynomials. Ln[z) converges to f(z) and Rn(z) converges to zero. These conditions have to do with the singularities of f(z). Most importantly, he derived the equation of a simple closed curve A(z) = c , which we call the convergence curve, that encloses the interval [1, 1] when c = 2. He showed that if f(z) has no singularities on the interior of this curve, then the interpolating polynomials, converge uniformly to f(z). If f(z) has one or more singularities lying within this curve, then one chooses a smaller convergence curve not containing any singular points within its interior, and this curve determines a subinterval of [ 1, 1] over which the interpolating polynomials will converge. The singularities of f(x) are determined by factors of the form
1

ax + fix + y

(4)

where ax2 + fix + y is an irreducible quadratic; there are no real singularities, since we assume f(x) to be well defined and continuous over the entire interval [1, 1]. We will look at the examples (1/(1 + x2) and 1/(1 + 25x2), but the reader will be able to consider any such factor. The equation for the family of convergence curves is:

A(z) = |(1 +

(l - 0) ( 1 ~ 2 ) | exp(7t|/()|) = c2,

for c

(5)

where I(z) denotes the imaginary part of z. This curve is easier to study by letting z = x + ly and setting r, = [(1 + x)2 + > 2 ] 1 / 2 , r2 = [(1 - x)2 + y 2 ] 1 / 2 , and letting 1 -1 1 1 = tan " Cy/(1 4- x)) and a2 = tan (}>/(l x)). Then we can rewrite A(z) as

(x, y) =

> exp([-(a, + a2)y + n\y\]) = c2

(6)

This function of the two real variables x and y now can be investigated rather easily. Note that the curve is symmetric with respect to both the x and y-axes. The value c = 2 gives a closed ellipse-like curve (plotted in figure 3) which

790

T. H. Fay and P. G. Webster 2

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

-2 Figure 3. The convergence curve A(x,y) = c2 for c2 = 1-801 43, 4, 9-620 95. passes through the real points z = 1 and z = 1. It is not difficult to plot these curves for various values of c using Mathematica. Mathematica makes determining the interval of convergence easy. Example 1. Consider g(x) = 1/(1 + x2) for xe [ 1, 1]. The complex valued function g(w) has singular points at z = +/'. Substituting x = 0 and y = 1 into equation (6), we obtain c2 = 2 exp(7r/2) 9-620 95 > 4. The convergence curve A(x,y) = 9-620 95 encloses the interval [1, 1] (see figure 3), so the Lagrange Interpolation Polynomials converge uniformly to g(x) on the interval [1,1]. Indeed, using Mathematica's FindRoot command, it is easy to solve the equation ln(^4(r, 0)) = ln(9-620 95) for r, obtaining uniform convergence over the interval [-1-293 68, 1-293 68]. Example 2. Runge's example f(x) = 1/(1 + 25x2) has singular points at z = + 0-2i. Substituting x = 0 and y = 0-2 into equation (6), we obtain c2 = 1-801 43. The curve A(x,y) = 1-801 43 crosses the x-axis at x = +0-726 677. Polynomial interpolation will converge for \x\ < 0726 677, but if 0726677 s$ \x\, f(x) is not represented well by L2n+i(z) is these regions. Thus the process is now clear. Given f(x), choose the singularity z = x + \y closest to the origin. Substitute the values for x and y into equation (6) to determine the value c2. If c2 ^ 4, then the Lagrange interpolating polynomials converge uniformly to f(x) over the interval [ 1, 1]. If c2 < 4, then use Mathematica (or an equivalent) to plot the convergence curve (if desired), and to solve the equation \n(A(r, 0)) = 2 ln(c) for r to determine the subinterval \_ r,r~] over which the convergence is uniform. Perhaps it is worth noting that Mathematica cannot solve the equation A(r, 0) = c2 for r because the equation is still reasonably complicated. However, by taking the logarithm of both sides, solving ln(^4(r, 0)) = 2 ln(c) for r is easy

Lagrange interpolation and Runge's example

791

and very quick. One needs a starting point, as FindRoot uses Newton's Method. Thus the initial contour plot of A(x, y) = c2 is sometimes useful in determining the initial starting point.

3. Derivation of the convergence curve


In this section, we outline the derivation of the convergence curve A(z) = c2 used in the above discussion. Indeed, it is quite interesting to see that through the use of complex variables, we can write a function as a sum of a Lagrange interpolation polynomial and a remainder term, the latter which can be estimated and from which the convergence curve arises quite naturally. The derivation makes use of such standard results as Cauchy's Integral Theorem, Cauchy's Residue Theorem, Maximum Modulus Principle, some simple properties of the Gamma function, and Stirling's Approximation Formulas. All of these results are common fare in standard advanced calculus and beginning complex analysis courses but are perhaps not put together in such a way as to have a real application. To begin investigating the real valued function f(x) denned over the closed interval [a, b~\, as above, we first translate and rescale the independent variable so that we study f(x) over the interval [1, 1], as a matter of convenience. Moreover, as above, we now consider f(zv) where the real variable x has been replaced by the complex variable w and we assume f{tv) is analytic in a domain ( = open connected set) D which contains the interval [1, 1]. We recall the Cauchy Integral Theorem which states that
|

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

Z W

d *

(7)

where C is a simple closed curve in D within which f(z) is analytic and w is inside C. We first consider a general interpolation problem. Let Wj, w2,..., wn be distinct values of w which lie inside C, and let w2)---{w wn) The fundamental function Fn(z)-Fn(zv) zw turns out to be a polynomial of degree n 1 when considered as a function of w (the numerator is divisible by the denominator). Since Fn(z) is a constant when treating w as a variable, then when we divide function (9) by Fn(z), we still have a polynomial in of degree n 1 in w. We define Fn(z) - Fn(co) q>,,(w, z) = Fn(z)(z - w) 1 z w and consequently, = < p (w, z)+-^-^zw Fn(z)
z

(8)

(9)

Fn(w)

(10)

Fn(z) z w

(11) ~

792

T. H. Fay and P. G. Webster

Substituting equation (11) into equation (7), we obtain / ( ; ) = Ln(w) + Rn(w) where L B () = ^ r < f and f(z)<pn(tv, z) dz (13) (12)

fi^O
Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

Wl
2m

/W
JcFn(z){z-w)

(14)

Of course, ztf is assumed to lie within C. The beauty of this seemingly complicated observation is that Ln(w) can be evaluated by means of the Cauchy Residue Theorem. That is, since (pn(zv, z) has only simple poles at the points zoj, it is a simple application of the Residue Theorem that < f(z)q>n(to, z) dz = 2m ResU(z)<pn(w, z), Wy ] Jc y=i and thus we obtain the Lagrange Interpolation Polynomial of degree n 1: (15)

Moreover, if /(w) is a polynomial of degree m < n, then Rn(zu) = /(w) Ln(iv) is a polynomial of degree ^ n 1 which vanishes at the n points a/-. Thus Rn(zv) = 0 in this case. It is when /(w) is not a polynomial that we wish to investigate for this is when we want to interpolate points to replace f{w) by the interpolating polynomial Ln(w). Hence we want to know when the remainder term Rn{w) can be assumed to be small. We investigate this by determining the behaviour of Rn(w) as the number of points vij is increased. We now assume that the points Wj to be real and equally spaced in the interval [1, 1]. To do this, we divide the interval [1, 1] into 2 equal subdivisions by taking the points Wj =j/n for j = 0, 1 , . . . , +n. Then we have /() = L2n+1(w) where + R2n+1(w) (17)

i>

dz

(18)

2m J c F2n+1(z)(z - w) Since F2n+i(w) is a constant as far as z is concerned, we can move it inside the integral and make the observation that if, for sufficiently large values of n, \F2n+-l(w)/F2n+\(z)\ i s arbitrarily small, then \f{w) L 2 n + 1 (w)| = \R2n+i(w)\ can be made arbitrarily small. This is a simple estimation argument. The remainder of the discussion focuses on estimating F2n+1(z) so that we can ensure that \F2n+i^)/F2n+i{z)\ is small. In this case of equidistant points, we use the Gamma function to rewrite F2n+i(z) as follows:

(19) Using n as a common denominator in each factor of equation (19), we can factor

Lagrange interpolation and Runge's example out l/( 2 " + 1 ) and use the basic functional r(x + 1) = xT(x) to obtain:

793

equation of the Gamma function

Thus we now simply have to estimate values of the Gamma function. This is accomplished by using the well-known (technical) formula z)
Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

sin(nz) which can be found derived in DiLillo, Example 9.12 [3] or in Vvedensky [4], Exercise 23, p 251. Using this we write
T(nz n) = (22)

F(l + n nz)sin(nnz) and thus


, , (-1)"(1 + n + nz)(\ +nnz)T{nz + n)T(n nz)sin(nnz)

Since F2n+i( z) = ( l)2"+1i?2+i(2r)> w e may assume z to be in the right half plane. Then Stirling's approximation formula for the Gamma function (see Whittaker and Watson [5], p 253) yields1 ) ^ (-1)"2(1 - z2)1'2 exp(-2)(l + *) ( " +nz) (l - ^)("-"2)sin(w^) From Stirling's formula
exp(-2) S equation (24) becomes F7n.-i(z) = = sin(n7T2r). (26) ]Z ' , * 2 " + 1 / 2 2 +1 N/^2 " (25)

(24)

Jnn "
Now we set

2 +l/2

"L
and rewrite equation (18) as fii,tl(n)g(1 ~
w ) j

r J
(b I y ^
+ i

siI

-/1

d^

Thus, if we can show that |'/'2+i(w)/l/'2n+i(;3:)l becomes small as n becomes large, we will have shown that \F2n+i(lw)/F2n+iz)\ becomes small as n becomes large, For a pair of sequences of complex numbers {zn} and {zvn}, the notation zn = wn indicates that the two sequences have the property that wn # 0 and (zjwn) -*1 as n -* co.
1

794 and thus f(w) = L2n+i(w). (27) can be estimated by

T. H. Fay and P. G. Webster To do this we note first that the sine term in equation \sin(nnz)\^^exp(nn\I(z)\ (29)

where I(z) denotes the imaginary part of the complex number z. Hence it suffices to investigate the behaviour of (30) as n becomes large. Thus we set A{z) = |(1 + z)+*\\ - z)~z)\ exp(7:|/(*)|) (31)

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

Letting z = x + iy and setting rx = [(1 + x)2 + ^ 2 )] 1 / 2 , r2 = [(1 x)2 + y2~]1/2, and letting a t = tan~'(y/(l + x)) and a2 = tan~*(y/(l x)), we rewrite A{z) as ^ ( 2 ) = ri1+*>f-*> e x p [ - ( a : + a2)y + n|y|] (32)

This function of the two real variables x and y can be investigated rather easily using Mathematica by setting A{z) = c2 for c ^ 1. The value c = 2 gives a closed ellipse-like curve which passes through the real points z = 1 and z = 1. Lanczos [5] tabulated values for this curve. Of course, now we can use much more sophisticated methods to generate values employing computer algebra software packages such as Mathematica. In figure 3, we show plots of equation (32) for various values of c. Now assume that the domain D contains the curve A(z) = 4 in its interior and that f(w) has no singular points within D(i.e. /(w) is regular on D) and consider two other v4-curves, A(z) = c2 and A(z) = c2, which enclose the curve A(z) = 4. The curve A(z) = c2 encloses the curve A(z) = c\ if c2 > c\. If z lies on the curve A(z) = c\ and w lies on the curve A(z) = c2, then (33) For sufficiently large values of n, |'/'2+i(w)/t/'2n+i(;2r)l ' s arbitrarily small, and consequently, -R2n+i(w) becomes arbitrarily small if the curve C is taken to be A{z) = c\. This means, for large enough n, f(w) can be approximated with arbitrary accuracy by L2n+i(w) if w belongs to the curve A(z) = c\. Since the maximum of I /(w) -^2+i(ro)l taken in the whole domain enclosed by the curve A(zv) = c\ is no greater than on the curve itself (the Maximum Modulus Principle, see [7], p 132), the function /(w) is approximated by L2n+\(w) in the entire domain enclosed by A(w) = c\ with arbitrary accuracy. These observations remain valid no matter how large the two ^4-curves are taken provided that they do not contain any singularities of f(w). It follows that the region of uniform convergence extends over the interior of that ^4-curve which passes through at least one of the singularities of /(w) but contains no other singularity in its interior. If f(zv) has no singularities, then the region of convergence extends over the entire complex plane. On the other hand, if f{w) has singular points in the interior of the curve A(w) = 4, then it is necessary to move inside the curve to smaller ^4-curves. Let

Lagrange interpolation and Runge's example

795

Downloaded by [Indian Institute of Technology Roorkee] at 23:36 10 April 2013

A(w) = c\ be an ^4-curve which lies entirely within the interior of the region where f{w) is regular. This ^4-curve will intersect the interval [1, 1] in two points r and r. By slightly deforming the ^4-curve around the points 1 and 1, and computing R2n+i(w) by integrating over this deformed countour, we see that if w lies within A(w) = c\, then i^n+iC^O becomes arbitrarily small for sufficiently large values of n. This is because A(z) is greater on the part of the deformed contour outside of the curve A(zv) = c\ than on the curve itself, while A(w) must be smaller than A(z) because w lies within the ^4-curve. As long as the ^4-curve encloses no singular points of / ( w ) , it can be replaced by a large ^4-curve. Thus the region of convergence fills up the interior of that ^4-curve which passes through at least one singular point of f(w) but includes no singular points within its interior. In summary, if the singular points of f(w) lie outside the curve A(w) = 4, then the Lagrange polynomial interpolants L2n+i(x) converge to f(x) as n > oo for all x e [1, 1]. If singular points are located inside the yi-curve A(w) = 4, then the Lagrange polynomial interpolants L2n+\{x) converge to f(x) as -> co for only a part of the interval [ 1, 1]. References T. H., and WEBSTER, P. G., 1995, On Runge's example for polynomial interpolation, Primus, V, 73-79. RUNGE, C , 1901, Uber empirische Functionen und die Interpolation zwischen aquidistanten Ordinaten, Zeitschrift fur Mathematik und Physik, 46, 224-243. DELILLO, N. J., 1982, Advanced Calculus with Applications (New York: Macmillan). VVEDENSKY, D., 1993, Partial Differential Equations with Mathematica (Reading, MA: Addison-Wesley). WHITTAKER, E. T., and WATSON, G. N., 1940, A Course of Modern Analysis (London: Cambridge University Press.). LANCZOS, C , 1956, Applied Analysis (Englewood Cliffs, NJ: Prentice Hall). BOAS, R. P., 1987, Invitation to Complex Analysis (New York: Random House).
FAY,

[1] [2] [3] [4] [5] [6] [7]

You might also like