CZ2105 Lecture 2 - National University of Singapore

Download Report

Transcript CZ2105 Lecture 2 - National University of Singapore

MA2213 Lecture 12
REVIEW
1.1 on page 10
e 1
,x0
11. Compute lim x0 g ( x) 
x
x
log(1  x)
,x0
12. Compute lim x 0 g ( x) 
x
Compute quadratic Taylor polynomials for
f ( x)  g ( x), x  0; f (0)  limx0 g ( x)
where g is the function in problems 11 and 12.
1.2 on page 18
1. Bound the error in using p 3 ( x ) to approximate
x
on the interval [1,1]. Use the remainder
on page 11
e
n 1
( x  a)
( n 1)
Rn ( x) 
f
(c), c between a and x
(n  1)!
and take
p 3 ( x)
to be the third degree
Taylor polynomial about
a  0.
Suggestion Study ‘bounding the error’ on page 15
Review power series and formuli on page 17
1.2 on page 19
14. (a) Obtain the Taylor polynomial for
1 about
a

0
.
f (t ) 
2
1 t
14. (b) Use the method developed on page 14 to
obtain a Taylor series with remainder for
1
g ( x)  tan ( x).
and
Suggestion: Use part (a)
tan ( x)  
1
x
0
dt
2
1 t
2.2 on page 54
Review the elementary concepts in Chapter 2
about errors, particularly the sources of error
on pages 45-47, and loss-of-significance errors
(and how to reduce such losses) on pages 47-50
5. (a)
1  cos x
2
x
5. (d)
3
1  x 1
e e
6. (c)
2x
x
x
3.2 on page 88
Review Newton’s method for finding roots, in
particular Example 3.2.2 on pages 81-83 that
explains the importance of choosing a sufficiently
‘close’ initial estimate, and the error analysis on
pages 83-86
4. m a , a  0, m a positive integer
Read about order of convergence on page 101 :
A sequence xn converges to  with order of
convergence p  1 if there exists a constant c  0
p
such that |   xn1 |  c |   xn | , n  0.
p  1, 2, 3 linear, quadratic, cubic convergence.
3.4 on page 96
4. Experimentally confirm the error estimate
|   xn1 |  c |   xn | , n  0
where   1.13 is the unique positive root of
6
x  x  1 and xn is a sequence that converges
1.62
to

obtained by the secant method.
Question What is the order of convergence of
the secant method for this problem ?
Question What is the order of convergence of
Newton’s method, the secant method, for finding
the root of the function f ( x)  x 2 ?
4.1 on pages 134-135
16. As a generalized interpolation problem, find
the quadratic polynomial q(x) for which
q(0)  1, q(1)  1, q (1)  4.
Compute coefficients a, b such that the function
x
x
f ( x)  ae  be interpolates q(x) at x  0, 1
21. Let f ( x) be a polynomial of degree m.
For x  x0 define
f ( x)  f ( x0 )
g ( x)  f [ x0 , x] 
x  x0
Show that g (x) is a polynomial of degree m.
'
Best Approximation pages 159-165
A. Prove from first principles that if f  C ([a, b])
satisfies 0  f(x),x [a, b] and f (a)  f (b)  0
then the best linear approximation to f on [ a, b]
is the function g ( x)  m / 2, x [a, b] where
m  max f ( y ) Suggestion: draw pictures.
y  [ a ,b ]
B. Prove from first principles that if g  C ([a, b])
''
is convex ( g ( x)  0 ) and L : [a, b]  0 is a
linear function that interpolates g (x) at x  a, b
then f  g  L satisfies the hypothesis in Prob. A.
x
C. Use A &B to find the best lin. app. to e on [1,1]
2
Least Squares Approximation pages 178-187
A. Compute coefficients a, b such that
x
x
f ( x)  ae  be is the least squares
2
approximation of the function g ( x)  x  x
over the interval [1,1].
B. Find the linear least squares approximation
x
to e on the interval [0,1] (see Prob. 1 p. 185)
and on the interval [-1,1].
Trapezoid and Simpson Rules p. 189-201
T4 (f ) and S 4 (f ) for the integral
1 dx
I 
 log( 2)  0.693147
0 1 x
1. Compute
over the interval
2. Do problem 2. (a) on page 200.
Read Richardson Extrapolation p. 210-211
17. (page 218) Use Richardson’s extrapolation
to estimate the errors in Problem 2(a) on
page 200.
Gaussian Integration p. 219-229
1. Assume that a  x1    xn  b.
Determine the values of w1 ,...,wn such that
I n   j 1 wn f ( xn )  f ( x) dx
a
is valid whenever f  Pn1.
2. What conditions on x1 ,, xn and w1 ,, wn
n
b
ensure the equality above for f  P2 n1 ?
3. Use these conditions to compute the nodes
and weights for n = 1,2,3,4 for a=-1, b = 1
and THEN compare with Table 5.7, p. 223.
4. Do problem 1 on page 229.
Matrix Arithmetic p. 248-264
m n
. Which of the following
1. Let A, B  R
statements is (i) always true, (ii) always
false, (iii) sometimes true, sometimes false ?
mn
A B R
T
mm
b. AB  R
c. A  3B  B  B  B  A
T
d. rank( A)  rank( A )
e. The equation AC  B has 17 solutions.
a.
f.
T
det( AA )  det(AA )
T
T
Matrix Arithmetic p. 248-264
p p
1. Let A  R
Which statements below are
logically equivalent ?
b.
det ( A)  0
T
A  A is positive definite.
c.
A has real eigenvalues.
a.
d. All eigenvalues of
e. The equation
f.
rank( A)  p
A are nonzero.
Av  0
has at most 1 solution.
Matrix Arithmetic p. 248-264
1. (Prob. 21, p, 262) Compute the inverse of
the n x n matrix
 1 1 0  0 
 1 2  1   


