Sie sind auf Seite 1von 12

FAF – NA – Spring 2020

Intermediate Exam 1
15 April, 2020

Directions: This exam consists of two parts, 12 pages and it will last 2.5 hours. It is an open book
exam: you are allowed to use your notes/lecture slides/homeworks and scientific calculators. Read carefully the
instructions. To get any credit, you must give some justification for your answers. Make sure that all pages are
signed by you.

PART 1. Answer the multiple choice test with 40 questions. Don’t spend more than 30 minutes on this part.
Answer the questions in a manner as you did it previously in class. Make sure you answer all questions. If a
question is not answered you will get −1 point for it. Recall that one choice is very wrong and counts −1.

PART 2. Each chapter contains 4 problems. From each chapter solve 2 of the problems. Each problem is
worth 30 points. If you solve more than 2 problems in a chapter, specify which are to be graded. Otherwise,
the worst results will be counted.

Reminder: Any kinds of academic misconduct will NOT be tolerated. No discussions and helping your
collegues are allowed. I will not tolerate cheating.

After you are done, photograph your exam and submit it via the moodle page.

Page 1
FAF – NA – Spring 2020

Question 1
Consider the following two mathematically equivalent expressions:

x2 − y 2 and (x − y)(x + y).

Which can be evaluated more accurately in floating-point arithmetic?


A Pass;
B x2 − y 2 ;
C (x − y)(x + y);
D Both will give the same accuracy.

Question 2
For computing the midpoint m of an interval [x, y] which of the following is preferable in floating point arith-
metic?
A x + (y − x)/2.0;
B (x + y)/2.0;
C y − (x + y)/2.0;
D x/2.0 + y/2.0.

Question 3
Rounding is preferable than chopping since ...
A – Chopping error is always of the same sign, but rounding isn’t;
B – Rounding is twice as big than chopping;
C – Rounding is unifromly distributed;
D – False. Chopping is better.

Question 4
Which of the following is a true statement:
A – In multiplication the error propagates as in addition;
B – This is false statement!
C – Order of summation does not matter;
D – Floating-point numbers are distributed uniformly on the real axis.

Question 5
When evaluating a polynomial ...
A – Reorder it, starting with the smallest degree term in increasing order;
B – Rewrite the polynomial in a special form;
C – Leave it as it is, since it doesn’t matter;
D – Reorder it, starting with the biggest degree term in decreasing order.

Question 6
Convert the following number σ = 1, x̄ = 1.00011, e = 3 from binary floating-point format to decimal format:
A 1000.11;
B 8.25;
C 8.75;
D 4.125.

Page 2
FAF – NA – Spring 2020

Question 7
In order to compute as precissely as possible the sum below, we should
10000
X 1
j=1
j2

A – start the summation from j = 10000 and move toward j = 1;


B – start the summation from j = 1 and move toward j = 10000;
C – check the convergence;
D – first avoid the loss of significance error.

Question 8
In the implementation of bisection method which condition is preferable
A – sign(f (a) ∗ f (b)) < 0;
B – sign(f (a)) ∗ sign(f (b)) < 0;
C – Either A or B;
D – f (a) ∗ f (b) = 0 .

Question 9
Rank the following methods from slowest convergence rate to fastest convergence order, for finding a simple
root of a nonlinear equation:
A – bisection, Newton’s, secant;
B – bisection, secant, Newton’s;
C – secant, bisection, Newton’s;
D – all 3 have the same order of convergence.

Question 10
Which of the following statements is true?
A – Newton’s method can never be slower than bisection method;
B – Newton’s method is always faster than secant method;
C – Newton’s method always converge quadratically;
D – Newton’s method is an example of a fixed point iteration.

Question 11
What is the convergence order for Newton’s method for finding the root x = 2 of the equation (x−1)(x−2)3 = 0?
A – quadratic;
B – linear, but faster than bisection;
C – cubic;
D – linear, but slower than bisection.

Question 12
If the errors at successive iterations of an iterative method are as 10−2 , 10−4 , 10−8 , 10−16 , . . ., how would you
characterize the convergence rate?
A – linear with rate 0.5;
B – linear with rate 0.01;
C – superlinear;
D – quadratic.

