Numerical Analysis

1,667 122 24MB

English Pages [175] Year 1963

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Numerical Analysis

Table of contents :
Title Page
Table of Contents
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Index

Citation preview

Numerical Analysis

Numerical 1

I ■

I

I

III III II I

I I I

I

I

I I I

I I I I

III II II

II III III III III III II III! III II II I

I

I I I

I

I

I

I

I

I

I

I

I

I

I I I I

I I

/oAff Jf/Zey

Copyright

All

John Wiley & Sons, Inc.

This book or any part thereof must without the written permission of the publisher. form

Rights

al1y

1

This can be done by instructing the machine to select one of two sequences of instructions according as x is less than or not less than 1.

DEVELOPING

A PROGRAM

Despite the diversity of the problems some form of digital computation of preparing a problem for computation tends to

can attack, the course

vary rather little from problem to problem. There is of course great vari ation among problems in difficulty and sophistication, and there is a great 1 Location of the next instruction may be done in a variety of ways. In some machines instructions contain an "instruction address" giving the location of the next instruction in the sequence. In others, instructions are stored sequentially so that each instruction has an address one unit higher than the preceding. The pattern of sequential selection of instructions may be altered at any point by means of a "branch" instruction analogous to the "continued on page thus and so" instruction given to magazine readers when the sequence of pagination is broken.

BASIC CONCEPTS deal

of overlap and interplay among

the various stages

7

of solution, which

we outline next.

The first and often the most difficult stage in preparing a program is the formulation of the problem. What are the objectives of the program? Is there any reason to suppose that these objectives can be reached with the means we have at hand ? How can the language of the problem be trans lated into mathematical terms? Numerical analysis begins after the problem has been formulated and perhaps after we have decided whether or not the problem has a solution and whether or not it may have more than one. We are then faced with the reduction

of the mathematical problem to

a numerical procedure — with

numerical analysis. Here we may find relevant mathematical theorems with proofs or references to proofs, an error analysis, a discussion of the circumstances under which the procedure may be expected to perform well or poorly, comparisons with other techniques, and references to relevant literature. Although the subsequent are not an essential part

steps in preparing a problem for a computer

of numerical analysis it

is important to understand Numerical analysis, like all mathematics, is influenced to an extent by its applications, one which is computing. The numerical analyst investigates a numerical method ; the programmer describes it; the computer executes it. Programming is translating a numerical procedure, clearly and unambiguously, into a sequence of com mands that can be read and executed by a digital computer. In most situ ations the programmer has a choice of languages in which to write his description. Specifically, the natural language of the machine is always available. In addition there are a number of artificial languages, such as FORTRAN2 and ALGOL.3 A machine language statement normally appears in a numeric form, such them.

as 21 07000 09800

The first two digits, 21, may be interpreted as an operation code and the remaining as two addresses, 07000 and 09800. The machine might interpret the command as "add the number stored in the location whose address is 07000 to the number stored in the location whose address is 09800." Pre sumably the result would then be available in some definite place in an arithmetic unit. It is not uncommon to find that operation codes have been 2 D. D. McCracken, A Guide to

FORTRAN

1961. 3 H. Bottenbruch, "Structure and Use of 161-221.

Programming,

John Wiley, New York,

ALGOL 60," Jour. A.C.M., vol.

9 (1962),

8

NUMERICAL

ANALYSIS

assigned mnemonic equivalents, such as ADD for 21. The machine, on receiving a command in its mnemonic form, can be instructed to consult a table and assign the corresponding numeric code. It is evident that conversion of a mathematical discussion complete with derivations and proofs into a sequence of machine language commands

can be a prodigious undertaking. The artificial languages are a product of our efforts to utilize the speed and logical ability of a computer to reduce the task. The ability of a computing machine to manipulate symbols is brought into play by means of a compiler. A compiler is a sequence of machine language instructions which, when executed, will translate a procedure written in a given artificial language, the source program, into an equivalent procedure written in machine language, the object program. The object program may be executed to produce "answers." A program written in an artificial language consists of a sequence of statements. Although two types of statements appear in such a language, we are concerned with only one

