• Tidak ada hasil yang ditemukan

EPILOGUE: PART ONE

references for advanced methods to provide you with avenues for pursuing further studies of numerical methods.

2. Type, Availability, Precision, Cost, and Speed of Computer.You may have the option of working with a variety of computation tools. These range from pocket calculators to large mainframe computers. Of course, any of the tools can be used to implement any numerical method (including simple paper and pencil). It is usually not a question of ultimate capability but rather of cost, convenience, speed, dependability, repeatability, and precision. Although each of the tools will continue to have utility, the recent rapid advances in the performance of personal computers have already had a major impact on the engineering profession. We expect this revolution will spread as technological improvements continue because personal computers offer an excellent compromise in convenience, cost, precision, speed, and storage capacity. Furthermore, they can be readily applied to most practical engineering problems.

3. Program Development Cost versus Software Cost versus Run-Time Cost. Once the types of mathematical problems to be solved have been identified and the computer system has been selected, it is appropriate to consider software and run-time costs.

Software development may represent a substantial effort in many engineering projects and may therefore be a significant cost. In this regard, it is particularly important that you be very well acquainted with the theoretical and practical aspects of the relevant numerical methods. In addition, you should be familiar with professionally developed software. Low-cost software is widely available to implement numerical methods that may be readily adapted to a broad variety of problems.

4. Characteristics of the Numerical Method.When computer hardware and software costs are high, or if computer availability is limited (for example, on some timeshare systems), it pays to choose carefully the numerical method to suit the situation. On the other hand, if the problem is still at the exploratory stage and computer access and cost are not problems, it may be appropriate for you to select a numerical method that always works but may not be the most computationally efficient. The numerical methods available to solve any particular type of problem involve the types of trade- offs just discussed and others:

(a) Number of Initial Guesses or Starting Points.Some of the numerical methods for finding roots of equations or solving differential equations require the user to spec- ify initial guesses or starting points. Simple methods usually require one value, whereas complicated methods may require more than one value. The advantages of complicated methods that are computationally efficient may be offset by the requirement for multiple starting points. You must use your experience and judgment to assess the trade-offs for each particular problem.

(b) Rate of Convergence. Certain numerical methods converge more rapidly than others. However, this rapid convergence may require more refined initial guesses and more complex programming than a method with slower convergence. Again, you must use your judgment in selecting a method. Faster is not always better.

(c) Stability.Some numerical methods for finding roots of equations or solutions for systems of linear equations may diverge rather than converge on the correct answer for certain problems. Why would you tolerate this possibility when confronted with design or planning problems? The answer is that these methods may be highly efficient when they work. Thus, trade-offs again emerge. You must decide if your

problem requirements justify the effort needed to apply a method that may not always converge.

(d) Accuracy and Precision.Some numerical methods are simply more accurate or precise than others. Good examples are the various equations available for numer- ical integration. Usually, the performance of low-accuracy methods can be improved by decreasing the step size or increasing the number of applications over a given interval. Is it better to use a low-accuracy method with small step sizes or a high-accuracy method with large step sizes? This question must be addressed on a case-by-case basis taking into consideration the additional factors such as cost and ease of programming. In addition, you must also be concerned with round-off errors when you are using multiple applications of low-accuracy methods and when the number of computations becomes large. Here the number of significant figures handled by the computer may be the deciding factor.

(e) Breadth of Application.Some numerical methods can be applied to only a limited class of problems or to problems that satisfy certain mathematical restrictions.

Other methods are not affected by such limitations. You must evaluate whether it is worth your effort to develop programs that employ techniques that are appropri- ate for only a limited number of problems. The fact that such techniques may be widely used suggests that they have advantages that will often outweigh their dis- advantages. Obviously, trade-offs are occurring.

(f) Special Requirements. Some numerical techniques attempt to increase accuracy and rate of convergence using additional or special information. An example would be to use estimated or theoretical values of errors to improve accuracy.

However, these improvements are generally not achieved without some inconve- nience in terms of added computing costs or increased program complexity.

(g) Programming Effort Required.Efforts to improve rates of convergence, stability, and accuracy can be creative and ingenious. When improvements can be made without increasing the programming complexity, they may be considered elegant and will probably find immediate use in the engineering profession. However, if they require more complicated programs, you are again faced with a trade-off sit- uation that may or may not favor the new method.

