Sei sulla pagina 1di 7

STR 683:

683: Advanced Acknowledgement


Numerical Analysis  Prof.Dr. Sherif Mourad
 Dr. Magdy El-
El-Sheikh
Instructor
 Dr. Eman Elmaghraby
Dr. Ahmed Amir Bayoumy Khalil

Website
 www.egypteducation.org
 Make your own username and password
 Use full name in both user name and profile
 Receive email (check junk or spam)!
 Postgraduate - Structural Engineering ---
Numerical analysis
 Enrolment key: Numerical
Numerical2010
2010
 Has notes
 Will have assignments

IMPORTANT!!! Objectives
 Learn how to apply basic numerical
 USEYOUR FULL NAME FOR
FOR BOTH techniques
USER NAME AND PROFILE  Understand common problems
 Understand common advantages
 Be able to learn other techniques and
apply them
 Become skilled in using computers
programs to solve numerical problems
 Be able to analyze and evaluate numerical
algorithms

1
Course Outline Evaluation
 Introduction and Review  20
20%% Term Work
 Systems of Linear Algebraic Equations
Assignments
 Eigen problems
In
In--Class Assignments
 Nonlinear Equations
 Polynomial Approximation and Interpolation  80
80%% Final Exam
 Numerical Differentiation & Difference Formulas
 Numerical Integration
 Discretization and the Finite Difference Method
 Weighted Residual Approach
 Piecewise Trial Functions and the Finite Element Method