of

them,

describe the procedure. The other type

executable

of statement

statements.

They

is used in relating facts

about the source program. For example, the END statement, which is last statement in any FORTRAN program, indicates that the end of the source program has been reached. By contrast, a STOP statement is executable and is eventually translated into an equivalent machine language command. The executable statements in the FORTRAN language are arithmetic statements,

input-output

statements,

and control statements.

A

typical

arithmetic statement is

X

=

(A + B)/(C

* B)

-

4.1

*

A

** C

(1)

— language this statement is equivalent to X = ((A + B)/CB) 4.1A°, where A, B, and C are the names of constants stored in a computer. the The statement should properly be called a substitution statement; FORTRAN compiler will generate from it a sequence of machine language commands which, if executed, will result in replacement of the current value of X by the value of the expression to the right of the equals sign. In

In algebraic

addition to the substitution symbol (the equals sign), we have the symbols for the basic arithmetic operations indicated by +, — , *, and /, and expon entiation indicated by **. The compiler also provides for the use of certain common mathematical functions, provided their preassigned names are used. For example, the statement X = SQRTF(Y) will cause the compiler to generate instructions which on execution will replace the current value

of X by the positive square root of the current value of the variable Y as calculated by a square-root program which has already been written and

BASIC CONCEPTS

incorporated in the compiler. their names, might include :

A

typical list of such functions, along with

Function

Name

Square root of x Exponential

9

ex

Natural logarithm log x Sine function (x in radian measure) Cosine function |x|

Arctangent (result in radian measure) Absolute value

(FORTRAN)

SQRTF(X) EXPF(X) LOGF(X) SINF(X) COSF(X)

ATANF(X) ABSF(X)

Control statements are the logic statements in the FORTRAN language. Their primary use is in controlling the sequence in which commands are For this purpose statement numbers are introduced to those executed. statements that may be referenced by control statements. The numbers are positive integers, not necessarily consecutive, written at the left of the FORTRAN statements. As an example of a control statement, the com mand GO TO 23 will result in generation of a machine language branch instruction transferring control to the first of the sequence of machine language commands corresponding to statement number 23. The state ment IF(ATANF(X) B ** X) 5, 10, 15 will be interpreted as "if arctan X — Bx < 0, go to statement 5; if it equals zero, go to statement 10; if arctan X — Bx > 0, go to statement 15." To a great degree the usefulness of an artificial language depends on the flexibility and variety of the control

-

available. The input-output statements of a language are used to assign names to variables to be read or written, their formats on cards or tape, and to specify the input-output devices to be used. For instance, READ 1 A, B, C might mean "read three numbers from a card according to the formats statements

specified in statement the names

A,

1.

The locations in which they are stored are assigned

B, and C, respectively." Other such instructions are

PRINT, READ INPUT TAPE,

and

WRITE TAPE.

A

WRITE,

programming

manual should be consulted for details. In summary, the sequence of events that takes place in using an artificial language is as follows. The procedure is described in the artificial language, and the description is read into a computer and translated, by means of a compiler program, into an object program. This machine language pro gram may then be executed to effect the procedure.

FLOW CHARTS

a

The transition from numerical analysis to programming can generally flow chart. Not only do detailed lists of mathematical

be facilitated by

NUMERICAL

10

steps

make

ANALYSIS

dull reading;

large

numbers of alternatives,

choices,

and

are difficult to visualize from a verbal description.

The flow chart is a graphic representation of the procedures and shows how the alter natives fit together. When numerical analysis is complete and the transition from mathematical language to machine language begins, the flow chart can be an excellent device for establishing continuity. The notation used in flow charting is almost self-explanatory, but we exceptions

nevertheless

introduce some of the terminology employed.

