EMATH 311 Introduction Ee

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

EMATH 311

Numerical Methods and Analysis


Course Outline:
Introduction to Numerical Methods
Roots of Nonlinear Equations
Solving roots Systems of Linear Equation
Curve Fitting and Interpolation
Numerical Differentiation
Numerical Integration
Solutions of ODE : Initial Value Problems
Solutions of ODE : Boundary Value Problems
Introduction
Numerical analysis is a way to solve mathematical problems
by special procedures (algorithms) which use arithmetic
operations only.
Modern numerical analysis and scientific computing
developed quickly and on many fronts. In this course, our
focus is on solution of nonlinear equations, numerical linear
algebra, numerical methods for differential and integral
equations, methods of approximation of functions, and the
impact of these developments on science and technology.
Problems solvable by numerical analysis
The following problems are some of the mathematical problems that can be solved using
numerical analysis:
(1) Solving nonlinear equations f(x) = 0.
(2) Solving large systems of linear equations.
(3) Solving systems of nonlinear equations.
(4) Interpolating to find intermediate values within a table of data.
(5) Fitting curves to data by a variety of methods.
(6) Finding efficient and effective approximations of functions.
(7) Finding derivatives of any order for functions even when the function is known only as
a table of values.
(8) Integrating any function even when known only as a table of values.
(9) Solving differential equations.
Differences between numerical and analytic methods
(1) Numerical solution is always numerical while
analytic solution is given in terms of functions. Thus
analytic solution has the advantage that it can be
evaluated for specific instance and behavior and
properties of the solution are often apparent.

(2) Analytic methods give exact solutions while


numerical methods give approximate solutions.
Computer and Numerical Analysis
Numerical methods require such tedious and repetitive arithmetic operations that
only when we use computer it is practical to solve problems by numerical methods.
A human would make so many mistakes that there would be little confidence in the
result. In addition, the manpower cost would be more than could normally be
afforded. Thus computer and numerical analysis make a perfect combination.
To use computers in numerical analysis we must write computer programs. The
computer language is not important; one can use any language. Actually, writing
programs is not always necessary. Numerical analysis is so important that extensive
commercial software packages are available.
Many such symbolic programs are available including Sage (System for Algebra
and Geometry Experimentation), Freemat, Mathematica, Derive, MAPLE.
MathCad, MATLAB, and MacSyma.
Computer Arithmetic and Errors
The analysis of computer errors and the other sources
of error in numerical methods is a critically important
part of the study of numerical analysis. There are
several possible sources of errors in addition to those
due to the inexact arithmetic of the computer.
Inexactness of the mathematical model and measurements
Real-world problems, which an existing or proposed
physical situation is modeled by a mathematical equation,
will nearly always have coefficients that are not known
exactly. The reason is that the problems often depend on
measurements of doubtful accuracy. Further, the model
itself may not reflect the behavior of the situation perfectly.
These sources of error are the domain of mathematical
modeling and the domain of the experimentalists, and will
not be our subject in this course.
Truncation error
Truncation errors are errors caused by the method itself. The term
originates from the fact that numerical methods can usually compared
to a truncated Taylor series. For example, we know that We may
approximate e x by the cubic

The error in this approximation is due to truncating the series and has
nothing to do with the computer or calculator. Many numerical methods
are iterative and we would reach the exact answer only if we apply the
method infinitely many times. But life is finite and computer time is
costly. Thus we must be satisfied with an approximation to the exact
analytic answer. The error in this approximation is a truncation error.
Round-off error
The error that is produced when a calculator or
computer is used to perform real-number calculations
is called round-off error. It occurs because the
arithmetic performed in a machine involves numbers
with only a finite number of digits, with the result that
calculations are performed with only approximate
representations of the actual numbers.
Blunders
Since humans are involved in programming, operation,
input preparation, and output interpretation, blunders
or gross errors do occur more frequently than we like
to admit. The solution here is care coupled with a
careful examination of the results for reasonableness.
Sometimes a test run with known results is
worthwhile, but it is no guarantee of freedom from
foolish error.
Propagated error
By propagated error we mean an error in the succeeding steps of a
process due to an occurrence of an earlier error-such error is in
addition to the local errors. It is somewhat analogous to errors in the
initial conditions. Propagated error is of critical importance. If errors
are magnified continuously as the method continues, eventually they
will overshadow the true value, destroying its validity; we call such a
method unstable. For stable method, the desirable kind, errors made
at early points die out as the method continue.
Remark. Each of these types of error, while interacting to a degree,
may occur even in the absence of the other kinds.
Floating-point arithmetic
In order to examine round-off error in detail we need to
understand how numeric quantities are represented in
computer. An unfortunate fact of life is that any digital
computer can only store finitely many quantities. Thus, a
computer can not represent the infinity set of integers, the
set rational numbers, set of real numbers, or the set
complex numbers. So the decision of how to deal with
more general numbers using only the finitely many that the
computer can store becomes an important issue.
Overflow and underflow
Numbers occurring in calculations that have too small
a magnitude to be represented result in underflow, and
are generally set to 0 with computations continuing.
However, numbers occurring in calculations that have
too large a magnitude to be represented result in
overflow and typically cause the computations to stop
(unless the program has been designed to detect this
occurrence)
Accuracy and Precision
Absolute and relative errors

Source: http://site.iugaza.edu.ps/asakka
Suppose that you have the task of measuring the lengths of a bridge and a rivet and come up
with 9999 and 9 cm, respectively. If the true values are 10,000 and 10 cm, respectively,
compute (a) the true error and (b) the true percent relative error for each case.

You might also like