Page 3
FAF – NA – Spring 2020

Question 13
If the errors at successive iterations of an iterative method are as 10−2 , 10−4 , 10−6 , 10−8 , . . ., how would you
characterize the convergence rate?
A – linear with rate 0.5;
B – linear with rate 0.01;
C – superlinear;
D – quadratic.

Question 14
When comparing the efficiency of different rootfinding iteration methods the number of iterates needed to find
an estimate of the root with a given accuracy ε > 0 is the main criterion.
A – This is true;
B – This is false;
C – This is true (compare Secant versus Newton’s method);
D – This is false (compare Secant versus Newton’s method).

Question 15
Which of the following statements is false? Interpolation is used to:
A – Approximate functions with simpler ones, usually polynomials or ‘piecewise polynomials’;
B – Replace a set of data points {(xi , f (xi ))} with a function given analytically;
C – Given a set of data points {(xi , f (xi ))} find a value of f (xi ) with a better accuracy;
D – Given a set of data points {(xi , f (xi ))} find an intermediate value.

Question 16
In order to get a smaller interpolation error, ...
A – it is enough to consider more data points;
B – consider more data points, but this is not enough;
C – consider smoother data;
D – consider a higher degree interpolating polynomial.

Question 17
Which of the following statements is true?
A – Interpolation is done only with evenly spaced interpolation points;
B – Evenly spaced interpolation points should be used due to simplicity;
C – Evenly spaced interpolation points should be avoided, because the error for nondiffrentiable functions might
oscilate;
D – Evenly spaced interpolation points should be avoided.

Question 18
Runge phenomenon happens when ...
A – The initial data are not having good precision;
B – The initial data are spaced uniformly;
C – Function is not sufficiently many times differentiable;
D – Function is smooth, but can be highly oscillatory.

Page 4
FAF – NA – Spring 2020

Question 19
Given 10 data points {(xi , f (xi ))} we can write an interpolation polynomial of degree
A – at most 9;
B – at most 10;
C – at most 11;
D – exactly 10.

Question 20
How many Lagrange basis functions are needed for interpolating 10 data points (xi , yi ), i = 0, 1, 2, . . . , 9
A It depends on the smoothness of the function;
B 9;
C 10;
D 11.

Question 21
The folowing data is given
xi 1 2 4
yi 1 4 16
and let P2 (x) be its quadratic interpolant. Then P2 (3) equals
A 8;
B 9;
C 9.25;
D 10.

Question 22
Suppose your a finding the cubic interpolation polynomial of the function f (x) = 5x + 7 using 4 interpolation
points (−2, 3); (−1, 2); (0, 7); (1, 12). Then your next steps are:
A – Compute 4 Lagrange basis functions and then write the cubic interpolant;
B – Compute Newton’s divided differences and then write the cubic interpolant using Newton’s formula;
C – In few seconds write the cubic interpolant since you are smart;
D – Draw the graph of f (x) and then approximate it with a cubic curve.

Question 23 PN
If Li (x) are the Lagrange basis functions, then ∀x ∈ R i=0 Li (x) =
A 0;
B 1;
C N;
D x.

Question 24
Which of the following approximations uses Chebyshev points?
A – Taylor approximation;
B – Near minimax approximation;
C – Best approximation;
D – Gauss approximation.

Page 5
FAF – NA – Spring 2020

Question 25
Which of the following statements is true and most complete?
A – Best approximation gives the smallest error among all approximations;
B – Best approximation gives the smallest error all polynomial approximations on evenly spaced partitions;
C – Best approximation gives the largest error among all polynomial approximations;
D – Best approximation gives the smallest error among all polynomial approximations.

Question 26
The best practical choice for approximating a general function with polynomials is ...
A – Best approximation;
B – Near minimax approximation;
C – Taylor approximation;
D – Spline interpolation.

Question 27
Consider the function s(x) on interval [1, 3]:

x3 − 3x2 + 2x + 1,

1≤x≤2
s(x) =
−x3 + 9x2 − 22x + 17, 2 ≤ x ≤ 3

