






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Faculty of Arts and Sciences Mathematics Department
MATH-CMPS 251 FINAL EXAMINATION FALL 2006- Closed Book, Two hours
Problem Out of Grade 1 10
2 15
3 30
4 15
TOTAL 70
(a) f (x) = ln(x +
x^2 + 1)
(b) g(x) =
x^4 + 4 − 2
(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)x^2 + .... + 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.
xi yi 1.000 1. 1.125 1. 1.250 1. 1.375 1. 1.500 2. 1.625 2. 1.750 2. 1.875 2. 2.000 2.
(a) (5 points) Write the polynomial of degree 3, p(x), that would best approximate f (1.4). Find p(1.4).
(c) (20 points) Consider the approximation of the integral I =
0 f^ (x)dx. Let: (1) xi = ih, i = 0, 1 , ...n, 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:
h 2
T (h) 2
h 2
Σn k=0−^1 f (mk),
where mk = (xk + xk+1)/2 is the middle point of the interval (xk, xk+1) in the partition (1).
(Answer Sheet)
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
(b) (5 points) Complete the formulae for a second order Runge Kutta method of the form:→ k 1 = τ
→ F (
→ Yi) → k 2 = τ...................................... → Yi+1 =
→ Yi +......................................
(c) (5 points) Find approximations to y(0.125) and y′(0.125) using such Runge Kutta method