0  






1
2

1


 0
0  1 2 
Matrix Arithmetic p. 248-264
4
1. (Prob. 28, p. 263) Find x  R such that
0
4

1

1
4 1 1

0 1 1
x0
1 1 2 

1 2  1
2. (Prob. 29, p. 264) Find the values of  for which
2 1 
det [  I  B]  0, B  

1 2
Gaussian Elimination p. 264-283
1. What is the augmented matrix for the following
system of linear equations ?
x1  2 x2  x3  0
2x1  2x2  3x3  3
 x1  3x2  2
2. What are the elementary row operations ?
3. Performing elementary row operations on an
augmented matrix for a system of linear
equations corresponds to doing what to the
system of equations ?
Gaussian Elimination p. 264-283
2 1 0
1
2

2
3
3
Augmented Matrix


 1  3 0 2
Elementary row operations and correspondences
exchange two rows  exchange two equations
mult. row by
c  0  mult. eqn. by c  0
row(j)  row(j) +
where
a  row(i) 
a  R, i  j
eqn(j)  row(j) +
a  eqn(i)
Gaussian Elimination p. 264-283
1. Use elementary row operations on both the
system of equations on slide 17 and on its aug
mat so that the resulting matrix of coefficients
and augmented matrix is upper triangular.
2. How do elementary row operations on a set
of equations change its set of solutions ?
3. How should a system of equations be solved if
its matrix of coefficients is upper triangular ?
4. How can the matrix of coefficients of a system
of linear equations be found from its aug mat ?
5. Solve the equations on slide 17 using ERO
on both the equations and on its aug mat.
Gaussian Elimination p. 264-283
1. Use elementary row operations on both the
system of equations on slide 17 and on its aug
mat so that the resulting matrix of coefficients
and augmented matrix is upper triangular.
2. How do elementary row operations on a set
of equations change its set of solutions ?
3. How should a system of equations be solved if
its matrix of coefficients is upper triangular ?
4. How can the matrix of coefficients of a system
of linear equations be found from its aug mat ?
5. Solve the equations on slide 17 using ERO
on both the equations and on its aug mat.
Direct Solutions p. 281, 298-300
1. Do problem 1(a) on page 281.
2. Read pages 270-272 about partial pivoting
then try to do Example 6.3.3 on page 272 both
with and without partial pivoting and then
compare your answers that are worked out in
the textbook on pages 272 and 273.
3. Read pages 273-276 about the computation of
inverses then do problem 6(a) on page 282.
4. Read pages 298-300 and do problems 2 and 5
on page 302.
Iterative Methods p. 303-318
1. Review the Jacobi and Gauss-Seidel methods
on then study the general schema on p 306-308.
a diagrammatic presentation; broadly : a structured
framework or plan : outline
Ax  b, A  N  P  Nx  Px  b
this splitting of A
( k 1)
give the iteration N x
 P x b
2. What is the iteration matrix above ?
3. What is the splitting for Jacobi and GS ?
4. How does the error behave ?
5. When does the general iteration converge ?
Do prob. 10, 12 on p. 317. Also study the residual
correction method on p. 296-297 and 303-318
(k )
Residual Correction p. 296-297, 303-318
1. Review the Jacobi and Gauss-Seidel methods
on then study the general schema on p 306-308.
a diagrammatic presentation; broadly : a structured
framework or plan : outline
Ax  b, A  N  P  Nx  Px  b
this splitting of A
( k 1)
give the iteration N x
 P x b
2. What is the iteration matrix above ?
3. What is the splitting for Jacobi and GS ?
4. How does the error behave ?
5. When does the general iteration converge ?
(k )
The Eigenvalue Problem p. 333-352
m m
. Which of the following
1. Let A, B  R
statements is (i) always true, (ii) always
false, (iii) sometimes true, sometimes false ?
a. if
is an eigenvalue of A and  is an
eigenvalue of B then    is an
eigenvalue of A  B.
b. if
is an eigenvector of A and 5u
is an eigenvector of B then 4u is an
eigenvector of A  B.
c. if AB  BA and
is an eigenvector of

u
u
A then Bu is an eigenvector of A.
Nonlinear Systems p. 352-365
1. Read p. 352-365 and do prob. 1,2(a),(b) p.364
2. Compute coordinates ( x,
y ) of a point that
minimizes the sum of squared distances to
the points (0,0), (0,1), (1,0), (1.1,0.9)
3. Compute coordinates ( x, y ) of a point that
minimizes the sum of distances to
the points (0,0), (0,1), (1,0), (1.1,0.9)
4. Compute exact coordinates ( x, y, z ) of all
points that satisfy: x  1 / y  z ,
x  y  z  1 , 2 x  3 y  z  7.