10.0 KB · commit a9602da
In practical applications, an engineer would finally obtain results in a numerical form. For example, from a set of tabulated data derived from an experiment, inferences may have to be drawn; or, a system of linear algebraic equations is to be solved. The aim of numerical analysis is to provide efficient methods for obtaining numerical answers to such problems. This book deals with methods of numerical analysis rather than the analysis of numerical methods, because our main concern is to provide computer-oriented, efficient and reliable numerical methods for solving problems arising in different areas of higher mathematics. The areas of numerical mathematics, addressed in this book, are:
(a) Algebraic and transcendental equations: The problem of solving nonlinear equations of the type f(x)=0 is frequently encountered in engineering. For example, the equation M0−uftM0=e(u+gt)/u0(1.1) is a nonlinear equation for t when M0, g, u, u0 and uf are given. Equations of this type occur in rocket studies.
(b) Interpolation: Given a set of data values (xi,yi), i=0,1,2,…,n, of a function y=f(x), where the explicit nature of f(x) is not known, it is often required to find the value of y for a given value of x, where x0<x<xn. This process is called interpolation. If this process
is carried out for functions of several variables, it is called multivariate interpolation.
(c) Curve fitting: This is a special case where the data points are subject to errors, both round off and systematic. In such a case, interpolation formulae yield unsatisfactory solutions. Experimental results are often subject to errors and, in such cases, the method is to fit a curve which passes through the data points and then use the curve to predict the intermediate values. This problem is usually referred to as data smoothing.
(d) Numerical differentiation and integration: It is often required to determine the numerical values of (i) dxdy,dx2d2y,…, for a certain value of x in x0≤x≤xn, and (ii) I=∫x0xnydx, where the set of data values (xi,yi), i=0,1,…,n is given, but the explicit nature of y(x) is not known. For example, if the data consist of the angle θ (in radians) of a rotating rod for values of time t (in seconds), then its angular velocity and angular acceleration at any time can be computed by numerical differentiation formulae.
(e) Matrices and linear systems: The problem of solving systems of linear algebraic equations and the determination of eigenvalues and eigenvectors of matrices are major problems of disciplines such as differential equations, fluid mechanics, theory of structures, etc.
(f) Ordinary and partial differential equations: Engineering problems are often formulated in terms of an ordinary or a partial differential equation. For example, the mathematical formulation of a falling body involves an ordinary differential equation and the problem of determining the steady-state distribution of temperature on a heated plate is formulated in terms of a partial differential equation. In most cases, exact solutions are not possible and a numerical method has to be adopted. In addition to the finite difference methods, this book also presents a brief introduction to the cubic spline method for solving certain partial differential equations.
(g) Integral equations: An equation in which the unknown function appears under the integral sign is known as an integral equation. Equations of this type occur in several areas of higher mathematics such as aerodynamics, elasticity, electrostatics, etc. A short account of some well-known methods is given.
In the numerical solution of problems, we usually start with some initial data and then compute, after some intermediate steps, the final results. The given numerical data are only approximate because they may be true to two, three or more figures. In addition, the
methods used may also be approximate and therefore the error in a computed result may be due to the errors in the data, or the errors in the method, or both. In Section 1.3, we discuss some basic ideas concerning errors and their analyses, since such an understanding is essential for an effective use of numerical methods. Before discussing about errors in computations, we shall first look into some important computer languages and software.
It is well known that computers and mathematics are two important tools of numerical methods. Prior to 1950, numerical methods could only be implemented by manual computations, but the rapid technological advances resulted in the production of computing machines which are faster, economical and smaller in size. Today's engineers have access to several types of computing systems, viz., mainframe computers, personal computers and super computers. Of these, the personal computer is a smaller machine which is useful, less expensive and, as the name implies, can easily be possessed and used by individuals. Nevertheless, mere possession of a computer is not of great consequence; it can be used effectively only by providing suitable instructions to it. These instructions are known as software. It is therefore imperative that we develop suitable software for an effective implementation of numerical methods on computers.
Essentially, there are three phases in the development of numerical software for solving a problem. In the first phase, the problem to be solved must be formulated mathematically indicating the input and outputs and also the checks to be made on the solution. The second phase consists of choosing an algorithm, i.e., a suitable numerical procedure to solve the mathematical problem. An algorithm is a set of instructions leading to the solution of the mathematical problem, and also contains information regarding the accuracy required and computation of error in the solution. In the final phase, the algorithm must be transformed into a computer program (called code) which is a set of step-by-step instructions to the computer written in a computer language. Usually, it may be preferable to prepare a flowchart first and then transform the flowchart into a computer program. The flowchart consists of the step-by-step procedures, in block form, which the computer will follow and which can easily be understood by others who wish to know about the program. It is easy to see that the flowchart enables a programmer to develop a quality computer program using one of the computer languages listed in the next section. However, experienced programmers often transform a detailed algorithm into an efficient computer program.
Several computer languages have so far been developed and there are limitations on every language. The question of preferring a particular language over
others depends on the problem and its requirements. We list below some important problem-solving languages, which are currently in use:
(a) FORTRAN: Standing for FORmula TRANslation, FORTRAN was introduced by IBM in 1957. Since then, it has undergone many changes and the present version, called FORTRAN 90, is favoured by most scientists and engineers. It is readily available on almost all computers and one of its important features is that it allows a programmer to express the mathematical algorithm more precisely. It has special features like extended double precision, special mathematical functions and complex variables. Besides, FORTRAN is the language used in numerically oriented subprograms developed by many software libraries. For example, (IMSL) (International Mathematical and Statistical Library, Inc.) consists of FORTRAN subroutines and functions in applied mathematics, statistics and special functions. FORTRAN programs are also available in the book, Numerical Recipes, published by the Cambridge University Press, for most of the standard numerical methods.
(b) C: This is a high-level programming language developed by Bell Telephone Laboratories in 1972. Presently, it is being taught at several engineering colleges as the first computer language and is therefore used by a large number of engineers and scientists. Computer programs in C for standard numerical methods are available in the book, Numerical Recipes in C, published by the Cambridge University Press.
(c) BASIC: Originally developed by John Kemeny and Thomas Kurtz in 1960, BASIC was used in the first few years only for instruction purposes. Over the years, it has grown tremendously and the present version is called Visual Basic. One of its important applications is in the development of software on personal computers. It is easy to use.
It is well known that the programming effort is considerably reduced by using standard functions and subroutines. Several software packages for numerical methods are available in the form of 'functions' and these are being extensively used by engineering students. One such package is MATLAB, standing for MATrices LABoratory. It was developed by Cleve Moler and John N. Little. As the name implies, it was originally founded to develop a matrix package but now it incorporates several numerical methods such as root-finding of polynomials, cubic spline interpolation, discrete Fourier transforms, numerical differentiation and integration, ordinary differential equations and eigenvalue problems. Besides, MATLAB has excellent display capabilities which can be used in the case of two-dimensional problems. Using the
MATLAB functions, it is possible to implement most of the numerical methods on personal computers and hence it has become one of the most popular packages in most laboratories and technical colleges. MATLAB has its own programming language and this is described in detail in the text by Stephen J. Chapman.*
*Published by Thomson Asia Pte. Ltd., Singapore (2002).