0% found this document useful (0 votes)
35 views55 pages

Numerical Methods - Chap2

Advanced math and calculus of using functions to find roots

Uploaded by

naamahbadawah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views55 pages

Numerical Methods - Chap2

Advanced math and calculus of using functions to find roots

Uploaded by

naamahbadawah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Maintenance and Industrial Engineering

Numerical Methods
Code Entitled Semester Crédits Course Exercise Lab Total
Numerical
LS4MENU 4 3 12 15 18 45
Methods

Dr. Farah FAYAD


Lebanese University, Faculty of Technology, Saida
[email protected]

Dr. Omar El Deeb


Lebanese University, Faculty of Technology, Aabey
[email protected]

Dr. Farah FAYAD – Dr. Omar El Deeb Numerical Methods 2020-2021 1


Maintenance and Industrial Engineering
Code Entitled Semester Crédits Course Exercise Lab Total
Numerical
LS4MENU 4 3 12 15 18 45
Methods
Department: Maintenance and Industrial Engineering (MIE)
Objectives: The objective is to be familiar with the numerical methods for engineer’s calculation, and their applications in the
field of mathematical calculations.
Contents:
• Solve the equation f(x) = 0: Separating of roots: Experimental method, Roll’s theorem, graphical method. Approximation of a
root: Substitution method, Bisection method, Newton – Raphson method, Fixed-point method.
 Resolution of linear system: Introduction, the direct methods: Cramer’s rule, Gauss method. The iterative methods:
Algorithm of Jacobi, Gauss-Seidel method.
 Numerical solution of differential equation: Introduction, Euler’s method, method using Taylor formula, Runge-Kutta’s
method.
 Polynomial interpolation: Introduction, Interpolation and extrapolation, linear interpolation, quadratic interpolation,
Lagrange interpolation.
 The method of Least Square: Introduction, method of Least Square: straight line, general method, weighted Least Square.
LAB Sessions:
Programming of the different methods by a suitable programming language (C language or any other language) or the use of
Matlab software or any equivalent software.
Dr. Farah FAYAD – Dr. Omar El Deeb Numerical Methods 2020-2021 2
• I- Introduction

• II- Direct methods


• a- Cramer’s Rule
• b- Gauss Jordan Method

• III- The Iterative methods


• a- Algorithm of Jacobi
• b- Method of Gauss Seidel
I- Introduction
• The solution of the system of equation AX = b is a major step in a lot of methods and
software especially: finite element.

• The resolution of linear system is classified into two categories:

• a) Direct Method: leads to the solution of a number of known operations α.

• b) Iterative Method: leads to the solution through a series of operations for the
approximate solution. The number of iterations depends on how close the solution to
the exact solution, but it is difficult to predict since it depends on the structure of the
matrix A.
Direct methods : Cramer’s Rule
Known quantities are : A and b, Unknown: X?

A *X =b
Note how we name the elements in A , X and b
Forms of vector X
X = [ x1, or X = [x,
x2, y,
x3, z]
:
xn]
Example on AX=b
• Extract A and b in following example:
Solve using Cramer’s
Cramer’s method in brief
Ai = is the matrix created by
replacing ith column by vector b

Remember Unkonwn Xi is ith element in vector X.


Let’s apply Cramer to above example!

A1

A2

A3
Solution in Cramer

x1

x2

x3
Example 1 on Cramer’s rule
• Solve by Cramer’s rule the system of equations:
4x – y + z = 7
4x – 8y + z = -21
-2x + y + 5z = 15

Solution:

é 4 éx ù é7 ù
-1 1 ù ê ú
ê ú ê ú
A=ê 4 -8 1 ú X = ê yú b = ê-21ú
ê -2 5 ú êz ú ê15 ú
ë
1
û ë û ë û
é 7 -1 1 ù
ê ú
Ax = ê -21 -8 1 ú
ê 15 1 5 ú
ë û
é 4 7 1 ù
ê ú
Ay = ê 4 -21 1 ú
ê -2 15 5 ú
ë û

é 4 -1 7 ù
ê ú
Az = ê 4 -8 -21 ú
ê -2 1 15 ú
ë û
7 -1 1
-21 -8 1
det( Ax) | Ax | | A1 | 15 1 5
x= = = = =2 =-308/-154
det( A) | A| | A| 4 -1 1
4 -8 1
-2 1 5

4 7 1
4 -21 1
det( Ay) | Ay | | A2 | -2 15 5
=-616/-154
y= = = = =4
det( A) | A| | A| 4 -1 1
4 -8 1
-2 1 5
4 -1 7
4 -8 -21
det( Az) | Az | | A3 | -2 1 15
z= = = = =3 =-462/-154
det( A) | A| | A| 4 -1 1
4 -8 1
-2 1 5
Calculate the determinant of 4 x 4 matrix A
Number of calculations for 4 x 4 matrix done for 5 determinants is (42 - 1)*4! = 360
While it was For 3 x 3 matrix (32 - 1)*3! = 48
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
•A

38
•a

39
•a

40
•c

41
•c

42
•c

43
•c

44
•c

45
•c

46
•c

47
Gauss Seidel
• By Gauss Seidel iterative Method, we calculate:
• x1 from y0 and z0
• y1 from x1 and z0
• z1 from x1 and y1

• Of course
• x2 from y1 and z1 ……
• Gauss Seidel converges Faster than Gauss Jacobi Method.

48
Homework
• Solve the following system using four methods
A) Cramer’s
B) Gauss Jordan
C) Method of Jacobi : x0=0, y0=0,z0=0 error = 0.05
D) Gauss Seidel: x0=0, y0=0,z0=0 error = 0.05

4X - y + 2z = 5
x - 3y + z = 6
2x + y -5 z = -1

49
C)

50
51
52
53
54
55

You might also like