Вы находитесь на странице: 1из 20

INTRODUCTION TO NUMERICAL METHODS

MATH160 – NUMERICAL METHODS


KEVIN D. DUGAY
DEFINITION OF NUMERICAL METHODS
• Numerical Methods is the study of algorithms that use numerical values
(as opposed to general symbolic manipulation) for the problems of
continuous mathematics.
• Numerical analysis involves the development and evaluation of methods
for computing required numerical results from given numerical data.
Numerical methods are techniques by which mathematical problems are
formulated so that they can be solved with arithmetic operations.
• One common characteristics, involve large numbers of tedious arithmetic
calculations.
Input The Output
x(n )
Information Algorithm Information
ANALYTICAL METHOD

Roots of an equation: • Solution have been derived for


some engineering problems using
analytical (or exact) methods.
Differentiation: • In general there are few closed-
form engineering or exact
solutions.
• These solutions are often useful
Integration: and provide excellent insight into

( ) x4 x2 the behavior of an engineering


x + x − e dx =
3 x
+ −ex +C
4 2 system.
NUMERICAL METHOD

Roots of an equation: • It can obtain numerical answers of the


x3 − 2x − 5 = 0 problems that have no “analytic”
x solution.
+ ex = 0
1 + sin x • It does NOT need special substitutions
and integrations by parts.
Integration:
• It needs only the basic mathematical
1
0 e
x3
dx
operations: addition, subtraction,
multiplication and division, plus making
−2 x
30  cos x + x  30 some comparisons.
0 
 x+5 
e dx
NUMERICAL v ANALYTICAL
Numerical Analytical
This method yields an approximate/estimate This method gives an exact value of the
of the answer. answer.

The resulting value obtained from this


method dictates and tells more about The values resulted from the analytical
the behavior of a particular equation or method is less intuitive.
system.
Since there are specific forms for most
Since numerical method is based on
of the analytical methods , it is
repeated algorithms, it can be easily
quite hard to code the initial
coded.
computation.

It is easier to obtain an answer from It is not so easy to get an exact answer


numerical methods. from analytical methods.
APPLICATIONS OF NUMERICAL METHODS
Major Topics
Roots of Equations
• These problems are concerned with the value of a variable that satisfies a
single equation.
• These problems are especially valuable in engineering design contexts
where it is often impossible to explicitly solve design equation for
parameters.
APPLICATIONS OF NUMERICAL METHODS
Major Topics
Systems of Linear Simultaneous Equations.
• Similar to roots of equations in the sense that are concerned with values
that satisfy equations.
• A set of values is sought that simultaneously satisfies a set of linear
algebraic equations.
APPLICATIONS OF NUMERICAL METHODS
Major Topics
Interpolation
• Interpolation is used where the objective is to determine intermediate
values between relatively error-free data points such as the case of
tabulated information.
• For these situations, the strategy is to fit a curve through the data points
and use the curve to predict the intermediate values.
APPLICATIONS OF NUMERICAL METHODS
Major Topics
Differentiation & Integration
• A number of engineering problems require a numerical derived estimate
of a derivative of a function f(x).

• Integration is important for the solution of differential equations.


APPLICATIONS OF NUMERICAL METHODS
Major Topics
Differential Equations
• Both ordinary and partial differential equations are of great importance in
engineering practice.
• This is because many physical laws are presented in terms of the rate of
change of a quantity, rather than the magnitude.
• Two types addressed:
• Initial-value problems
• Boundary-value problems
TAYLOR SERIES
• The general form of the Taylor series is given by
f (a ) 2 f (a ) 3
f ( x ) = f (a ) + f (a )x + x + x +
2! 3!
provided that all derivatives of f(x) are continuous and exist in the interval
[a,x] n
f (k ) (c )
f (x ) =  (x − c ) + error
k

k =0 k!
f ' (c ) f '' (c ) f (n ) (c )
f ( x ) = f (c ) + (x − c ) + + (x − c ) +  + (x − c )n + Rn (x )
2

1! 2! n!

f (n +1) (a )
Rn (x ) = (x − a )n+1 The function Rn(x) represents the error
(n + 1)! where a is a value between x and c.
TAYLOR SERIES
Examples of Taylor Series
Because the higher derivatives of
n
1
some functions repeat in a =  x k = 1 + x + x 2 + x3 + 
recognizable pattern we are able to 1 − x k =0
 k 2 3
get a few "standard" Taylor Series x x x x
ex =  = 1+ + + +
expansions. k = 0 k! 1! 2! 3!

sin x = 
n
(− 1) x 2 k +1
k
x3 x5
= x − + 
k = 0 (2k + 1)! 3! 5!

cos x = 
n
( − 1) x 2 k
k
x2 x4
= 1− + 
k =0 (2k )! 2! 4!
TRUE ERROR AND RELATIVE ERROR

• Direct methods compute the solution to a problem in a finite number of


steps.
• Iterative methods are not expected to terminate in a number of steps.
Starting from an initial guess, iterative methods form successive
approximations that converge to the exact solution only in the limit.
• A convergence criterion is specified in order to decide when a sufficiently
accurate solution has (hopefully) been found.
TRUE ERROR AND RELATIVE ERROR
• Numerical methods can provide a solution to a problem, but the answer
will not always be the exact solution.
• The accuracy we obtain is related to
• The technique used
• The limits we work with
• Step sizes, number of iterations, etc.
• With the greatest accuracy, there is the least amount of error in the
calculation.
TRUE ERROR AND RELATIVE ERROR
TWO ISSUES OF NUMERICAL ANALYSIS:
• How to compute?
• This corresponds to algorithmic aspects;
• How accurate is it?
• That corresponds to error analysis aspects.
TRUE ERROR AND RELATIVE ERROR
Types of Errors
• Truncation error (finite speed and time) - An example:

• Round-off error (finite word length): All computing devices represent


numbers with some imprecision, except for integers.
• Human errors:
(a) Mathematical equation/model.
(b) Computing tools/machines.
(c) Error in original data.
(d) Propagated error
TRUE ERROR AND RELATIVE ERROR
Types of Errors
Round off Error :
• Caused by representing a number approximately.

1
 0.333333
3

2  1.4142...
TRUE ERROR AND RELATIVE ERROR
Why measure errors?
• To determine the accuracy of numerical results.
• To develop stopping criteria for iterative algorithms.
TRUE ERROR AND RELATIVE ERROR
MEASURE OF ERRORS:
EXAMPLE
• Let the true value of p be 3.1415926535898 and its approximation be
3.14 as usual. Compute the absolute error and relative error of such an
approximation.

Вам также может понравиться