Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MTH 510: Numerical Analysis

Final Exam-V1

Name(Print): First Name:

Student #: Signature:

Spring 2018
Date: July 5, 2018
Time Limit: 3hrs

Instruction

• This is a closed-book test. For the Instructor’s


use ONLY
• Permitted aid: Non-programmable cal-
culators and FORMULA Sheet provided.
Problem Points Score
• This exam contains 10 pages (including this
cover page and the Formula Sheet ) and 14 1 5
problems. Check to see if any pages are miss-
ing. 2 8
• Organize your work, in a reasonably neat
3 10
and coherent way, in the space provided. Work
scattered all over the page without a clear or-
4 5
dering will receive very little credit.

• Unless otherwise instructed, make sure you 5 5


include all significant steps in your solu-
tion, presented in the correct order. Un- 6 8
justified answers will be given little or no
credit. Cross out or erase all rough work 7 5
not relevant to your solution. Put a box
around your final answer. 8 10

• When not specified, simplify your answer 9 10


and with numerical accuracy to 6 signif-
icant digits 10 2
• If you need more space, use the back of the
pages; clearly indicate when you have done 11 2
this.
12 2
Do not write in the table to the right.
13 2

14 2

Total: 76
MTH 510 Final Exam - Page 2 of 10 July 5, 2018

Part I: Full Solution Questions

1. (5 points) Using the Secant method, approximate the roots of,


x
e = x ln x

starting with initial guess of x0 = 1.5 and x1 = 2 and a maximum ✏s = 0.5%. Calculate
the approximate relative percentage error ✏a % at each iteration.
MTH 510 Final Exam - Page 3 of 10 July 5, 2018

2. (8 points) Use Jacobi iteration to solve

5x1 x2 x3 = 4
2x1 + 2x2 9x3 = 7
x1 + 7x2 + 3x3 = 2.

starting with the initial trial vector [1 0.5 0.5]T . Specify the component-wise ap-
proximate percent relative error at each iteration and iterate until all component-wise
approximate percentage relative errors fall below 10%. (Clearly indicate the approx-
imate solution to the system)
MTH 510 Final Exam - Page 4 of 10 July 5, 2018

3. (10 points) a) (3 marks) Write out the Newton form of the interpolating polynomial
P2 (x) for f (x) = log x, such that it passes through the points (3, log(3)), (6, log(6)),
(10, log(10)).

b) (2 marks) Using the polynomial P2 (x)obtained in a), find P2 (4.25) and give the
associated true relative percentage error.

4. (5 points) Given the data obtained from experimental test, the values of y at various
values of x are;

x 1 2 3 4
y 1 3 7 12

use regression to determine a model of the form y = aebx .


MTH 510 Final Exam - Page 5 of 10 July 5, 2018

5. (5 points) Use the Power method to determine the dominant eigenvalue and the corre-
sponding eigenvector of the matrix
2 3
1 0 5
A=4 1 3 05
1 0 7

Use [0.5 0 1]T as an initial estimate of the eigenvector, and iterate until you are
guaranteed to have at least 2 correct significant figure in the eigenvalue estimate.
MTH 510 Final Exam - Page 6 of 10 July 5, 2018

6. (8 points) Consider the following data:

x -1 1 3 4
y 0 3 -2 2

Find the piece of the clamped-clamped cubic spline that is valid on the interval [1, 3]
with f 0 (0) = 0, andf 0 (4) = 0. Assume the constants c1 = 3, and c4 = 9.
MTH 510 Final Exam - Page 7 of 10 July 5, 2018

7. (5 points) Consider the integral;


Z 2
(x2 + e 2x
) dx
0

4
How large should n be to guarantee an accuracy of 1.25 ⇥ 10 with composite 1/3-
Simpson’s Rule.
MTH 510 Final Exam - Page 8 of 10 July 5, 2018

8. (10 points) Consider the integral


Z 2
ln(1 + x3 ) dx
0

a) (6) Use Romberg integration up to O(h6 ) to estimate the integral and compute the
approximate relative error at each iteration.

b) (4)Evaluate the integral using Gauss-Legendre 3 point formula.


MTH 510 Final Exam - Page 9 of 10 July 5, 2018

9. (10 points) a) (6 marks) Use the fourth-order Runge-Kutta method to approximate


the solution of the IVP

y0 y cos(x) = 0; y(0) = 1

Estimate y at x = 0.5. Use a step size h = 0.25.

b) (4 marks) Rewrite the initial value problem into a system of first-order-di↵erential


equations.

d3 x d2 x dx
a + b + c + x = 10 cos(10t); x(0) = 1; x0 (0) = 2; x00 (0) = 0
dt3 dt2 dt
where a, b, and c are constants.
MTH 510 Final Exam - Page 10 of 10 July 5, 2018

Part II: Multiple Choice


Select the correct answer for the following questions.

R3
10. (2 points) Consider the integral 0
(2 + 3x + x2 ) dx. Which of the following statement
is true;
A. Applying the trapezoidal rule with n = 4 to the integral gives the exact value.
B. Applying the Simpson’s 1/3 Rule with n = 3 to the integral gives the exact
value.
C. Applying the Simpson’s 1/3 Rule with n = 4 to the integral gives the exact
value.
D. None of the above (A)-(C) is true.

11. (2 points) The result of the following commands in matlab

>>x=[-2 1 4 2];
>>y=[3 -5 6 1]
>>polyfit(x,y,2)

The result gives;


A. the coefficients for the best quadratic polynomial fitting the data.
B. the best quadratic polynomial fitting the data evaluated at x = 2.
C. the best straight line fitting the data evaluated x = 2.
D. None of the above
x
12. (2 points) To find the root of xe sin(x) = 0, the following command is a valid
command in matlab
A. fzero(@(x) x*exp(-x)-sin(x),1)
B. fzero(@(x) x.*e^(-x)-sin(x.),1)
C. fzero(x.*e^(-x)-sin(x),1)
D. None of the above

13. (2 points) (2 marks) The following commands has been entered in MATLAB:

>>x=0:0.1:2;
>>y=x.^2-5*x-2;
>>x=0:0.1:1;
>>plot(x,y)

A. a plot y = x2 5x 2 for x 2 [0, 2]


B. a plot y = x2 5x 2 for x 2 [0, 1]
C. the command leads to an error message.
D. None of the above

14. (2 points) Suppose


2 3 2 3
1 2 1 2 4 1
4
A= 1 0 1 5, A 1 4
= 0.5 0.5 0 5
1 4 2 2 3 1

Which of the following statements is true:


A. Cond (A, 1) = 49
B. Cond (A, 2) = 45
C. Cond (A, inf) = 49
D. None of (A)-(C) are true.

You might also like