• Tidak ada hasil yang ditemukan

numerical methods for engineers chapra canale 6th ed

N/A
N/A
Lwi Jia You

Academic year: 2023

Membagikan "numerical methods for engineers chapra canale 6th ed"

Copied!
994
0
0

Teks penuh

Published by McGraw-Hill, a business unit of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning.

PREFACE

Subha Kumpaty, Milwaukee School of Engineering Eckart Meiburg, University of California-Santa Barbara Prashant Mhaskar, McMaster University. Finally, we would like to thank our family, friends and students for their continued patience and support.

GUIDED TOUR

32.1, a parabolic PDE is used to calculate the time-varying distribution of a chemical along the longitudinal axes of a rectangular reactor. This example illustrates how the instability of a solution can be due to the nature of the PDE rather than to properties of the numerical method.

ABOUT THE AUTHORS

PART ONE

MODELING, COMPUTERS, AND ERROR ANALYSIS

A SIMPLE MATHEMATICAL MODEL

Thus, the mass multiplied by the rate of change of velocity equals the net force acting on the body. It can be seen that the numerical method captures the essential features of the exact solution.

CONSERVATION LAWS AND ENGINEERING

Both the civil and mechanical engineering applications will focus on models developed from conservation of momentum. The same principles are used for the mechanical engineering applications to analyze the transient up-and-down motion or vibrations of a motor.

PROBLEMS

PACKAGES AND PROGRAMMING

  • Computer Programs

They are nothing more than computer programs that allow you to extend the capabilities of these tools. Because we assume that you have previous exposure to programming, we will not spend time on the first four of these areas.

STRUCTURED PROGRAMMING

  • Logical Representation

The main purpose of this chapter is to show you how this can be done. In addition, an optional block can be applied if the expression does not take any of the described values ​​(RAST ELSE).

MODULAR PROGRAMMING

This is mainly due to the fact that it is possible to develop new modules to perform additional tasks and then easily integrate them into an already coherent and organized scheme. In previous versions, input and output came directly from (via INPUT statements) and to (via DISPLAY statements) the user.

EXCEL

Notice how, although the details are different, the structure of the pseudocode and the VBA code are identical. When you enter the function in the spreadsheet cell, the parameters are passed into the VBA program where the calculation is performed and the result is then returned and displayed in the cell.

MATLAB

It is the combination of the Excel environment with the VBA programming language that really opens up a world of possibilities for solving engineering problems. It is the combination of the MATLAB environment with the M-file programming language that really opens up a world of possibilities for solving engineering problems.

MATHCAD

Save this file as euler.m and then create another M file to calculate the derivative, the function ion dydt = dy( t , v , m, cd ). To start the function and see the result, you can enter the following commands.

OTHER LANGUAGES AND LIBRARIES

Develop a program that calculates the average temperature between two days per year for a particular city. Because so many of the methods in this book are straightforward in description and application, it would be very tempting at this point for us to go straight to the main body of the text and teach you how to use these techniques. The importance of error was introduced in our discussion of the falling skydiver in Chap.

SIGNIFICANT FIGURES

The concept of a significant figure or figure was developed to formally indicate the reliability of a numerical value. For example, we may decide that our approximation is acceptable if it is correct to four significant figures. Furthermore, the concept of significant figures will be relevant to our definition of accuracy and precision in the next section.

ACCURACY AND PRECISION

ERROR DEFINITIONS

  • Computer Algorithm for Iterative Calculations

3.2) and (3.3), Eandε is denoted by atto, means that the error is normalized to the true value. FUNCTION IterMeth(val, es, maxit) iter !1. The result can be verified by using the built-in exp function to directly calculate the exact value and the true percent relative error. As was the case with Example 3.2, we obtain the desirable result that the true error is smaller than the approximate error. in terat ive calculation ion Dosolold = sol.

ROUND-OFF ERRORS

  • Computer Representation of Numbers
  • Arithmetic Manipulations of Computer Numbers

