Docsity

MATH 251 Final Exam at American University of Beirut - Spring 2011-2012, Exams of Numerical Methods in Engineering

Partial preview of the text

Download MATH 251 Final Exam at American University of Beirut - Spring 2011-2012 and more Exams Numerical Methods in Engineering in PDF only on Docsity!

AMERICAN UNIVERSITY OF BEIRUT

Mathematics Department-FAS

MATH 251

FINAL EXAM

SPRING 2011-

Closed Book, 2hours

STUDENT NAME

ID NUMBER

Problem Out of Grade

1 20

TOTAL 100

  1. (20 points) Consider the following 5 × 5 diagonally dominant lower

Hessenberg matrix

A =

(a) (10 pts) Apply the Naive Gauss reduction on the matrix A showing

the status of that matrix after each elimination, i.e. each of the

pivot rows and the corresponding multipliers should be identified

and circled.

(b) (3 pts) Extract out of this process, the Upper triangular matrix

U and the Unit Lower triangular matrix P.

U =

L =

(c) (4 pts)Check that :

  • at each reduction, the multipliers reduce to one value
  • at each reduction except the last, the modified elements re-

duce to two values, in addition to the diagonal element at last

reduction

then compute the total number of flops needed for the LU-decomposition

of the matrix A. Justify your answer.

(d) (3 pts) Deduce the total number of flops needed for the LU-

decomposition of the (n × n) diagonally dominant lower Hessen-

berg matrix B where c is a constant and

B =

c 1 0 0... 0

1 c 1 0... 0

1 1 c 1 0.. 0

1 1 1.. 1 c 1

1 1 1 1.. 1 c

Express your answer in terms of n.

  • Use 3 steps ONLY of this scheme to approximate y(1.2),

y(1.6) and y(2.0).

i ti yi k 1 k 2 yi+

(c) (1pt) The discrete solution of (IVP) is

Y 5 = {y 0 = 0. 5 , ....................................................................................}

(d) (8 pts)Consider the following general Initial value problem:

(IV P )

y

′ (t) = f (t, y(t)) t ∈ [t 0 , T ]

y(t 0 ) = y 0

where the function f (t, y(t)) is at least a C

4 function over its do-

main of definition.

The 4

th order explicit Runge Kutta discrete scheme solving (IVP)

is as follows:

(RK4)

k 1 = f (ti, yi)

k 2 = f (ti +

h 2

, yi +

h 2

k 1 )

k 3 = f (ti +

h 2

, yi +

h 2

k 2 )

k 4 = f (ti + h, yi + hk 3 )

yi+1 = yi +

1 6

h(k 1 + 2k 2 + 2k 3 + k 4 )

Write the MATLAB function:

function y = RK4(f , y 0 , t 0 , T, n)

that inputs a function f (t, y(t)), the initial condition y 0 of (IVP),

and a positive integer n being the number of subintervals of equal

length subdividing the time interval [t 0 , T ]. This function outputs

the discrete solution of (IVP) using the (RK4) discrete scheme as

a vector y of length (n + 1).

function y = RK4(f , y 0 , t 0 , T, n)

Compute the time step h

(b) (6 points) Based on the Forward difference formula, derive Richard-

son extrapolation operators of orders 1 and 2 and the order of their

error series.

  • 1st order Richardson extrapolation operator:

φ

1 h(f^ (xi)) =

Corresponding Error = O(...........)

  • 2nd order Richardson extrapolation operator:

φ

2 h(f^ (xi)) =

Corresponding Error = O(...........)

(c) (8 pts) Let f (x) = x + e

x

. For the purpose of approximating

f

′ (1.0) and then improving this approximation, fill in the empty

slots in the following table adequately, starting with h 0 = 0.4.

Express all the results obtained in F (10, 5 , − 15 , +15).

h φh(.) φ

1 h(.)^ φ

2 h(.)

h 0 = 0. 4

h 0 / 2

h 0 / 4

Best approximation to f

′ (1.0) :

  1. (24 points) Consider the function f (x) = x

2 − a where a ≥ 1.

(a) (7 pts)Plot the graph of f , then write Newton’s formula:

rn+1 = g(rn) that computes the negative root of the function

f. Is there any restriction on the initial condition r 0? Justify

your answer.

(b) (7 pts)Use part (a) to compute −

3 up to 5 decimal figures

rounding to the closest. (Locate the root first).

(c) (5 pts) Use the general case where f (x) = x

2 − a, and the equa-

tion derived in (a) to prove that:

∀n ≥ 0 , (rn+1 − r) < 0

(i.e. all the elements of the sequence {rn}n≥ 1 generated by New-

ton’s method lie to the left of r)

(Hint: Let a = r

2 )

(d) (5 pts)Show that Newton’s iterative sequence {rn}n≥ 1 derived in

(a) is an increasing sequence converging to r. For that purpose:

  • Prove that ∀n ≥ 1 , rn+1 − rn > 0