ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.

Slides:



Advertisements
Similar presentations
Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations...
Advertisements

Simultaneous Linear Equations
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Chapter 18 Interpolation The Islamic University of Gaza
Refresher: Vector and Matrix Algebra Mike Kirkpatrick Department of Chemical Engineering FAMU-FSU College of Engineering.
Solution of linear system of equations
Chapter 9 Gauss Elimination The Islamic University of Gaza
Major: All Engineering Majors Author(s): Autar Kaw
MF-852 Financial Econometrics
Linear Algebraic Equations
Curve-Fitting Interpolation
Special Matrices and Gauss-Siedel
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 20 Solution of Linear System of Equations - Iterative Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 19 Solution of Linear System of Equations - Iterative Methods.
Revision.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
Review of Matrix Algebra
Special Matrices and Gauss-Siedel
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 22 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 15 Solution of Systems of Equations.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 18 LU Decomposition and Matrix Inversion.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Matrices and Determinants
Chapter 5 Determinants.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Linear Algebra & Matrices MfD 2004 María Asunción Fernández Seara January 21 st, 2004 “The beginnings of matrices and determinants.
Major: All Engineering Majors Author(s): Autar Kaw
Chapter 8 Objectives Understanding matrix notation.
ECON 1150 Matrix Operations Special Matrices
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Part 31 Linear.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
ENM 503 Block 2 Lesson 7 – Matrix Methods
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 11.
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Lecture 28: Mathematical Insight and Engineering.
Matrix Algebra and Regression a matrix is a rectangular array of elements m=#rows, n=#columns  m x n a single value is called a ‘scalar’ a single row.
Chemical Engineering Majors Author(s): Autar Kaw
Linear Algebra 1.Basic concepts 2.Matrix operations.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Chapter 5 MATRIX ALGEBRA: DETEMINANT, REVERSE, EIGENVALUES.
Chapter 9 Gauss Elimination The Islamic University of Gaza
Topic 6: ALGEBRA Matrices and Matrix OperationsMatrices and Matrix Operations Determinants and Inverse Matrices Determinants and Inverse Matrices System.
Matrices and Determinants
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Numerical Computation Lecture 6: Linear Systems – part II United International College.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Interpolation - Introduction
ROOTS OF EQUATIONS. Graphical Methods A simple method for obtaining the estimate of the root of the equation f(x)=0 is to make a plot of the function.
MTH108 Business Math I Lecture 20.
Matrices and Vector Concepts
Chapter 7 Matrix Mathematics
Simultaneous Linear Equations
Gaussian Elimination.
Numerical Analysis Lecture14.
CSE 541 – Numerical Methods
Linear Systems Numerical Methods.
Chapter 11 Chapter 11.
Presentation transcript:

ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II

Topics Introduction to Matrix Algebra Gauss Elimination LU Decomposition Matrix Inversion Iterative Methods Function Interpolation & Approximation Newton Polynomials Lagrange Polynomials

Matrix Algebra Rectangular Array of Elements Represented by a single symbol [A]

Matrix Algebra Row 1 Row 3 Column 2Column m n x m Matrix

Matrix Algebra 3 rd Row 2 nd Column

Matrix Algebra 1 Row, m Columns Row Vector

Matrix Algebra n Rows, 1 Column Column Vector

Matrix Algebra If n = m Square Matrix e.g. n=m=5 Main Diagonal

Matrix Algebra Special Types of Square Matrices Symmetric: a ij = a ji

Matrix Algebra Diagonal: a ij = 0, i  j Special Types of Square Matrices

Matrix Algebra Identity: a ii =1.0 a ij = 0, i  j Special Types of Square Matrices

Matrix Algebra Upper Triangular Special Types of Square Matrices

Matrix Algebra Lower Triangular Special Types of Square Matrices

Matrix Algebra Banded Special Types of Square Matrices

Matrix Operating Rules - Equality [A] mxn =[B] pxq n=pm=qa ij =b ij

Matrix Operating Rules - Addition [C] mxn = [A] mxn +[B] pxq n=p m=q c ij = a ij +b ij

Matrix Operating Rules - Addition Properties [A]+[B] = [B]+[A] [A]+([B]+[C]) = ([A]+[B])+[C]

Multiplication by Scalar

Matrix Multiplication [A] n x m. [B] p x q = [C] n x q m=p

Matrix Multiplication

Matrix Multiplication - Properties Associative: [A]([B][C]) = ([A][B])[C] If dimensions suitable Distributive: [A]([B]+[C]) = [A][B]+[A] [C] Attention: [A][B]  [B][A]

Operations - Transpose

Operations - Inverse [A][A] -1 [A] [A] -1 =[I] If [A] -1 does not exist [A] is singular

Operations - Trace Square Matrix tr[A] =  a ii

Linear Equations in Matrix Form