Determine the machine epsilon and verify its effectiveness in characterizing the errors of the number system from Example 3.5. The hypothetical floating point system of Example 3.5 used values ​​of the base b=2, and the number of mantissa bits t=3. When two floating point numbers are added, the mantissa of the number with the smaller exponent is changed so that the exponents are the same.

THE TAYLOR SERIES

  • The Remainder for the Taylor Series Expansion
  • Using the Taylor Series to Estimate Truncation Errors
  • Numerical Differentiation

Log-log plot of the residual R1 of the first-order Taylor series approximation of the function f(x)=x4 versus step size h. More accurate approximations of the first derivative can be developed by including higher-order terms in the Taylor series. Graphical representation of (a) forward, (b) backward, and (c) centered finite-divided-difference approximations of the first derivative.

ERROR PROPAGATION

  • Functions of a Single Variable
  • Functions of More than One Variable
  • Stability and Condition

Equation (4.25) provides the means to approximate the error in f(x), given the derivative of a function and an estimate of the error in the independent variable. For this case, the first-order error analysis provides a fairly accurate estimate of the true error. The condition number provides a measure of the extent to which an uncertainty in x is increased by f(x).

TOTAL NUMERICAL ERROR

  • Error Analysis of Numerical Differentiation
  • Control of Numerical Errors

4.8, the challenge is to identify the point of diminishing returns where round-off errors begin to negate the benefits of step size reduction. The point of diminishing returns is shown where round-off errors begin to negate the benefits of step size reduction. We can see that the total error of the finite-difference approximation consists of a rounding error, which increases with step size, and a truncation error, which decreases with step size.

BLUNDERS, FORMULATION ERRORS, AND DATA UNCERTAINTY

  • Blunders
  • Formulation Errors
  • Data Uncertainty

The rest of the book discusses formulation errors in some technical applications in more detail. Interpret your results based on the residual term of the Taylor series expansion. The error is equal to the absolute value of the difference between the given function and the specific Taylor series expansion.

EPILOGUE: PART ONE

Inexpensive software is widely available to implement numerical methods that can be easily adapted to a wide variety of problems. The numerical methods available to solve any particular type of problem include the types of trade-offs just discussed and others: The epilogue to each part of the book will also include a section to facilitate and encourage further study of numerical methods.

PART TWO

ROOTS OF EQUATIONS

GRAPHICAL METHODS

A simple method of obtaining an estimate of the square root of the equation f(x)=0 is to graph the function and see where it crosses the x-axis. The validity of the graphical estimate can be checked by substituting it into Eq. that's almost zero. A more detailed view of the behavior of f(x) is obtained by changing the plot range from x=3 to x=5, as shown in Figure 2.

THE BISECTION METHOD

  • Termination Criteria and Error Estimates
  • Bisection Algorithm
  • Minimizing Function Evaluations

This estimate represents a true percentage relative error of εt=5.3% (note that the true value of the root is 14.7802). We concluded Example 5.3 by stating that the method can be continued to obtain a refined estimate of the root. Although the approximate error does not provide an exact estimate of the true error, Fig.

THE FALSE-POSITION METHOD

  • Pitfalls of the False-Position Method
  • Modified False Position

Use the false position method to determine the root of the same equation studied in Example 5.1 [Eq. Note how the error for false position drops much faster than for halving due to the more efficient root placement scheme in the false position method. Thus, the quantity in the numerator of Eq. 5.2) actually represents the discrepancy in the previous iteration.

INCREMENTAL SEARCHES AND DETERMINING INITIAL GUESSES

So for this case it is slightly more efficient than bisecting and is much better than the unmodified misposition method. Start with initial guesses of xl=0.1 and xu=0.2 and iterate until the approximate relative error falls below 2%. Use (a) the graphical method and (b) the false position method to obtain the solutions. 5.23 Integrate the algorithm described in Figure 5.10 into a complete, user-friendly halving subroutine. a) Arrange the documentation statements throughout the subroutine to determine what each section is supposed to accomplish.

