Lecture 1 Introduction To Numerical Analysis

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

Introduction to Numerical Analysis

1.1 Analysis versus Numerical Analysis


The word analysis in mathematics usually means who to solve a problem through
equations. The solving procedures may include algebra, calculus, differential
equations, or the like.

Numerical analysis is similar in that problems solved, but the only procedures that
are used are arithmetic: add, subtract, multiply, divide and compare.

Differences between analytical solutions and numerical solutions:

1) An analytical solution is usually given in terms of mathematical functions. The


behavior and properties of the function are often apparent. However, a numerical
solution is always an approximation. It can be plotted to show some of the
behavior of the solution.

2) An analytical solution is not always meaningful by itself.

Example: 3 as one of the roots of x 3  x 2  3x  3  0 .

3) While the numerical solution is an approximation, it can usually be evaluated as


accurate as we need. Actually, evaluating an analytic solution numerically is
subject to the same errors.

1.2 Computers and Numerical Analysis

Numerical Methods+Programs Computers


Numerical Analysis

 As you will learn enough about many numerical methods, you will be able to
write programs to implement them.
 Programs can be written in any computer language. In this course all programs
will be written in Matlab environment.
 Actually, writing programs is not always necessary. Numerical analysis is so
important that extensive commercial software packages are available.

Numerical Analysis/Lec. 1 1
Third Class
1.3 Types of Equations

The equations is divided into three main categories such as in below figure:-

1.4 Kinds of Errors in Numerical Procedures

The total error comprises of:

1) Model Error: due to the mismatch between the physical situation and the
mathematical model.

2) Data Error: due to the measurements of doubtful accuracy.

3) Human Error: due to human blunders.

4) Propagated Error: the error in the succeeding steps of a process due to an


occurrence of an earlier error.

5) Truncation Error: the notion of truncation error usually refers to errors introduced
when a more complicated mathematical expression is “replaced” with a more
elementary formula. This formula itself may only be approximated to the true values,
thus would not produce exact answers.

Numerical Analysis/Lec. 1 2
Third Class
Example 1.1:
Truncation of an infinite series to a finite series to a finite number of terms leads to
the truncation error. For example, the Taylor series of exponential function
x 2 x3 xn
ex  1  x    ... 
2! 3! n!
If only four terms of the series are used, then
x2 x3
ex  1 x  
2! 3!
12 13
e1  1  1    2.66667
2! 3!

The truncation error would be the unused terms of the Taylor series, which then are
x4 x5 14 15
Et         0.0516152
4! 5! 4! 5!

Check a few Taylor series approximations of the number ex, for x = 1, n = 2, 3 and 4.
Given that e1 = 2.718281.

Approximation Percent relative


Order of n Absolute error
for ex error
2 2.500000 0.218281 8.030111%
3 2.666667 0.051614 1.898774%
4 2.708333 0.00995 0.365967%

6) Round-Off Error: A round-off error, also called rounding error, is the


difference between the calculated approximation of a number and its exact
mathematical value due to rounding

Example 1.2:
Numbers such as , e, or 3 cannot be expressed by a fixed number of decimal
places. Therefore they cannot be represented exactly by the computer.
Consider the number . It is irrational, i.e. it has infinitely many digits after the
period:  = 3.1415926535897932384626433832795.....
The round-off error computer representation of the number  depends on how many
digits are left out.

Numerical Analysis/Lec. 1 3
Third Class
Let the true value for  is 3.141593.

Number of digits Approximation Percent relative


Absolute error
(Decimal digit) for  error
1 3.1 0.041593 1.3239%
2 3.14 0.001593 0.0507%
3 3.142 0.000407 0.0130%

1.5 Errors in Numerical Procedures


There are two common ways to express the size of the error in a computed result:
absolute error and relative error.

 Absolute error = | true value – approximate value |, which is usually used when the
magnitude of the true value is small.

| true value - approximate value |


 Relative error = | true value |
, which is a desirable one.

While
true value  approximate value
Percent relative error,  t   100%
true value

Numerical Analysis/Lec. 1 4
Third Class

You might also like