Useful books (1
(1)
Course References
 Notes: Available on website without
figures
 Books: many, some on the website
 Presentations: on the website
 There are two versions: 2006
2006//2007 and
2007//2008;
2007 2008; use 2008 unless otherwise Bartels
noted
Math and Computer Science
Intensive Math, Quite long intro

Useful books (2
(2) Useful books (3
(3)
 Hoffman
 Mechanical
Engineering

 Cheney
 Computer Science

2
DJVU Viewer
 http://www.lizardtech.com/download/ Assignment Rules
 DJVU browser plug-
plug-in for windows
 Submit online
 Can be hand written and scanned if
necessary; does not have to be typed
 Deliver on due date ELSE lose 30
30%%
 No Plagiarism ELSE lose 100%
100%
 No Cheating ELSE lose 20
20%
%

Flow Chart
Algorithm
A diagram A fully-
fully-specified step
step--by
by--step procedure for
solving a mathematical problem in a finite
that shows a number of steps, often involving repetition of an
step-by- operation or more than one operation.
step Clear, Detailed, Pseudo-
Pseudo-code
progression Use
through a Read or Input
Write, Print, or Output
procedure

Decisions: If, Then, Else


or system Loops: Do, While; Repeat, Until, For i=1
i=1 to 10
10

Algorithm Survey
1. Read N=Number of lamps - Fresh graduates
2. For Lamp = 1 to N - Cairo 32
i. Check Lamp - Ainshams/
Ainshams/Helwan/
Helwan/Azhar 11
ii. If lamp plugged in go to iii else plug lamp - Shubra 8
and go to 2
- Other cities 8
iii. If bulb Burned out change bulb and go to 2
iv. Set counter=counter + +1
1 and go to 2 - Other countries
3. Write No. of Needed Lamps = counter - Private 16

3
Chapter 1
Notation SYSTEMS OF LINEAR
a11 x1 + a12 x2 + ... ... + a1n xn = c1
a21 x1 + a22 x2 + ... ... + a2 n xn = c2
ALGEBRAIC EQUATIONS
Equations
. . . . . = ... [K]{x}={F} or [A]{x}={b}:
. . . . . = ...
. . . . . = ... a11 x1 + a12 x 2 + ... ... + a1n x n = c1
an1 x1 + an 2 x2 + ... ... + ann xn = cn a 21 x1 + a 22 x 2 + ... ... + a 2 n x n = c2
Index notation aij x j = ci . . . . . = ...
. . . . . = ...
. . . . . = ...
Matrix notation [ A]nxn {X }nx1 = {C}nx1 a n1 x1 + a n 2 x 2 + ... ... + a nn x n = cn

Chapter 1 Comparison
SYSTEMS OF LINEAR  Direct methods:
ALGEBRAIC EQUATIONS  systematic procedures, algebraic elimination,
 a fixed number of operations
 The are two categories of methods  Gauss Elimination, Gauss-
Gauss-Jordan, Matrix Inversion,
and LU Decomposition.
 Direct methods
 Iterative methods
 Iterative methods
 Asymptotic, Iterative procedure
 Variable no. of iterations (operations)
 trial solution, substituted into the system, determine
the mismatch, improved solution
 Jacobi, Gauss-
Gauss-Seidel, Relaxation, and Successive
Over Relaxation.

Direct methods are useful when: Diagonally Dominant?


2 7 3
 The number of equations is small (less than
100????).
100????). 5 1 10
 Most of the coefficients aij are non-
non-zero. 15 2 5 15 2 5
 The system is NOT diagonally dominant.
dominant.
 The system of equations is ill conditioned.
conditioned. 2 7 3
5 1 10

4
Diagonally Dominant? Ill
Ill--Conditioned Matrix

1 2 x1 3
2 5 5 =
2 4.0001 x2 6.0001
5 2 5
5 5 2 1 2 x1 3
=
2 4 .0001 x 2 6

Solve the following equations


Ill-
Ill-Conditioned Matrix 1 2 x 1 0
1 2 x1 3
= =
 An ill-
ill-conditioned
1 2 2 4.0001 x 2 6.0001 2 4.0001 x 2 0
matrix can represent
the equations of two

2 4.0001 1 2 x1 3 1 2 x 1 0
lines that are almost = =
parallel, but not quite. 2 4 x 2 6 2 4 x 2 0
 Another type of ill-
ill-
conditioned matrix is 1000 0.01 0.1 1 2 x1 3
when we have matrix =
values that vary by 5 0.0001 1 2 4 x 2 6.0001
several degrees of 10 0.0002 10
magnitude. 1 2 x1 3
=
2 4 .0001 x 2 6

For a system of linear equations,


Submit online before next week there are four possibilities:
 You will find a link to upload A unique solution (consistent set of
 Browse to the file on your computer and equations).
upload  No solution (inconsistent set of equations).
 You can zip the file to reduce its size or  Infinite number of solutions (consistent set
to submit more than one file of equations).
 Can be scanned but watch the file size  The trivial solution (set of homogeneous
 Can use Excel equations, [A]{x}=0
[A]{x}=0)
 Add your conclusions in your own
language

5
Gauss Jordan Example Gauss Jordan Example
5 x1 + 2 x2 + x3 = +3 5 2 1 3
4 x1 + x2 x3 = 3
4 1 1 3
2 x1 + 3 x 2 3 x3 = +5
2 3 3 5
5 2 1 3 1 0.4 0.2 0.6
4 1 1 3 4 1 1 3
2 3 3 5 2 3 3 5

Gauss Jordan Example Gauss Jordan Example


1 0.4 0.2 0.6 1 0.4 0.2 0.6
4 1 1 3 0 0.6 1.8 5.4
2 3 3 5 0 3.8 2.6 6.2

1 0.4 0.2 0.6 1 0 1 3


0 0.6 1.8 5.4 0 1 3 9
0 3.8 2.6 6.2 0 0 14 28

Gauss Jordan Example Gauss Jordan Example


1 0 1 3 1 0 1 3
0 1 3 9 0 1 3 9
0 0 14 28
0 0 1 2
1 0 1 3 1 0 0 1
0 1 3 9 0 1 0 3
0 0 1 2 0 0 1 2

6
Gauss Jordan to get Inverse
5 2 1 1 0 0
4 2 1 0 1 0
2 3 3 0 0 1

1 0 0 0 9/ 42 1/14
0 1 0 1/ 3 13/ 42 3/14
0 0 1 1/ 3 19/ 42 1/ 4

Potrebbero piacerti anche