In order to

keep the discussion as general as possible we limit the discussion to a mini

mum number of symbols. All flow charts will begin with a box labeled START and end with one or more boxes labeled STOP. The other types

of

boxes used are :

The assertion box

:

Compute Si =

Si-\x

+

A„-

;

This box asserts that the commands written within it are to be executed at this point in the procedure. The decision box:

This box has an input line and two or more output lines. An output line is selected according to the decision indicated in the box. The remote connector:

The remote connector is used to join points in a flow chart where it is not convenient to draw a solid line. A common use is to keep the chart from running off the page.

As an example of a flow chart, we describe a procedure for evaluating Ax + B, where A and B are given constants and x is a variable. For each value of x made available to the input unit, we are to write x and then write Ax + B. In other words we are to generate a table of values of Ax + B for however many values of x we may be given. Since A and B are constants, we may assume that they can be read into storage as data, just as the instructions are read in, previous to the com

putation.

BASIC CONCEPTS

In

11

way to proceed is to

this case a reasonable

Read A and B

1.

2. Read x

Form the product Ax 4. Add B 5. Write x 6. Write step

Ax + B there is another x in the input unit.

1 ;

7. See

if

otherwise

If

is,

3.

there

start over at

stop.

:

The flow chart might appear as follows

B

and

A

Put the Arithmetic Unit

Read x

Multiply

by*

AddB

Store Ax +

B

in

I

Read

A

START

there another x the input unit

?

in Is

yes

B

Write Ax

+

J.

Write x

STOP

B

Y

+

X,

3

2)

WRITE GOTO

B

2,

A*X 4,

=

A,

X

1

Y

1

READ READ

3,

is

is

If the procedure described in the FORTRAN language rather than in the machine-oriented fashion already presented, the corresponding flow chart will reflect this difference. Suppose the program

Nonexecutable

END

FORMAT

statements

appear here

ANALYSIS

NUMERICAL

12

The corresponding flow chart might appear as : START

Read A and B no

It

Write X

Y = AX + B

Read X

that the machine

is assumed

A MORE GENERAL

there another X the input unit ?

and Y

STOP

yts

will stop when the card reader is empty.

PROBLEM

Once we have devised a program for evaluating Ax + B it is natural to if we can extend the scope of our program to include evaluation of any polynomial of the form ask

Anx" + An-1x^ +

Of

•••

Al,

where A0,

,

•••

+

Aft

+

Ajpe

+ A0

(2)

An are given constants. Here the problem is in part the evaluation of pro

we can.

course

For example, we of our polynomial :

cedures, for there are many ways to solve the problem. may perform the operations indicated by the definition

Read x

3.

Multiply

each x1 by the corresponding

4. Form and store the sum 5.

Write x

6.

Write the sum

To provide

Aj

and store,

these n + 1 numbers

otherwise

If

there

/ = 0, start over at

stop.

of comparison with other methods, let us attempt to of work the computer would have to do in order to polynomial with this scheme. In doing this we neglect steps basis

a

1 ,

the amount

estimate evaluate

of

there is another x in the input unit.

a

step

1 ;

if

7. See

x, x2, x3, • • • , x"

is,

1.

2. Form and store successively

1

n

1

n

2

7

6,

5,

— since they are the same for any method. requires Step — x stores. (Note that must be stored in any case.) multiplications and

and

BASIC CONCEPTS

13

Step 3 requires n multiplications and n + 1 stores, and n additions or sub

tractions and

1 store

in step 4. In all, these three steps

are necessary

require 2n — 1 multiplications, 2n + 1 stores, and n additions or subtractions. A second method for evaluating the polynomial (2) is synthetic division. If we form successively = An S1

s2

= SlX + An-2

n'1

= 5'n-2* + A1

(3)

Sn then Sn is exactly

For

example,

the polynomial (2). calculation of f(x) = Ix3 —

x2 — Sx