It is clear that the above discussion concerning a choice of numerical methods reduces to one of cost and accuracy. The costs are those involved with computer time and program development. Appropriate accuracy is a question of professional judg- ment and ethics.

5. Mathematical Behavior of the Function, Equation, or Data.In selecting a particular numerical method, type of computer, and type of software, you must consider the complexity of your functions, equations, or data. Simple equations and smooth data may be appropriately handled by simple numerical algorithms and inexpensive computers. The opposite is true for complicated equations and data exhibiting discontinuities.

6. Ease of Application (User-Friendly?). Some numerical methods are easy to apply;

others are difficult. This may be a consideration when choosing one method over another. This same idea applies to decisions regarding program development costs versus professionally developed software. It may take considerable effort to convert

PT1.4 TRADE-OFFS 109

a difficult program to one that is user-friendly. Ways to do this were introduced in Chap. 2 and are elaborated throughout the book.

7. Maintenance.Programs for solving engineering problems require maintenance because during application, difficulties invariably occur. Maintenance may require changing the program code or expanding the documentation. Simple programs and numerical algo- rithms are simpler to maintain.

The chapters that follow involve the development of various types of numerical methods for various types of mathematical problems. Several alternative methods will be given in each chapter. These various methods (rather than a single method chosen by the authors) are presented because there is no single “best” method. There is no best method because there are many trade-offs that must be considered when applying the methods to practical problems. A table that highlights the trade-offs involved in each method will be found at the end of each part of the book. This table should assist you in selecting the appropriate numerical procedure for your particular problem context.

PT1.5 IMPORTANT RELATIONSHIPS AND FORMULAS

Table PT1.2 summarizes important information that was presented in Part One. The table can be consulted to quickly access important relationships and formulas. The epilogue of each part of the book will contain such a summary.

PT1.6 ADVANCED METHODS AND ADDITIONAL REFERENCES

The epilogue of each part of the book will also include a section designed to facilitate and encourage further studies of numerical methods. This section will reference other books on the subject as well as material related to more advanced methods.1

To extend the background provided in Part One, numerous manuals on computer programming are available. It would be difficult to reference all the excellent books and manuals pertaining to specific languages and computers. In addition, you probably already have material from your previous exposure to programming. However, if this is your first experience with computers, your instructor and fellow students should also be able to advise you regarding good reference books for the machines and languages avail- able at your school.

As for error analysis, any good introductory calculus book will include supplementary material related to subjects such as the Taylor series expansion. Texts by Swokowski (1979), Thomas and Finney (1979), and Simmons (1985) provide very readable discus- sions of these subjects. In addition, Taylor (1982) presents a nice introduction to error analysis.

Finally, although we hope that our book serves you well, it is always good to consult other sources when trying to master a new subject. Burden and Faires (2005); Ralston and Rabinowitz (1978); Hoffman (1992); and Carnahan, Luther, and Wilkes (1969) provide

1Books are referenced only by author here; a complete bibliography will be found at the back of this text.

PT1.6 ADVANCED METHODS AND ADDITIONAL REFERENCES 111

comprehensive discussions of most numerical methods. Other enjoyable books on the subject are Gerald and Wheatley (2004), and Cheney and Kincaid (2008). In addition, Press et al. (2007) include algorithms to implement a variety of methods, and Moler (2004) and Chapra (2007) are devoted to numerical methods with MATLAB.

TABLE PT1.2 Summary of important information presented in Part One.

Error Definitions

True error Et=true valueapproximation

True percent relative error εt= 100%

Approximate percent relative error εa= 100%

Stopping criterion Terminate computation when εa<εs

where εsis the desired percent relative error Taylor Series

Taylor series expansion f(xi+1)=f(xi)+f(xi)h+ h2

+ h3+. . .+ hn+ Rn

where

Remainder Rn= hn+1

or

Rn=O(hn+1) Numerical Differentiation

First forward finite divided difference f(xi)= + O(h)

(Other divided differences are summarized in Chaps. 4 and 23.) Error Propagation

For nindependent variables x1, x2, . . . , xnhaving errors "x˜1, "x˜2, . . . , "x˜n,the error in the function fcan be estimated via

"f = "x˜1+ "x˜2+. . .+ f "x˜n

xn

f

x2

f

x1

f(xi+1) −f(xi) h f(n+1)(ξ) (n+1)!

f(n)(xi) n!

f’’’(xi) 3!

f’’(xi) 2!

present approximation −previous approximation present approximation

true valueapproximation true value