Download pdf - HOMEWORk

Transcript
Page 1: HOMEWORk

DREXEL UNIVERSITY

Department of Mechanical Engineering & Mechanics

Applied Engineering Analytical & Numerical Methods I

MEM 591 - Fall 2012

HOMEWORK #3: Due Thursday, October 18 @ 6 PM

1. [30 points]

Suppose is strictly column diagonal dominant, which means that for each k,

| | ∑ .

i) Which is its first pivot?

ii) Perform the first step of the decomposition for and show explicitly the matrix , as well as .

iii) Derive a recursive formula that gives each element of other than the first line, i.e. each element of the

submatrix .

iv) Explain under what condition for , no row interchange would take place if the Gauss Elimination with Partial

Pivoting (GEPP) method was continued.

2. [30 points]

Consider the matrix we showed in class 2 1 1 0 4 3 3 1

8 6

77

9 5 9 8

.

i) [25 points]

Show explicitly what the permutation matrix , as well as and are in the case that partial pivoting begins

from the first row. Confirm your analytical results using appropriately the same command in MATLAB ("lu").

ii) [5 points]

Show why the triangularization part of the method allows for a simpler calculation of the determinant of .

3. [40 points]

Construct the following subroutines:

i) [25 points]

ii) [10 points]

GEPP

iii)[5 points]

Consider the linear system of equations A , where

1 for 1 , 6 and

120211

.

Apply your GEPP code and find the solution. Verify by using the "\" command in MATLAB.

Page 2: HOMEWORk

Remark: Recall that you can only use essential built-in commands in MATLAB such as size, length, zeros, eye and

for/if statements. Any multiplication, needs to be in a component form(i.e. A(i,j)*B(j)). Remember to comment

important lines of your code. Modify the following script to prepare your codes:

i) function [P,L,U]=pplu(A); [m m]=size(A); % Number of rows and columns of A U=A; % Set U=A L=eye(m); % Set an initial matrix L P=eye(m); % Set an initial matrix P for i=1:m-1 %% Begin the Partial Pivoting . . . . . %% Partial Pivoting procedure ends and the triangularization procedure %% continues . . . . . end ii) function [U,L,P,x]=gepp(A,b); %% 1st part: Partial Pivoting and triangularization . . . %% 2nd part: Find the solution . . .


Recommended