+ 4 for x =

3 leads

to 50

= 2

51

=

3•2

52

=

3•5

-

53

=

3•7

+ 4 =

1

=

5

8

=

7

25=/(3)

Only n multiplications are required for using (3) as compared with 2n — 1 previously. We still use n additions and subtractions, but the store instruc tions are practically eliminated in most varieties of computer. The factor

Sj

is already in the central processing unit when the multiplication by x occurs, and one of the summands is in the unit when each addition takes place. Thus the procedure based on synthetic division requires only about half as many arithmetic operations as the first method and substantially less "housekeeping"

(store instructions). Our detailed list of operations now reads as follows: 1.

Read x

2. Form successively

the S's given by (3) and store the last one

Write x 4. Write the last S

if there is another x in the input unit. otherwise, stop.

Since the method appears

If there

to be promising, we draw

is,

See 1 ;

5.

start over at step

a

3.

flow chart.

NUMERICAL

14

START

ANALYSIS

Read x

SetS0 =

A„ Set i = 1

Compute

Si = Si-1x +

Write x

An-i

D

Is there another x in the input unit ?

Write Sn yes

STOP

ON ERRORS Now that we have devised a scheme for evaluating a polynomial of the form (2) and described it in terms of the number of arithmetic operations required for its use, it will be a rather simple matter for a programmer to write a code and compute using our method. But we have overlooked one of the responsibilities of the numerical of the error; the programmer has not

analyst.

We have made no analysis

been told how well his program will

perform, how accurate his answers will be. Why should a programmer suspect that there are inaccuracies in the first place? Mathematically speaking, the method of synthetic division by (3) is not inaccurate; the polynomial (2) and the expression for Sn are identically equal for all values of x. Unless we have blundered there are no errors in our mathematics. A simple and effective way to account for any wrong answers that may described

occur when our method is used is to blame them on malfunctioning of the computing machine. It is not unknown for a programmer to run a problem again when he is unhappy about the outcome the first time. Unhappily, computing machines usually insist on their answers, right or wrong, even to the last decimal place. We must look elsewhere for sources of error. There are two perfectly legitimate places to look for errors in a com putation of the type we are discussing here. Both of them fall in the general category

of all,

of rounding error, though they result from different things. First A0, Av • • • , An and the variable x will be subject

the coefficients

to initial errors before computation begins. Secondly, the central proc essing unit of the computer will be called on to form n multiplications as

BASIC CONCEPTS

15

•••

, Sn are computed. The multiplications may be formed exactly, but normally the exact value will contain twice as many digits as the word length of the arithmetic unit. The trailing digits are usually discarded, and S0,

Sv

Since errors

an uncertainty results.

of computation,

of this sort originate during

Since we wish to be able to discuss errors rather precisely,

of rounding errors

the subject

the course

we call them generated errors.

an error analysis.

let us look into

in a little more detail before proceeding with

First we need to make a distinction between exact num Exact numbers are numbers such as w, e,

bers and approximate numbers.

V2,

and unity that have no uncertainty associated with them. We may or in terms of a finite number of digits. The first three of the numbers listed can be expressed only approxi may not be able to express these numbers

if

Such approximate numbers; we say that the exact numbers have been rounded. The rounding of numbers necessary for their expression in digital form

mately

we use a digital form such as 3.1416, 2.7183, or 1.4142.

expressions

are

called

is an important source

of error in digital computing. Here we have rounded In practice, uncertainty

thus isolating the rounding error.

exact numbers,

can also result from inaccuracies one form

in measurement

of expression to another. At

the outset

or in conversion from

of computation data

may

contain these initial errors that carry through the computation and effect the uncertainty at every step.

