TT2_solutions
TT2_solutions
NAME: ID:
INSTRUCTIONS
Use a dark black or dark blue pen to enter your final answer.
For multiple choice questions, circle the correct answer (only one answer is correct).
1
Problem 1.
For all vectors x in Rn we have
(a) k x k1 ≤ k x k2 (b) k x k∞ ≤ k x k2
Suppose that multiplying two general square matrices of dimension n requires 1 second on a given
computer when n = 102 . Based on the number of operations (multiplications and divisions only)
estimate how much time it will take to solve a general linear system of equations of dimension n = 103
on this computer.
1. 33 seconds.
2. 333 seconds. THIS ONE !
3. 3333 seconds.
4. none of the above
Let Tn be the n by n tridiagonal matrix Tn = diag[1, 5, 1]. Which one of the following upper bounds
on k T−1
n k∞ is obtained using the Banach Lemma:
1
1. 3
THIS ONE !
2
2. 3
3. 1
4. none of the above
Again let Tn be the specific n by n tridiagonal matrix Tn = diag[1, 5, 1]. What is the total of the
number of multiplications and divisions needed to determine the LU-decomposition of Tn , when
taking into account its tridiagonal structure, as well as the specific entries that it contains. (Make
sure not to include unnecessary operations !) :
2
Problem 2.
Only one of the following statements is valid. Circle the one that is valid.
Newton’s method for computing the square root of 2 converges to the positive square root of 2
for the following initial guesses x(0) :
1. all x(0)
2. all x(0) 6= 0
3. all x(0) > 0 THIS ONE ! (See Page 135 of the Lecture Notes)
The fixed point iteration x(k+1) = f (x(k) ) , where f (x) = cos(x), has
The fixed point iteration x(k+1) = f (x(k) ) , where f (x) = sin(x), has
3
Problem 3
The fixed point iteration x(k+1) = f (x(k ) , where f (x) = x2 − 2x + 2, has
Consider Newton’s method for systems for solving the system of equations
x21 + x22 − 1 = 0 ,
x31 − x2 = 0 .
(0) (0) (1) (1)
If one uses x1 = 1, and x2 = 0, as initial guesses, then what will be the values of x1 and x2 :
(1) (1) 1
1. x1 = 1, and x2 = 2
(1) (1)
2. x1 = 21 , and x2 = 1
(1) (1)
3. x1 = 1, and x2 = 1 THIS ONE !
4. none of the above
Which of the following polynomials represents the first two nonzero terms of the Taylor polynomial
for f (x) = sin(x) about the point x = 0.
x2
1. x− 2
x3
2. x− 6
THIS ONE !
x3
3. x+ 6
For the Taylor polynomial pn (x) of degree n (or less) for f (x) = ex about the point x = 0, what
is the smallest value of n so that | ex − pn (x) |< 10−2 everywhere in the interval [−1, 1] :
1. n=3
2. n=4
3. n=5 THIS ONE !
4. none of the above.
4
Problem 4.
If we approximate f (x) = ex in the interval [−1, 1] by interpolation at n + 1 Chebyshev points
with a polynomial of degree n or less, then what is the smallest value of n so that the maximum
interpolation error is less than 10−2 ? (Make use of the Lagrange Interpolation Theorem.)
1. n=3
3. n=5
Suppose we approximate f (x) = ex in the interval [−1, 1] by local polynomial interpolation at three
Chebyshev points with local polynomials of degree 2 or less. From the choices below, what is the
smallest number of intervals of equal size needed so that the maximum interpolation error is less
than 10−3 :
1. N =5 THIS ONE !
2. N =7
3. N =9
1. f ′ (0)
3. f ′′′ (0)
How many function evaluations are needed when using the composite Simpson Rule to integrate a
function f (x) over an interval [a, b], based on local integration in N subintervals of size h = (b−a)/N.
1. N +1
2. 2N + 1 THIS ONE !
3. 3N
5
Problem 5.
Consider the fixed point iteration x(k+1) = f (x(k) ) , where
2x3 + 2
f (x) = .
3x2
(a) Analytically determine all fixed points of this fixed point iteration, and for each fixed point
determine whether it is attracting or repelling. If a fixed point is attracting then also determine if
the convergence is linear or quadratic. Show the details of your computations, and enter your final
answers in the box below.
Convergence is quadratic.
(b) In the space below, draw the standard graphical interpretation of this fixed point iteration,
showing the line y = x, the curve y = f (x), and indicating several iterations, starting with x(0) ∼
= 0.5 .
Make sure that your graph is qualitatively accurate.
6
Problem 6.
(a) Write down the Lagrange interpolating polynomial p(x) that interpolates the function f (x) = ex
at the points x0 = −1, x1 = 0, and x2 = 1. You must write p(x) using the complete expressions for
the appropriate Lagrange basis functions ℓ0 (x), ℓ1 (x), and ℓ2 (x). Enter your answer in the box.
where x0 = −1, x1 = 0, x2 = 1
(b) Use the interpolating polynomial p(x) determined above to approximate the value of f (x) = ex
at the point x = 0.5. Enter this value in the box below.
e0.5 ≈ 1.72337
7
Problem 7.
(a) Use Taylor expansions to determine the leading error term of the numerical differentiation formula
(b) Showing all details, derive the numerical differentiation formula in Part (a) of this Problem. You
must make use of the Lagrange interpolation polynomial that interpolates f (x) at the points, x0 = 0,
x1 = h, and x2 = 2h, and the corresponding Lagrange basis functions, ℓ0 (x), ℓ1 (x), and ℓ2 (x).
The derivation is similar (but not identical) to the derivation on Page 234 of the Lecture Notes:
Letting x0 = 0, x1 = h, and x2 = 2h, we have
f ′′ (x0 ) ∼
= f0 ℓ′′0 (x0 ) + f1 ℓ′′1 (x0 ) + f2 ℓ′′2 (x0 ) .
Here
(x − x1 )(x − x2 )
l0 (x) = ,
(x0 − x1 )(x0 − x2 )
so that
2 1
ℓ′′0 (x) = = 2 .
(x0 − x1 )(x0 − x2 ) h
In particular,
1
ℓ′′0 (x0 ) = .
h2
Similarly
2 1
ℓ′′1 (x0 ) = − , ℓ′′2 (x0 ) = .
h2 h2
Hence
f0 − 2f1 + f2
f ′′ (x0 ) ∼
= .
h2
8
Problem 8.
The formula Z h
2
f (x) dx ≈ h f (0) ,
− h2
(a) Use Taylor expansions to derive the leading error term for this local formula. Show the details
of your work and enter your final answer in the box below.
See the page following Page 285 in the Lecture Notes with Solutions
(b) Based on the leading error term in the local formula, determine a bound on the leading error
term of the composite Midpoint Rule, when integrating a function f (x) over an interval [a, b].
Enter your answer in the box.
See the page following Page 285 in the Lecture Notes with Solutions
(c) Determine how many subintervals of equal size are needed to numerically integrate the function
f (x) = ex over the interval [−1, 1] using the composite Midpoint Rule, so that the error is
less than 10−4 . Show the details of your work and enter your final answer in the box below.
N ≥ 96