Then this function is A – a cubic spline, but not a natural cubic spline;
B – a natural cubic spline;
C – not a cubic spline;
D – a cubic polynomial.

Question 28
Simpson’s integration formula is obtained by using ...
A – Homer Simpson’s intuition;
B – Quadratic approximation of the function;
C – Linear approximation of the function;
D – Near minimax approximation of the function;

Question 29
In trapezoidal integration rule the error is in the form (where h is the partition step)...
A Ch4 ;
B Ch2 ;
C Ch;
D of trapezoid.

Question 30
In Simpson’s integration rule the error is of the form ...
A Ch4 ;
B Ch;
C Ch16 ;
D Marge Simpson haircut.

Page 6
FAF – NA – Spring 2020

Question 31
Degree of precision for Simpson’s rule is ...
A 1;
B 2;
C 3;
D 4.

Question 32
Which of the following statements is NOT true?
A – If nr. of points is doubled, then error in trapezoidal rule will reduce by a factor of 4;
B – If nr. of points is doubled, then error in trapezoidal rule will reduce by a factor of 2;
C – If nr. of points is doubled, then error in trapezoidal rule won’t reduce by a factor of 4 for non-smooth
functions;
D – If nr. of points is doubled, then error in trapezoidal rule won’t reduce by a factor of 4 for not evenly spaced
points.

Question 33 √
Below are results of applying Simpson’s rule for integrating function x − 1 on interval [1, 5]:

n Error Ratio
2 ∗ 3.17
4 ∗ 2.81
8 ∗ 2.79
16 ∗ 2.78
32 ∗ 2.78

What happened? Pick the answer best describing the situation.


A – Nothing unusal;
B – Very good convergence of Simpson’s rule;
C – The ratio must be 16;
D – The ration must be 4.

Question 34
For the previous problem what caused this behaviour...
A – Finiteness of the computer precision;
B – Evenly spaced integration points;
C – Function is not smooth enough;
D – Simpson’s erratic behaviour.

Question 35
For the previous problem what will be your suggestion:
A – Don’t change anything, convergence is great;
B – Use trapezoidal rule;
C – Use Simpson’s rule, but use not evenly spaced points;
D – Use Gauss quadratures.

Page 7
FAF – NA – Spring 2020

Question 36
For a not very smooth function, which is the best choice for integration?
A – Trapezoidal;
B – Simpson’s;
C – Gauss quadrature;
D – Richardson extrapolation.

Question 37
The general Gauss quadrature with 8 weights and 8 nodes is exact for polynomials of degree at most ...
A 15;
B 16;
C 8;
D Gauss knows!

Question 38
The nodes of Gauss quadrature are the roots of A – Gauss polynomial;
B – Chebyshev polynomial;
C – Legendre polynomial;
D – Taylor polynomial.

Question 39
Suppose you need to compute the approximation of the derivative of some function. Then the preferable formula
is A – Forward difference formula;
B – Backward difference formula;
C – Centered difference formula;
D – Any of them.

Question 40
The error for centered difference formula is ≈ A C;
B Ch;
C Ch1.62 ;
D Ch2 .

Page 8
FAF – NA – Spring 2020

CHAPTER 1

Problem 1.1
Which rational numbers can be expressed with a finite number of binary digits to the right of binary point.

Problem 1.2
The polynomial (x − 1)6 has the value zero at x = 1 and is positive elsewhere. The expanded form of the
polynomial, x6 − 6x5 + 15x4 − 20x3 + 15x2 − 6x + 1, is mathematically equivalent, but may not give the same
results numerically. Can you explain this behavior?

Problem 1.3
Estimate e1/4 with an accuracy of 10−6 .

Problem 1.4
How to avoid loss of significance error in computing tan x − tan y for close values of x and y?

Page 9
FAF – NA – Spring 2020

CHAPTER 2

