AMAT3132 Numerical Analysis, Winter 2010
Home work 2
(show all works)
Due Monday Feb 8, 2010 by 24:00 in the drop box#40
Full marks 30
Instruction: (i) Please hand in hard copy of the assignment into the box #40 located
next to Math general ofce in HH.
(i
Kinds of error and computer arithmetic
Convergence and eciency
Solution of linear equations
Direct method
Remarks:
Zeros may be created in the diagonal position.
Rearrange the system to have the largest coecient in the
diagonal position.
Where there are m
Kinds of error and computer arithmetic Convergence and eciency Solution of linear equations Solution of nonlinear equations
Iterative method
Convergence criterion:
Theorem: Let A be a square matrix. Then
lim Ak x = 0 for every x Rn
k
is equivalent to,
(A
Kinds of error and computer arithmetic
Convergence and eciency
Solution of linear equations
Iterative method
Let x k denotes the approximate solution of Ax = b , then we can
write
x k +1 = M 1 (b Bx k )
or
x k +1 = Gx k + M 1 b .
x k is called k -th itera
function x1 = jacobi2(a,b,x0,tol)
n = length(b);
for j = 1 : n
x(j) = (b(j) - a(j,[1:j-1,j+1:n]) * x0([1:j-1,j+1:n]) / a(j,j); % the
first iteration
end
x1 = x';
k = 1;
while norm(x1-x0,1) > tol
for j = 1 : n
x_ny(j) = (b(j) - a(j,[1:j-1,j+1:n]) * x1([1:j
function [L,U,D]=lu(A)
clc
[p,q]=size(A);
if (p~=q)
error('This matrix is not square. The determinant cannot be found')
end
L = eye(p);
U = A;
for i=1:p-1
for k=i+1:p
L(k,i)=U(k,i)/U(i,i);
U(k,i:p)=U(k,i:p) - L(k,i)*U(i,i:p);
end
end
D1=prod(diag(U);
D2=d
Errors associated with arithmetic operations
To avoid subtraction between nearly equal numbers, consider
x1 =
b +
b 2 4ac
2a
b b 2 4ac
b b 2 4ac
,
which implies to
x1 =
We now get
x1 =
2c
.
b + b 2 4ac
2.000
= 0.01610.
62.10 + 62.06
The relative error = 6
AMAT3132 Numerical Analysis, Winter 2010
Home work 2 Solution
(show all works)
Due Monday Feb 8, 2010 by 24:00 in the drop box#40
Full marks 30
1
2
Hilbert matrix
7
6
norm
5
L1
L2
L
4
3
2
1
0
100
200
300
n
400
500
50
Jacobi
GaussSeidel
#of iterations
40
3
Introduction
Linear system
Nonlinear equation
Interpolation
Interpolation
Interpolation is the process of estimating an intermediate value
from a set of discrete or tabulated values.
Suppose we have the following tabulated values:
y
x
y0
x0
y1
x1
y2 ?
x2
AMAT3132 Numerical Analysis, Winter 2010
Home work 1
(show all works)
Due Monday Jan 25, 2010 by 24:00 in the drop box#40
Full marks 3 10 = 30
Instruction: (i) Please hand in the paper copy of the assignment into the box #40 located
next to Math general o
AMAT3132 Numerical Analysis, Winter 2010
Home work 5
(show all works)
Due Tuesday March 22, 2010 by 24:00 in the drop box#40
Late assignments are considered as missed work
Full marks 30
Instruction:
The purpose of this assignment is to understand interpo
AMAT3132 Numerical Analysis, Winter 2010
Home work 4
(show all works)
Due Monday March 15, 2010 by 24:00 in the drop box#40
Late assignments are considered as missed work
Full marks 30
Instruction:
Please hand in the report into the box #40 located next
AMAT3132 Numerical Analysis, Winter 2010
Home work 3
(show all works)
Due Monday Feb 15, 2010 by 24:00 in the drop box#40
Full marks 30
Instruction:
Please hand in the report into the box #40 located next to Math general ofce in HH.
The rst page of the
Introduction
Linear system
Nonlinear equation
Interpolation
Newtons method
Let x0 be an approximation to the solution of f (x ) = 0 and h be
the error such that f (x0 + h) = 0.
We aim to approximate h and set x1 = x0 + h.
Taylors series expansion gives:
f
Kinds of error and computer arithmetic
Convergence and eciency
Linear equations
Nonlinear equation
Fixed point iteration
Suppose that we can re-arrange f (x ) such that
f (x ) = x g (x ).
Then, we construct the following scheme:
xn+1 = g (xn ),
n = 0, 1,
AMATH 3132: Numerical Analysis I
CONTACT INFORMATION
Professor: Dr. J. Alam
Ofce: HH-3035
Phone: 737-8071
email: [email protected]
http:/www.math.mun.ca/alamj/amath3132.shtml
MEETING
The class will meet MWF from 15:00 to 15:50 in HH-3017.
OFFICE HOUR
M,W: 09:0