0% found this document useful (0 votes)
44 views3 pages

1 Number of Operations (25 Points)

This document provides instructions for homework 3 in the numerical methods course EP501. It includes 4 problems: 1) Analyzing the number of operations for different matrix equation solving methods. 2) Directly solving a system of linear equations using Gaussian elimination, Gauss-Jordan, and LU factorization. 3) Solving systems using the Frank matrix and analyzing condition numbers. 4) Iteratively solving a nonlinear system of equations.

Uploaded by

aniket patel
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)
44 views3 pages

1 Number of Operations (25 Points)

This document provides instructions for homework 3 in the numerical methods course EP501. It includes 4 problems: 1) Analyzing the number of operations for different matrix equation solving methods. 2) Directly solving a system of linear equations using Gaussian elimination, Gauss-Jordan, and LU factorization. 3) Solving systems using the Frank matrix and analyzing condition numbers. 4) Iteratively solving a nonlinear system of equations.

Uploaded by

aniket patel
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/ 3

EP501 Numerical Methods Homework 3 Due Oct 11, 2013 11:59 pm

1 Number of Operations (25 points)


A. Hybrid Method
Consider the following Gaussian-elimination-Gauss-Jordan hybrid method for solving the system (1) in
Lecture06. First, apply the Gaussian-elimination technique to reduce the system to triangular form.
Then use the nth equation to eliminate the coefficients of xn in each of the first n − 1 rows. After this
is completed use the (n − 1)st equation to eliminate the coefficients of xn−1 in the first n − 2 rows, etc.
The system will eventually appear as the reduced system
 0
b01

a11 0 0 ··· 0
 0 a022 0 · · · 0 b02 
0
b03 
 
 0
 0 a33 · · · 0 , (1)
 ··· ··· ··· ··· ··· ··· 
0 0 0 · · · a0nn b0n

a. Show that this method requires

n3 3 5
+ n2 − n multiplications/divisions (2)
3 2 6
and
n3 n2 5
+ − n additions/subtractions. (3)
3 2 6
b. Make a table comparing the required operations for the Gaussian elimination, Gauss-Jordan, and
hybrid methods, for n = 3, 10, 50, 100.
B. Gauss Elimination
Suppose m linear systems
AX = B (4)
are to be solved, where A is an n × n matrix and both X and B are n × m matrices.
a. Show that Gaussian elimination with backward substitution applied to the augmented matrix

[A B] (5)

requires
1 3 1
n + mn2 − n multiplications/divisions (6)
3 3
and
1 3 1 1
n + mn2 − n2 − mn + n additions/subtractions. (7)
3 2 6
b. Show that the Gauss-Jordan method requires
1 3 1
n + mn2 − n multiplications/divisions (8)
2 2
and  
1 3 1
n + (m − 1)n2 + − m n additions/subtractions. (9)
2 2

1
EP501 Numerical Methods Homework 3 Due Oct 11, 2013 11:59 pm

2 Direct Elimination (25 points)


Solve the following system of linear algebraic equations

−2x1 + 3x2 + x3 = 9
3x1 + 4x2 − 5x3 = 0 (10)
x1 − 2x2 + x3 = −4

by
a. Gauss elimination without pivoting
b. Gauss-Jordan elimination
c. Doolittle LU factorization

Do all calculations manually, without calculator or MATLAB. Write out every step of the process, follow
the examples in Lecture06 and Lecture07.

3 Frank Matrix (20 points)


There a special matrix called the Frank matrix, defined as

0
 for j < i − 2
ai,j = n + 1 − i for j = i − 1 (11)

n+1−j for j ≥ i

Matlab provides the Frank matrix in its “gallery” of matrices, gallery(’frank’,n), where n is the size of
the Frank matrix. The Frank matrix is ill-conditioned. Solve the following problems for n = 5, 10, 15, 25,
with x = (1, 1, · · · , 1), and with A being the Frank matrix.

a. Compute
b = Ax, (12)
then solve x0 with
Ax0 = b, (13)
0
and calculate the difference between x and x . You will need to write your own MATLAB function for
Gauss elimination or any direct methods we discussed in class to solve (13).
b. Calculate the condition number of A. To do this you need the inverse of A. You can use the MATLAB
function inv() to get A−1 . Choose any definition of norm and write MATLAB code to calculate the
norm. Do not use MATLAB functions norm() and cond() to calculate the norm or condition number,
but you can use them to verify your results.
c. Create a table like the following to summarize the results for the four different n values, by listing the
maximum error max |x − x0 |, and condition number for each n.

n max |x − x0 | cond(A)
5
10
15
25

2
EP501 Numerical Methods Homework 3 Due Oct 11, 2013 11:59 pm

4 Nonlinear System of Equations (30 points)


We studied solving nonlinear equation with a single variable, and a system of linear equations. In this
problem, you will solve a nonlinear system of equations. The equations are

x31 − 2x1 x2 + x3 = 0,
x1 x22 − x1 x3 − 5 = 0, (14)
−x1 + x2 x3 + x33 = 0.

a. Read page 169-171 of the textbook on how to solve such a nonlinear system of equations.
b. Derive the linear system equations similar to (3.170) in the textbook. Start with initial approximation
x = (x1 , x2 , x3 ) = (1, 0, −1), write down the the linear equations which must be solved to find ∆x. Your
answer should be in the form Ax=b.

c. Use iterative method (3.171) to solve the equations, starting with the initial approximation given above.
Stop the iteration when k∆xk2 < 10−12 , where kk2 is the Euclidean norm, which can be calculated in
MATLAB using the norm function.
d. Based on the error plot, describe the convergence rate of this iteration, but you don’t have to explain
why.

You might also like