MATH 251 Final, Fall 2006

American University of Beirut · Numerical Computing · 11 pages

All MATH 251 files
MATH 251 Final, Fall 2006, page 1

Stuck on a question? A tutor can walk you through it.

MATH 251 Final, Fall 2006, page 2 MATH 251 Final, Fall 2006, page 3 MATH 251 Final, Fall 2006, page 4 MATH 251 Final, Fall 2006, page 5 MATH 251 Final, Fall 2006, page 6 MATH 251 Final, Fall 2006, page 7 MATH 251 Final, Fall 2006, page 8 MATH 251 Final, Fall 2006, page 9 MATH 251 Final, Fall 2006, page 10

Showing the first 10 of 11 pages. Download the PDF to see all of it.

More MATH 251 files

Show the text of this final exam
AMERICAN UNIVERSITY OF BEIRUT Faculty of Arts and Sciences Mathematics Department MATH-CMPS 251 FINAL EXAMINATION FALL 2006-2007 Closed Book, Two hours (ONLY NON-PROGRAMMABLE AND NON-GRAPHIC CALCULATORS ARE ALLOWED) STUDENT NAME ID NUMBER Problem Out of Grade 1 10 2 15 3 30 4 15 TOTAL 70 1 1. (10 points) Loss of significant figures may result in the computation of the following functions of the variable x for certain values of x. Specify these values then propose alternativefunctions that would remedy the loss of significant figures. (If necessary you may use Taylor’s series). (a) f(x) = ln(x + √ x2 + 1) (b) g(x) = √ x4 + 4 − 2 2 2. (15 points) Solve the following: (a) (4 points) Let pj = x2j, j ∈ N, j ≥ 0. Prove using mathematical induction, the recurrence: pj = (pj−1)2, j ≥ 1. (b) (6 points) Conclude the minimum number of arithmetic operations to compute (using whwn necessary nested evaluation): • x32 • x32 + x40 + x50 • 6(x + 3)2 + 9(x + 3)5 − 5(x + 3)8 3 (c) (5 points) Fill in the missing statements in the following MATLAB program that computes using nested multiplications, the polyno- mial: p(x) = a(1) + a(2)x + a(3)x2 + .... + a(n + 1)xn function p=nested(a,x) %Input arguments: % vector a representing the coefficients: a(1),...,a(n+1) % a scalar x %Output argument: % p=p(x) the value of the polynomial at x m=__________________; %get the number of elements of a p=__________________; %initialize p for i=____:____:____ p=_____________ end Find the number of arithmetic operations needed to execute such algorithm. 4 3. (30 points) In this problem, we consider the following table for the func- tion f(x). All computations shall be carried out with 8 significant figures. xi yi 1.000 1.58760060 1.125 1.68889110 1.250 1.80095954 1.375 1.92555928 1.500 2.06463973 1.625 2.22037684 1.750 2.39520718 1.875 2.59186604 2.000 2.81343020 (a) (5 points) Write the polynomial of degree 3, p(x), that would best approximate f(1.4). Find p(1.4). 5 (b) (6 points) Using the central difference formula to approximate f ′(1.5), followed by Richardson’s extrapolation find the best ap- proximation to f ′(1.5). For that purpose, give the formulae that provide φc,h, φ(1) c,h, φ(2) c,h, then fill out the table that follows. • φc,h= • φ(1) c,h= • φ(2) c,h= h φc,h φ(1) c,h φ(2) c,h 0.5 0.25 0.125 6 (c) (20 points) Consider the approximation of the integral I = � 1 0 f(x)dx. Let: xi = ih, i = 0, 1, ...n, (1) be a subdivision of the interval [0, 1] into n equi-spaced sub- intervals of size h. i. (4 points) Give the formula for the composite trapezoidal rule T(h) used to approximate I. Give an expression of I − T(h) en terms of powers of h. ii. (8 points) Prove the following relation: T(h 2) = T(h) 2 + h 2Σn−1 k=0f(mk), where mk = (xk + xk+1)/2 is the middle point of the interval (xk, xk+1) in the partition (1). 7 (Answer Sheet) 8 iii. (8 points) Give the formulae for T (j)(h), j = 1, 2, 3, • T (1)(h)= • T (2)(h)= • T (3)(h)= then fill up the empty spaces of the table: h T(h) T (1)(h) T (2)(h) T (3)(h) 1 0.5 0.25 0.125 9 4. (15 points) Consider a second order differential equation given by: y′′ = y − 1, y(0) = 1, y′(0) = 0.5 (a) (5 points) Write this differential equation in the form →y ′ (t) = → F ( →y), →y (0) = →y 0 . Specify → F and →y 0. (b) (5 points) Complete the formulae for a second order Runge Kutta method of the form: → k1 = τ → F ( → Yi) → k2 = τ...................................... → Yi+1 = → Yi +...................................... 10 (c) (5 points) Find approximations to y(0.125) and y′(0.125) using such Runge Kutta method 11