Problem 2.5
Newton’s method is used to find the root α of f (x) = 0. The first 10 iterates are shown in the table below.
(1) What can be said about the order of convergence? Is it slower or faster than bisection method?
(2) What can be said about the root α to explain this convergence?
(3) Knowing function f (x), how would you speed up the convergence?
n xn xn − xn−1
0 2.0
1 2.1248 0.124834
2 2.2148 0.089944
3 2.2805 0.065698
4 2.3289 0.048386
5 2.3647 0.035827
6 2.3913 0.026624
7 2.4111 0.019835
8 2.4260 0.014803
9 2.4370 0.011062
10 2.4453 0.0082745

Problem 2.6
For solving the equation x + ln x = 0, there were proposed three methods:
(a) x = − ln x
(b) x = e−x
x + e−x
(c) x =
2
(1) Which of the formulas can be used?
(2) Which of the formulas should be used?
(3) Give an even better formula!

Problem 2.7
Consider the following table of iterates from an iteration method which is convergent to a fixed point α of the
function g(x):
n xn xn − xn−1
0 1.00
1 0.36788 −6.3212E − 01
2 0.69220 3.2432E − 01
3 0.50047 −1.9173E − 01
4 0.60624 1.0577E − 01
5 0.54540 −6.0848E − 02
6 0.57961 3.4217E − 02
(1) Show that this is a linearly convergent iteration method.
(2) Find its rate of linear convergence. Is this method faster or slower than bisection method?
(3) Propose a way to accelerate the convergence of this method?

Problem 2.8
The iteration
0.99
xn+1 = − ,n≥0
(1.99)2 (1 + xn )
0.99
is at least linearly convergent to α = − (1.99) , provided x0 is chosen sufficiently close to α. Answer True or False.
Give appropriate explanations for your answer.

Page 10
FAF – NA – Spring 2020

CHAPTER 3

Problem 3.9
Consider the data
x 0 1 3 5
f (x) 2 4 3 1
(1) Use points 0, 1, 3 and 1, 3, 5 to compute f (2) by quadratic interpolation and compare the results;
(2) Also, compute f (2) by cubic interpolation.

Problem 3.10
1
1 
Consider the polynomial interpolation of the function f (x) = x on 2, 1 at n equally spaced points.
(1) Estimate the error.
(2) How small is the error when n = 4?

Problem 3.11
For f (x) = ex , construct a cubic polynomial q(x) for which

q(0) = 1, q(1) = 0
q 0 (0) = −1, q 0 (1) = 2

Problem 3.12
The functions
1
Sn (x) = T 0 (x), n ≥ 0
n + 1 n+1
are called Chebyshev polynomials of the second kind.
(1) Calculate S0 (x), S1 (x), S2 (x) and S3 (x).
(2) Show that
sin((n + 1)θ)
Sn (x) = with x = cos θ
sin θ
for 0 ≤ θ ≤ π.

Page 11
FAF – NA – Spring 2020

CHAPTER 4

Problem 4.13
Consider the numerical integration of Z 2
I= e−x+1 dx
0
using the Simpson rule Sn .
(1) Give both an exact error formula EnS .
(2) Using the formula for EnS , determine how large n should be chosen in order to have |I − Sn | ≤ 10−6 .

Problem 4.14
For the formula Z 1
f (x)dx ≈ w1 f (0) + w2 f (x2 )
0
determine the weights w1 , w2 and x2 such that the quadrature formula is exact for all polynomials of as large
degree as possible.

Problem 4.15
Following is a table of numerical integrals In approximating an integral I and also there are given the successive
differencies In − I 12 n .
(1) Show that the table values seem to be consistent with an error of the form I − In ≈ ncp for some constant c
and some p.
(2) Estimate p.
(3) Then estimate I − I512 .
n In In − I 12 n Rn
2 0.3222296313
4 0.3201305826 −0.0020990487
8 0.3197083509 −0.0004222317
16 0.3196228703 −0.0000854806
32 0.3196057335 −0.0000171368
64 0.3196023186 −0.0000034148
128 0.3196016399 −0.0000006787
256 0.3196015052 −0.0000001347
512 0.3196014785 −0.0000000267

Problem 4.16
Explain in what conditions and for what kind of functions the trapezoidal and Simpson’s method will not behave
as predicted by their corresponding error formulas.

Page 12

Das könnte Ihnen auch gefallen