Gauss Elimination Consider (Eq 1) (Eq 2) Solution 2*(Eq 1) (Eq 2) Solution !!!!!! Scaling Does Not Change the Solution

Gauss Elimination Consider (Eq 1) (Eq 2)-(Eq 1) Solution !!!!!! (Eq 1) (Eq 2) Solution Operations Do Not Change the Solution

Gauss Elimination Example Forward Elimination

Gauss Elimination -

Substitute 2 nd eq with new

Gauss Elimination -

Substitute 3rd eq with new

Gauss Elimination -

Substitute 3rd eq with new

Gauss Elimination Forward Elimination

Gauss Elimination Back Substitution

Gauss Elimination – Potential Problem Pivoting

Partial Pivoting a 32 >a 22 a l2 >a 22 NO YES

Partial Pivoting

Full Pivoting In addition to row swaping Search columns for max elements Swap Columns Change the order of x i Most cases not necessary

LU Decomposition

PIVOTS Column 1 PIVOTS Column 2

LU Decomposition As many as, and in the location of, zeros Upper Triangular Matrix U

LU Decomposition PIVOTS Column 1 PIVOTS Column 2 Lower Triangular Matrix L

LU Decomposition = This is the original matrix!!!!!!!!!!

LU Decomposition Lyb

Lyb

Ax=b A=LU -LU Decomposition Ly=b- Solve for y Ux=y- Solve for x

Matrix Inversion

[A][A] -1 [A] [A] -1 =[I] If [A] -1 does not exist [A] is singular

Matrix Inversion

Solution

Matrix Inversion To calculate the invert of a nxn matrix solve n times :

Iterative Methods Recall Techniques for Root finding of Single Equations Initial Guess New Estimate Error Calculation Repeat until Convergence

Gauss Seidel

First Iteration: Better Estimate

Gauss Seidel Second Iteration: Better Estimate

Gauss Seidel Iteration Error: Convergence Criterion:

Jacobi Iteration

First Iteration: Better Estimate

Jacobi Iteration Second Iteration: Better Estimate

Jacobi Iteration Iteration Error:

Determinants Are composed of same elements Completely Different Mathematical Concept

Determinants Defined in a recursive form 2x2 matrix

Determinants Defined in a recursive form 3x3 matrix

Determinants Minor a 11

Determinants Minor a 12

Determinants Minor a 13

Singular Matrices If det[A]=0 solution does NOT exist

Determinants and LU Decomposition

Curve Fitting Often we are faced with the problem… what value of y corresponds to x=0.935?

Curve Fitting Question 1 : Is it possible to find a simple and convenient formula that reproduces the points exactly? e.g. Straight Line ? …or smooth line ? …or some other representation? Interpolation

Curve Fitting Question 2 : Is it possible to find a simple and convenient formula that represents data approximately ? e.g. Best Fit ? Approximation

Linear Interpolation Slope of Line 1 st DIVIDED DIFFERENCE f [x i+1,x i ] First order interpolating polynomial

Function Interpolation Quadratic Interpolation Better Accuracy if 2 nd Order Polynomial x

General Form of Newton’s Interpolating Polynomials

Lagrange Interpolating Polynomials Reformulation of Newton’s Polynomials Avoid Calculation of Divided Differences xf(x) xoxo f(x o ) x1x1 f(x 1 ) x2x2 f(x 2 ) …… xnxn f(x n )

Lagrange Interpolating Polynomial Cardinal Functions: Product of n-1 linear factors Skip x i Property:

Errors in Polynomial Interpolation It is expected that as number of nodes increases, error decreases, HOWEVER…. At all interpolation nodes x i Error=0 At all intermediate points Error: f(x)-f n-1 (x) f(x)

Errors in Polynomial Interpolation Beware of Oscillations…. For Example: Consider f(x)=(1+x 2 ) -1 evaluated at 9 points in [-5,5] And corresponding p 8 (x) Lagrange Interpolating Polynomial P 8 (x) f(x)

Other Methods Direct Evaluation n+1 coefficients n+1 Data Points Interpolating Polynomial should represent them exactly

Other Methods Direct Evaluation

Other Methods Solve Using any of the methods we have learned

Other Methods Not the most efficient method Ill-conditioned matrix (nearly singular) If n is large highly inaccurate coefficients Limit to lower order polynomials

Inverse Interpolation X=?

X=? Switch x and y and then interpolate? Not a Good Idea!

Splines

Piecewise smooth polynomials

E.G Quadratic Splines Function Values at adjacent polynomials are equal at interior nodes

E.G Quadratic Splines First and Last Functions pass through end points

E.G Quadratic Splines First Derivatives at Interior nodes are equal

E.G Quadratic Splines Assume Second First Point=0

E.G Quadratic Splines Assume Second First Point=0 Solve 3nx3n system of Equations

Spline Interpolation Polynomial Interpolation Spline Interpolation Polynomial Interpolation