We need some measure of the uncertainty of an approximate number. Specifically, suppose that x* is an approximate number taken to represent the value of some exact number x. The error in the approximation is x — x* defined to be x — x*; the relative error is ; and the percentage x x — x* error is X 100 per cent. Generally speaking, we do not know the error, only an uncertainty. This is to say, we are given a limit on the error such as 5 per cent or 0.01 . It is convenient to speak of an interval of uncer tainty: if x and x* are known to satisfy an equality of the form a 2 satisfied

x

107.

we take

suppose

It

by n =

e

=

5

X 10-8.

Then we require that

is clear from the table given next that this inequality is

11

but not by

e

=

n

1

2

3

4

n!

1

2

6

2.4 x 10

1

n

=

Hence the required expansion is

10.

+ x + x2/2l +

•••

+ x10/10!

6

5

7

9

8

1.2 x 102 7.2 x 10! 5.04 X 103 4.03 x 10* 3.63 X 105

n

10

11

n\

3.63 x 10"

3.99 x 10'

13

12 4.79

x

14

6.23 x 10»

10"

8.72

x

1010

As a second example of an application of powers series to function evalu ation, let us consider the problem of calculating the sine and cosine of a

If the number x is not in radian measure, we perform the conversion to radian measure as a first step. necessary If we form the power series with a = 0 for the required functions, we

given number x.

have sin x = x cos x = 1

-

a

0

1

0

0.53

^0

0

1

1.47/