SIMPLE FIXED-POINT ITERATION

  • Convergence
  • Algorithm for Fixed-Point Iteration

The two-curve method can now be used to illustrate the convergence and divergence of fixed-point iteration. In other words, convergence occurs when the magnitude of the slope of g(x) is less than the slope of the line f(x)=x. The right side of this equation is the slope of the line connecting g(a) and(b).

THE NEWTON-RAPHSON METHOD

  • Termination Criteria and Error Estimates
  • Pitfalls of the Newton-Raphson Method
  • Algorithm for Newton-Raphson

That is, the error is roughly proportional to the square of the previous error, as in Apart from the derivation, the Taylor series can also be used to estimate the error of the formula. This example therefore illustrates that the error of the Newton-Raphson method for this case is in fact roughly proportional (by a factor of 0.18095) to the square of the error of the previous iteration.

THE SECANT METHOD

  • Algorithm for the Secant Method
  • Modified Secant Method

Recall that in the false position method, the last estimate of the square root replaces the original value that yielded a function value with the same sign as f(xr). As a result, the two values ​​can sometimes be on the same side of the square root. The inferiority of the false position method is due to the fact that one end remains fixed to maintain the bracket of the root.

BRENT’S METHOD

  • Inverse Quadratic Interpolation
  • Brent’s Method Algorithm

In that case we could determine a quadratic function of x that passes through the three points (Fig. 6.10b). If the three points are denoted as (xi−2,yi−2), (xi−1,yi−1) and (xi,yi), a quadratic function of y passing through the points can be generated as. If the three y values ​​are not different (that is, yi−2=yi−1or yi−1=yi), then no inverse square function exists.

MULTIPLE ROOTS

It can be shown that the Newton-Raphson and the secant methods are linearly, rather than quadratically, convergent for multiple roots (Ralston and Rabinowitz, 1978). Of course, this may be an unsatisfactory alternative because it depends on prior knowledge of the diversity of the root. Another alternative, also suggested by Ralston and Rabinowitz (1978), is to define a new function u(x), that is, the relation between the function and its derivative, as i.

SYSTEMS OF NONLINEAR EQUATIONS

  • Fixed-Point Iteration
  • Newton-Raphson

As with fixed-point iteration, the Newton-Raphson approach will often diverge if the initial guesses are not sufficiently close to the true roots. If using Newton-Raphson or the modified secant method, use an initial guess of xi=1. If using Newton-Raphson or the modified secant method, use an initial guess of xi=0.7.

POLYNOMIALS IN ENGINEERING AND SCIENCE

In this chapter we discuss methods for finding the roots of polynomial equations with the general form. If the discriminant(a21−4a2a0) is positive, the roots are real and the general solution can be represented as. If the discriminant is zero, a single real root arises and the general solution can be formulated as.

COMPUTING WITH POLYNOMIALS

  • Polynomial Evaluation and Differentiation
  • Polynomial Deflation

Now, suppose we divide this fifth-order polynomial by any of its factors, for example, x+3. A simple scheme is provided by the following pseudocode, which divides an nth-order polynomial by a. The result is a polynomial q of order (n−m), with a polynomial of order (m−1) as a remainder.

CONVENTIONAL METHODS

In this case it is preferable to first divide by the roots of the smallest absolute value. Conversely, in backward deflation (that is, from the zero-order term to the highest-order term), it is preferable to first divide by the roots of the largest absolute value. Another way to reduce rounding errors is to consider each successive main estimate obtained during deflation as a good first estimate.

MÜLLER’S METHOD

Referensi

Dokumen terkait

Of these, 15,224 4,719 households from the DRC, 1,620 478 households from Zambia and 182 79 households from the Republic of Congo.9 In May 2013, following a Cabinet decision, the South