ebook img

Computing Methods PDF

682 Pages·1965·24.224 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Computing Methods

I. S. BEREZIN and N. P. ZHIDKOV COMPUTING METHODS VOLUME II Translated by 0. M. BLUNN Translation edited by A. D. BOOTH College of Engineering University of Saskatchewan PERGAMON PRESS OXFORD · LONDON · EDINBURGH · NEW YORK PARIS · FRANKFURT PERGAMON PRESS LTD Headington Hill Hall, Oxford 4 & 5 Fitzroy Square, London W.l PERGAMON PRESS (SCOTLAND) LTD 2 & 3 Teviot Place, Edinburgh 1 PERGAMON PRESSINC 122 East 55th Street, New York 22, N.Y. GAUTHIER-VILLARS ED 55 Quai des Grands-Augustins, Paris 6 PERGAMON PRESS G.m.b.H. Kaiserstrasse 75, Frankfurt am Main U.S.A. Edition distributed by the Addison-Wesley Publishing Company Inc. Reading, Massachusetts · Palo Alto · London Copyright © 1965 PERGAMON PRESS LTD. First English Edition 1965 Library of Congress Catalog Card Number 61-11157 This is a translation of the original Bussian Memodu eWiUCMHUU (Metody vychisîenii) published by Fizmatgiz, Moscow MADE IN GREAT BRITAIN FOREWORD IN THIS second volume of the book, a study is made of numerical methods of solving sets of linear algebraic equations, high degree equations and transcendental equations, numerical methods of finding eigenvalues, and approximate methods of solving ordinary differential equations, partial differential equations and integral equations. The book is intended as a text-book for students in mechanical- mathematical and physics-mathematical faculties specializing in computer mathematics and persons interested in the theory and prac- tice of numerical methods. xiii PREFACE As STATED in the preface to the first volume of the book, this second volume contains Chapters 6-10, which correspond to Part II of the course on "Computing Methods" which is taken by students in the fourth year of instruction. I. S. BEREZIN N. P. ZHIDKOV XV CHAPTER 6 THE SOLUTION OF SETS OF LINEAR ALGEBRAIC EQUATIONS 1. CLASSIFICATION OF METHODS The second part of our book, which is devoted to the solution of algebraic, transcendental, differential and integral equations, begins with a chapter on numerical methods of solving sets of linear algebraic equations. Sets of linear algebraic equations are simple but occur in many problems of numerical analysis. Cramer's rule, which is well known from the course on higher algebra, is not suitable in practice for solving sets of linear algebraic equations since it requires an excessive amount of arithmetic. Many suitable practical methods have therefore been proposed. A considerable portion of the published literature dealing with computing methods is devoted to this topic. But it is still impossible to point to one or several of these methods as the most efficient in the sense that the solution is obtained in the shortest time with the necessary degree of accuracy and the minimum use of storage devices. We need to make an extensive theoretical and experimental comparative evaluation of the various known methods from this point of view. In this chapter, we shall only give a few time-tested methods and some that seem to us to be promising for practical use. The practical methods of solving sets of linear algebraic equations can be divided into two large groups, namely, exact methods and methods of successive approximation. Using the exact methods it is possible in principle to find the exact values of the unknowns after a finite number of operations. It is naturally presupposed that the coefficients and right-hand sides of the sets are known exactly, and that no rounding is applied in the calculations. More often than not they are solved in two steps. In the first step the set is simpli- fied and in the second this set is solved and the values of the un- knowns found. 1 2 COMPUTING METHODS In methods of successive approximation, certain approximate values of the unknowns are given at the very beginning. New and "improved" approximate values of the initial approximations are then obtained. The new approximate values are treated in the same way, and so forth. Under definite conditions we (in theory) arrive at the exact solution after an infinite number of steps. Monte Carlo methods are not included in our classification. Such methods use random quantities, the mathematical expectations of which produce the solution. Monte Carlo methods cannot as yet compete with the stated methods, and we shall therefore leave them alone here. 2. ELIMINATION We begin our study of numerical methods of solving sets of linear algebraic equations with the exact methods. The simplest of these methods is that of elimination. The method of elimination will already have been studied in the ordinary school course on algebra. By combining the equations of the set in a certain way, one of the unknowns is eliminated in all the equations except the first. Then, another unknown is eliminated and then a third and so on. As a result we get a set with a triangular or diagonal matrix which can easily be solved. No theoretical difficulties arise in the process of elimination. But the accuracy of the result and the amount of time required depends very greatly on the way in which the calculations are organized. We therefore have to pay great attention to this aspect of the matter. Let us illustrate the use of the method of elimination by a typical set of four equations with four unknowns : 1.1161^ + 0.1254^ + 0.1397^3 + 0.1490^ 1.5471, 0.1582^+1.1675z + 0.1768x + 0.187l# 1.6471, 2 3 4 (i) 0.1968^ +0.2071#2 +1.21683-3+ 0.227l£ 1.7471 4 0.2368^ + 0.247Lr2 + 0.2568z3 + 1.2671a?4 1.8471 : These can be tackled in several ways. Each of these methods has a separate name, but unfortunately there is no standardized terminology. THE SOLUTION OF SETS OF LINEAR ALGEBRAIC EQUATIONS 3 ( 1) The Gauss method with selection of the pivotal element (pivotal condensation) If the calculations are not to be performed on computers, it is convenient to write our set as follows No mt aa Ö.-2 «<3 au b{ st 1 1.11610 0.12540 0.13970 0.14900 1.54710 3.07730 2 0.15820 1.16750 0.17680 0.18710 1.64710 3.33670 3 0.19680 0.20710 1.21680 0.22710 1.74710 3 59490 4 0.23680 0.24710 0.25680 1.26710 1.84710 3.85490 The number of the equation appears in column 1. The importance of the second column will be clear later. The third, fourth, fifth and sixth columns contain the coefficients of the equations and the seventh the free terms. The last column contains the sums of the coefficients and free terms of each row. We now have to select the element a^ with largest absolute value. We refer to it as the pivotal element. In our case this is a = 1.26710. 44 It is underlined in the table. We have to divide all the elements of the column containing the pivotal element (in our case a ) by the u pivotal element, and then the relation with the reverse sign is placed in the column m in the same row for which the quotient is found : i No TTZj an aii °<3 au bi *« 1 —0.11759 1.11610 0.12540 0.13970 0.14900 1.54710 3.07730 2 —0.14766 0.15820 1.16750 0.17680 0.18710 1.64710 3.33670 3 —0.17923 0.19680 0.20710 1.21680 0.22710 1.74710 3.59490 4 0.23680 0.24710 0.25680 1.26710 1.84710 3.85490 We now add the row that contains the pivotal element multiplied by the corresponding m to each row of the table. The row containing t the pivotal element is then omitted. The column containing the pivotal element may be omitted too, since it only consists of zeros. In our case : 4 COMPUTING METHODS No nit «il αί2 aiZ αί4 hi *< 1 -0.09353 1.08825 0.09634 0.10950 1.32990 2.62399 2 -0.11862 0.12323 1.13101 0.13888 1.37436 2.76748 3 0.15436 0.16281 1.17077 1.41604 2.90398 We have, however, included the values of m obtained at the next i step. Let us check that the calculations are correct. To do this, we have to add the columns a^ and 6 and then compare with s i v If they agree to within the error allowed for rounding, they are deemed to be correct. If the discrepancy is too large, the respective calculations are repeated. We then tackle this table in the same way. We select the pivotal element (in this case 1.17077) and divide it into the elements of this column. The results with reverse signs are written in the column m (this has already been done here). We then successively multiply i the row from which the pivotal element is taken by τη and add the ϊ corresponding rows. We check the result and pass onto the next step. We continue in the same way until only one row is left. In our example we have No 1 m{ an o<2 °<3 «*4 ^ *i 1 1 -0.07296 1.07381 0.08111 1.19746 2.35238 2 0.10492 1.11170 1.20639 2.42301 1 1.06616 1.10944 2.17560 Using the equations in which the pivotal elements have been selected we derive a new equivalent set 1.06616»!= 1.10944, I 0.10492z +1.11170z = 1.20639, I 1 2 0.15436ζ + 0.1628ΐ£ +1.17077^3 = 1.41604, ί ( ) 1 2 0.23680»!+ 0.24710x +0.25680*3 + 1.26710ar = 1.84710. j 2 4 THE SOLUTION OF SETS OF LINEAR ALGEBRAIC E QUATIONS 5 The matrix of this new set is triangular. No difficulties arise in solv- ing it. We find 1.10944 ^ = Γ066Ϊ6-=104059' 1.20639-0.10492-1.04059 1.09721 x* = ΓΪΪΪ70 = ΤΤΓΪτο = °·98697' 1.41604-0.15436.1.04059-0.16281. 0.98697 x~ = 1.17077 i(3) 1.09473 0.93505, 1.17077 1.84710-0.23680.1.04059-0.247100.98697-0.25680· 0.93505 x — A 1.26710 1.11669 0.88130. 1.26710 This method of elimination is referred to as the Gauss method of elimination with selection of the pivotal element. The process of elim- ination itself is known as forward elimination, but the solution of a set with a triangular matrix is known as back-substitution. In practice, there is of course no need to separate the individual stages. This was done to simplify the explanation. Neither need the final set of equations be copied out. In back-substitution, accuracy is checked by means of column s . t If we substitute s for b in the final set we should obtain x -f1 in- t t { stead of x The results can also be checked by substituting them in v the original set of equations. In our case we have 1.54711, 1.64712, 1.74710 and 1.84711 on the left-hand sides of the equations. As we can see, the left- and right-hand sides are the same within two units of the fifth decimal place, which must be regarded as satis- factory. The idea behind selecting the pivot is to make m as small as possible i and thereby reduce the computational error. It is well known that multiplication and division take most time on digital machines, or manually. It is, therefore, important to know how many operations of multiplication and division are neces- sary to solve the set in question. If the set is of order n, then n — 1 divisions must be made after selecting the pivot to determine the coefficients m It is then necessary to multiply the row containing v 6 COMPUTING METHODS the pivot by each of these factors. This requires (n+l)(n — l) or n2 — 1 multiplications. Thus the first stage of the Gauss method requires n2 + n — 2 multiplications and divisions. The next stage requires (?i — l)2 + (n— 1) — 2 such operations and so on. The total number of operations of multiplication and division before back- substitution is [n*+n-2]+[(n-l)* + (n-l)-2] + ... ... +[l 2 l-2] n(n l)(2n l) n{n + l) _^ + = + + + (4) Back-substitution requires 1 + 2 + 3+.. . η = * ψί (5) + operations of multiplication and division, if no cross-check with column s is made. As many operations are required in making this { check. Thus, the solution of a set of n equations by the Gauss method with selection of the pivotal element and cross-checking requires V 'v——■ + V ' -2n + n(n + l) = - (n2-f 6?i-l) (6) 2 operations of multiplication and division. (2) Compact Gauss method There are numerous modifications of the Gauss method with one or another advantage. We shall consider one such method. First it is supposed that there is a set of four general equations a^+a^x^a^ + a^x, = a<°>, 5 d$Xi + €$x% + a$Xi+a$Xi = a$, (7) a<iixi + a3°2^2 + 0g>a? + αίΙ)χ* = 3 <ι\ 4- a$x + a$x + <>s == aa%®>, j 2 3 4 The initial data and the intermediate and final results are tabu- lated as follows n(0) «S? «fi? a(0) «if a(V <> ^ ^"Ί244 40s> a(0) a32 a(0) a^3(40 ) <> ^U3411 a(0) a43 W-44 <5> 42

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.