Lecture 1 Introduction To Numerical Analysis
Lecture 1 Introduction To Numerical Analysis
Lecture 1 Introduction To Numerical Analysis
Numerical analysis is similar in that problems solved, but the only procedures that
are used are arithmetic: add, subtract, multiply, divide and compare.
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) Model Error: due to the mismatch between the physical situation and the
mathematical model.
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.
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.
Absolute error = | true value – approximate value |, which is usually used when the
magnitude of the true value is small.
While
true value approximate value
Percent relative error, t 100%
true value
Numerical Analysis/Lec. 1 4
Third Class