You are on page 1of 2

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

iii) Derive a recursive formula that gives each element of


submatrix

, as well as

other than the first line, i.e. each element of the

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
4
8
6

1
3
7
7

1
3
9
9

0
1 .
5
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

for 1

6 and

1
2
0
.
2
1
1

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

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);
U=A;
L=eye(m);
P=eye(m);

%
%
%
%

Number of rows and columns of A


Set U=A
Set an initial matrix L
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
.
.
.

You might also like