(25.98

J

23.98 20.93

-

reductions:

26\ 24 21;

The first iteration consists of applying exactly the same reductions to the matrix of the system AY = R: 9

1.00

0.89

-0.00022

8

0.89

0.78

-0.00022

7

augmented

0.88

0.75

-0.00875

COMPUTATIONAL '1

1.00

0.89

0

-0.11

-0.11

\0

-0.12

-0.14

METHODS WITH MATRICES

-0.00022

0.89

0

-0.00853 -0.00022

-

0.00022^

1.00

0

1.17

0.071

0.89

69

-0.00022>

1

0.89

1

1.00

0

1.00

0

0

0.17

0.071

1.00

0.42

y* =

Finally, we have

Xj* = X*

'1.05

- Y*

0.046

0.53 + 0.42 >1.47

It

-

1

|

=

0.42

is easy to verify by inspection that the exact solution is

X

=

EXERCISES 1. Calculate the

following determinants by the method of pivotal condensation.

-2 (a)

2.

1

0

-1

1

2

1 ,

(b)

0

1

2

0-5

1

-1

2

-2

3

-2

Find the inverses of the following matrices. 2

(a)

0 1

1

-1 2

3 1 0

-2

3 3

70

NUMERICAL

ANALYSIS

A be an n by n nonsingular matrix and B be any n by q matrix. Show the n by (n + q) matrix (AB) is transformed by elementary row trans formations to the matrix (I„C), then C = A-1B. 3. Let

that

4.

if

Use the result of problem 3 to calculate A-1B for

A =

2

1

3

0

-1

I

1

2

0

B

1 Compare the result with that obtained by multiplying B by the value of A found in problem 2. Which method requires fewer operations? 5. Use the Gauss-Seidel

iteration to solve to two significant figures the systems

having the following augmented matrices : 2

-1

0

1

2

-1

0

-1

2

")

|

0 I.

1/

(« i

10

-1

0

0

-1

-1

10

-1

0

0

0

-1

10

-1

1

o

0

-1

10

2i

6. Use iteration combined with elimination to solve and then improve the solution of the system having the augmented matrix below. Carry all calcula tions, including intermediate results, to three significant figures, except for the residuals AX* — B. Calculate the residuals as accurately as possible.

4. A

lB

5. (a) xl = —0.5, x, = 0, x, = 0.5. Nine iterations yield two significant figures the starting vector (0, 0, 0) is used. (*) Three iterations yield xi = -0.100, x2 = 0.002, x3 = 0.121, xt = 0.212.

if

COMPUTATIONAL

METHODS WITH MATRICES

,,04 6. Elimination yields

X* =

I 0.92

,

J.

The residuals are R = AX*

-.8=1

.

.

(

-0.0735 J, Xt* = X* 0.0362'

0, 0

I.

\-0.04/

M.04/ 0.037K

71

- Y* =

/1.0029\ {

0.9935

\1.0038'

J.

The exact solu-

The Characteristic Values and Characteristic Vectors of a Matrix

Let

A

be a square

matrix of order n with elements aij.

The

polynomial

Det(A

-

I

XI) =

flu

— X

au H2

I a21

-*

• ••

aln

-

X

polynomial of A, and its zeros, Xv Aj, • • • , Xn, are called the characteristic values of A. Since the polynomial (1) below is of degree n in X the matrix A has at least one and at most n distinct charac teristic values. They satisfy the characteristic equation is called the characteristic

Det(,4

- /)

= 0

(1)

For any characteristic value Xk, the condition Det(4 of homogeneous linear equations

0 assures

us that the system

(aU

-

+ 021*1

+

0*22

-

^12*2

+

X=

•• •

4)*2 +

Am*i +

has a nontrivial solution

+

I

\

= 0

+ h

•••

+

(Ann

-

a2nXn

= 0

(2)

= 0

I corresponding to the value At. Such

a nonzero vector .ST is called a characteristic 72

vector

of A.

CHARACTERISTIC

VALUES AND VECTORS OF A MATRIX

73

If X is a characteristic vector, every nonzero scalar multiple kX is also a characteristic vector.1 Frequently the characteristic vector is chosen so that the sum of the squares of its elements is unity, or perhaps so that its largest element is unity. Such a vector is called a normalized vector. The system of equations (2) may be written in matrix form as is,

{A

that

- Xl)X

= 0

AX = XX

(3)

a

BX

and

a

number

X

holds. Characteristic value problems often involve finding vector X that satisfy an equation of the form

a

X

a

if

if

A

is

if

if

Since (1) and (2) are equivalent (one holds and only the other holds), equation (3) offers an alternative way of defining characteristic values and characteristic vectors. A nonzero vector X called characteristic vector of and only there exists scalar for which the equation AX = XX

= XCX is

C

if

n

n

C

B

and are given matrices and by nonsingular. This we multiply on the left by equation can be converted to the form of (3)

where

C-\

getting

C^BX

= XX

f

Since the calculation of C-1 by Gaussian elimination requires something in excess of n3/3 multiplications and divisions and the formation of C-1B requires n3 multiplications, conversion using this method will require somewhat more than w3 multiplications and divisions.

a

is

Approximation of the characteristic values and their corresponding characteristic vectors one of the most frequently encountered problems in numerical analysis. The problem can be approached in variety of

For

example,

and use the methods

of the polynomial (1) to find the zeros, which in turn can be

we can calculate the coefficients

of Chapter

3

ways.

substituted into (2) to yield systems of equations to be solved for the charac teristic vectors.

A

into Many methods are based on schemes for transforming the matrix forms conducive to application of numerical procedures. In this chapter we discuss methods of solving equation (3) for both and X. To establish the convergence of the iterations given, we proceed under the

Proof of this theorem

is

1

assumption that the characteristic values are distinct. This assumption left to the reader.

is

X

special

74

NUMERICAL

ANALYSIS

made primarily to simplify the analysis;

the method is valid under some what weaker restrictions2 and is applicable in the overwhelming majority of problems encountered in practice.

LINEAR

A set of vectors Xv constants

cl,

c2,

•••,

X2,

If this equation

•••

,

VECTORS

X„ is said to be linearly dependent

if complex

cn exist, not all zero, such that c1X1

of

OF THE CHARACTERISTIC

INDEPENDENCE

+ cJC2 +

if all

holds only

+ cnXn = 0

•••

the constants

X1 = I

are linearly dependent,

I

1

,

X2 = I

since 2X1 +

X*

-

5

ei are zero, however, the set example, the vectors

For

vectors is said to be linearly independent.

,

X3 =

= 0. The set

5

,

X3 =

-

3y

is linearly independent, since the equation

has only the trivial solution.

The theorem that follows forms a basis for our study of iterative tech niques for calculating characteristic values and characteristic vectors. Let A be an n by n matrix with distinct characteristic values K• Then A has n distinct characteristic vectors Xv X2,•••, Xn. Furthermore, the characteristic vectors are linearly independent. Theorem.

%1, ^2,

•• '

,

Assume that Xl, X2,•••,X„ are linearly dependent and that only k of them are linearly independent, where k < n. We may assume without loss of generality that the first k, X1, X2, • • • , Xk, are the linearly inde

Proof.

pendent ones. * For to Matrices and Linear Trans example, see D. T. Finkbeiner, Introduction formations, W. H. Freeman, San Francisco, 1960, Chapter 7.

CHARACTERISTIC

VALUES AND VECTORS OF A MATRIX

75

Let Xj be any other characteristic vector (k < y• < n). Then the set Xl7 •• , Xk, Xj is linearly dependent and we can find cv c2, • • • , ck and cj X2, • not all zero such that •• •

clX1 + c2X2 + Moreover,

c,

+ ckXk + cjXj = 0

otherwise Xv X2,•••,Xk

^ 0, since

would

be

linearly

dependent.

Hence we may write

Xj = -{cJc^Xi

- (cJc,)X2

(cklc,)Xk •••

In other words, any of the vectors Xk+v Xk+2, , Xn can be expressed a linear combination of Xv A"2, • • • , Xk. In particular, we may write

as

i=l and apply (3)

of

the previous section to get

AXn = A^ciXi =^ciAXi i=1

and also

«=1

AXn = h„X„ =

Xn

=2,cMi

situation as Case II. In practice it is usually not known in advance which case will occur (if either), but we shall see that the sequence of iterates = A behaves in such a way that the cases can be distinguished as assumed that the matrix

j

computation progresses. Case

II.

teristic 4,

••

The matrix A is a real matrix having conjugate complex charac = 3, Xl and A2 = I1 such that \X1\ = |A2| > |A3| , for

j

values , n.

First we will show that the characteristic vectors X1 and X2 form a con jugate complex pair. If we write, for i = \f—l, X1 = U1 + iV1 and = x1 + iy1 where Uv Vv xv and y1 are real, then the equation AXl = k1 X1X1 yields

A{U1 + iV1) = (x1 + iy1){U1 + iV1)

= x1U1 +

+

™1V1

'V1^1



V1V1

Equating the real and imaginary parts, we obtain

-

y1V1

AV1=x1V1 +

y1U1

AU1 = x1U1 and so A(U1

-

= x1U1 = {x1

-

iV1)

-

y1V1

iy1)(U1

-

ix1V1

-

iy1U1

iV1)

Since A2 = l1 = x1 — iyv we have proved that X2= U1 — iV1. Now if Y0 is a real vector, the constants c1 and c2 appearing in the

equation =

c1X1

will be complex conjugates, first two terms

+

that

c2X2

is,

Y0

c2

+ =

•••

c1.

+ cnXn Hence in equation (5) the

= c1%+1X1 + c1l\^X1

(7)

80

NUMERICAL

ANALYSIS

will be dominant and will yield an approximation to the vector Yk+1 = A Yk. Moreover, the components of (7) will oscillate with increasing k, thus revealing the presence of dominant complex conjugate characteristic values.6

To find the characteristic values and vectors, we recall that Xl and roots of a quadratic equation + ax +

x2

b

= 0

(8)

Now

a and b are unknown real numbers. by (7) satisfy the recursion formula

where the coefficients Zk defined

Zk+2

+

X1 are

the vectors

+ bZk = 0

aZk+1

Yk are increasingly better approximations to the Zk. Hence a and b can be determined approximately by solving the

and the vectors the coefficients

equations Vj.k+2

+

+

ayj.k+1

= 0

b, using any set of yth components of the Y's, not all zero, for the Once a and b are known, the equation x2 + ax + b = 0 can be solved for Ai and Aa. Finally, setting X1 = x1 + iy1 and X1= U1 + iVv we get

for a and y's.

-

= (Vi + iVJ + (Ui iVJ = 2Ui = UU1 + iVj) + UU1 iVj) = TtfrU1

Yk Yk+1

where

Xl estimated

=

x1

+ iyv

Since

Yk and

-

ym

are known,

-

U1

y1VJ) and

V1 can

be

by

and the characteristic-value problem is solved for Case

II.

CONCLUSION

sin

^)

+

i

* To see that the oscillation occurs, write A, = cos 6 + i sin 8 and let p(cos

We have indicated how to obtain the characteristic values of largest magnitude and their vectors in two important cases. Even so, we have only touched on the characteristic- value problem. There are many more prob lems to consider in addition to that of seeking extension of our results to

)

i

+

(f>)

i

+

+

i

i

be any one of the n components of ciX1. Then the corresponding component of the vector A1"clXl sin sin &0)(cos A,*c,X, will be p*[(cos kd + (cos kd — — sin )] — sin kd sin = 2kpk(cos kd cos = 2kpk cos (kd — %, that

if

if a,6, =

if

that

if

and only is,

if



i6t

a2 — J/>,

is,



ax

I

1

6,

a!

b2

and only

Xt = kXa. This

is



b

. Only

°

since

= 0

a> the last two rows are in constant

neither Case

I

i

if

4. Xt = |

nor Case II.

ratio;

7 Interpolation

In

interpolation is the process of obtaining inter of which particular terms are known. The expression usually refers to a sequence of ordered pairs (x, y) where y is a function of x in the sense that when x has any arbitrary value, lying perhaps between certain limits, the value of y is determinate. Interpolation consists in determining the value of y for a given value of x, or the value of x for a given value of y, lying between two of the values in the sequence. Though either variable may be regarded as a function of the other, we here treat one, x, as the independent variable and the other, y, as the dependent mediate

terms

mathematics,

of

a sequence

variable. When a sequence of pairs (x, y) is given as a list we say that y is tabulated in terms of x. The independent variable x is called the argument, and the dependent variable y is called the entry. Interpolation, in the ordinary sense, consists in determining a value of y for a value of x intermediate between two values appearing in the list. This is sometimes called direct interpolation to distinguish it from inverse inter polation, the latter consisting in determining the value of x for a value of y between two in the table. Graphically, the data for interpolation are those ordinates along the graph of y with regard to x which appear as entries in the table. Direct interpolation consists

in determining other ordinates whose abscissas (x consists in determining

values) are given, whereas inverse interpolation abscissas corresponding to given ordinates.

Interpolation with digital computers goes far beyond the linear inter polation almost universally used in hand computing. This chapter is limited to interpolation with polynomials, in which the basic problem is to find for a given number x the value of the polynomial y(x) of degree n for which . , . , , Here (xi, y,), / = 0,

1, 2,

•••,«,

are ordered pairs taken from a given list 83

NUMERICAL

84

ANALYSIS

or, graphically, points through which the graph of the polynomial is to The arguments xi are assumed throughout to be distinct. Trigonometric interpolation, interpolation with rational functions, and interpolation with linear combinations of exponential functions or other special classes of functions, though differing in detail, are based on the ideas pass.

It

here with polynomials.

developed

is because polynomials, especially

of

degrees up to four or five, are so widely employed in automatic compu

tation, that we devote our attention to them. A mathematical basis for polynomial interpolation is given by the following theorem. Theorem

i = 0,

Let there be given

1.

• • • , n, where 1, 2,

n

+

1

ordered pairs of numbers (xi, yi), Then there exists a unique

the xi are distinct.

polynomial y(x) =

of

a