CMPS 251 Final Exam - Approximation and Numerical Integration, Exams of Numerical Methods in Engineering

The final exam questions for the Computer Science Department's CMPS 251 course at the American University of Beirut, Fall 2003-2004. The exam covers topics such as polynomial approximation, numerical differentiation using central difference formula and Richardson's extrapolation, and numerical integration using Mid-point, trapezoidal, Simpson's rules, and Romberg integrations.

Typology: Exams

2019/2020

Uploaded on 12/09/2020

Moussa_Swaidan
Moussa_Swaidan 🇮🇹

12 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AMERICAN UNIVERSITY OF BEIRUT
Faculty of Arts and Sciences
Computer Science Department
CMPS 251
FINAL EXAM
FALL 2003-2004
Closed Book, Two hours
GIVE YOUR ANSWERS ON THE QUESTION SHEET
SUBMIT WITH BOOKLET
STUDENT NAME
ID NUMBER
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download CMPS 251 Final Exam - Approximation and Numerical Integration and more Exams Numerical Methods in Engineering in PDF only on Docsity!

AMERICAN UNIVERSITY OF BEIRUT

Faculty of Arts and Sciences Computer Science Department

CMPS 251

FINAL EXAM

FALL 2003-

Closed Book, Two hours

GIVE YOUR ANSWERS ON THE QUESTION SHEET

SUBMIT WITH BOOKLET

STUDENT NAME

ID NUMBER

  1. In this problem, we consider the following table for the function f (x). All computations shall be carried out with 8 significant figures.

xi yi 0.000 4. 0.125 3. 0.250 3. 0.375 3. 0.500 3. 0.625 2. 0.750 2. 0.875 2. 1.000 2.

(a) Write the polynomial of degree 3 p(x) that would best approxi- mate f (0.3). Find p(0.3).

(c) Using the Mid-point, trapezoidal and Simpson’s rules followed by Romberg integrations fill out the following table used to approxi- mate I =

∫ (^1) 0 f^ (x)dx

h Mh Th Sh R(1) h R(2) h h 0 × × × × h 0 2 × × h 0 4 h 0 8 ×^ ×^ ×^ × × × × ×

  1. Suppose a real number L is appoximated by φ(h) such that:

L = φ(h) + c 1 h^3 + c 2 h^5 + c 3 h^7 + ...,

where the coefficients {ci} are independent from h. What combina- tion of φ(h) and φ(h 2 ) would give a better approximation φ^1 (h) to L than φ(h)? What is the order α of the approximation of L by φ^1 (h), (i.e. L = φ^1 (h) + O(hα))?

  1. To perform Naive Gauss elimination for the following quadridiagonal matrix (^)           

d 1 u 1 v 1 0 .. .. 0 0 l 1 d 2 u 2 v 2 0 .. .. 0 0 l 2 d 3 u 3 v 3 0 .. 0 0 0 l 3 d 4 u 4 v 4 .. 0 :....... 0 .. 0 li di... :....... :... ln− 3 dn− 2 un− 2 vn− 2 0.... ln− 2 dn− 1 un− 1 0 .. .. 0 .. 0 ln− 1 dn

          

One uses the following algorithm: for i from 1 to n- li = li/di di+1 = di+1 − li ∗ ui if i<n- ui+1 = ui+1 − li ∗ vi end end Give the exact number of floating point operations needed to per- form this algorithm.

  1. Give with justification the minimum number of arithmetic operations (additions, subtractions and multiplications) to compute, using nested multiplication, the following polynomials

Polynomial p(x) Minimum number of arithmetic operations (x − 2)^17 + (x − 2)^31

4 x^5 − 6 x^12 + 2x^17 − x^33