Mat575 2008-1

You might also like

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

CS/APR 2008/MAT575

CONFIDENTIAL

UNIVERSITI TEKNOLOGI MARA


FINAL EXAMINATION

COURSE

INTRODUCTION TO NUMERICAL ANALYSIS

COURSE CODE

MAT575

EXAMINATION

APRIL 2008

TIME

3 HOURS

INSTRUCTIONS TO CANDIDATES
1.

This question paper consists of five (5) questions.

2.

Answer ALL questions in the Answer Booklet. Start each answer on a new page.

3.

Do not bring any material into the examination room unless permission is given by the
invigilator.

4.

Please check to make sure that this examination pack consists of:
i)
ii)
iii)

the Question Paper


a two - page Appendix I
an Answer Booklet - provided by the Faculty

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO


This examination paper consists of 4 printed pages
Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

CS/APR 2008/MAT575

ANSWER ALL QUESTIONS


QUESTION 1

a)

b)

Let f(x) = 2 x c o s 2 x - ( x - 2 ) 2
i)

Show that there is at least one solution for f (x) = 0, in the interval [ 2 , 3 ] .
(3 marks)

ii)

Find a bound for the number of Bisection method iterations needed to achieve
an approximation with accuracy 10"1 to the solution of f (x) = 0 in the interval
[ 2 , 3 ] . Approximate the root to this degree of accuracy.
(10 marks)

Let P3(x) be the Lagrange interpolating polynomial for the data (0,0) (0.5,y) (1,3) and
(2,2). Find y if the coefficient of x 3 in P3 (x) is 6.
(7 marks)

QUESTION 2

a)

Describe the Newton's method to find the first approximation to the solution of f(x) =0
(4 marks)

b)

i)

Use two iterations of the Newton's method to find a solution for 2 sin 2x = x
with p0 = 0.5.
(7 marks)

ii)

Find the first approximation to ^/ 25 using the Newton's method with p0 = 2.5.
Compute the absolute error.
(5 marks)

c)

Let f (x) = - x 3 - cos x , p0 = - 1 , and p1 = 0. Find p3 using the Secant method.


(4 marks)

Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

CS/APR 2008/MAT575

QUESTION 3
a)

Consider the following data taken from an experiment:

0.5
1.089

f(x)

0.7
1.256

0.6
1.173

0.9
1.421

0.8
1.338

Construct the least squares polynomial of degree 1 for the given data.
(7 marks)
b)

Find

the linear
e"x- 3

least

square

polynomial

approximation

for

the

function

in the interval [ - 1 , 1 ] .
(13 marks)

QUESTION 4
a)

Given the function f at the following values:

1.8
3.12014

f(x)

Approximate
i)

2.0
4.42569

f26f(x)dx
v

J1.8

2.2
6.04241

2.4
8.03014

2.6
10.46675

using each of the following method:

Composite Trapezoidal rule with n = 4


(7 marks)

ii)

Simpson's rule
(3 marks)

b)

Find the cubic interpolation polynomial using Newton's backward divided-difference


interpolation for the following table and approximate f (7.31)
X

f(x)

2
5

4
64

6
219

8
518
(10 marks)

Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

CS/APR 2008/MAT575

CONFIDENTIAL

QUESTION 5
Given the initial value problem,

y'=te3t-2y ,
a)

0 < t <1,

y(O) = o

Solve the initial-value problem with h = 0.5 by using:


i)

Euler's Method
(5 marks)

ii) the fourth order Runge-Kutta method


(12 marks)
b)

If the actual solution is


Q

25

_i_

25

compute the relative error for both methods.


(3 marks)

END OF QUESTION PAPER

Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

APPENDIX 1(1)

CS/APR 2008/MAT575

Numerical Formulae

Bisection Method

Secant Method

P - a , bn ~ a n o n [ K 1
Pn_an+-_-on[an.bn]

O < -D
Pn+1-Pn

tPn)(Pn~Pn-i)
f(pn)_f(pni)

Newton-Raphson's method:
_P_f(Pn)

nth Lagranqe Interpolating Polvnomial


I where
k-0

L ( x -x 0 )(x-x 1 )....(x-x k . 1 )(x-x k J....(x-x n )


"* (xk -x o )(x k -x,)....(x k - x M ) ( x k -xk+I)....(xk - x n )
Newton's forward difference formula

Newton's backward diffeience formula

Trapezoidal rule

Jf(x)dx = ^(f(a) + f(b) + 2 2 f ( X j ) ) where h = - ^ ^


a

Simpson's 1/3 rule


Jf(x)dx = - (f(a) + f(b) + 4]T f(x 2 H ) + 2 f(x2J)) where h = 5 ^ , n even
a

R,

H,

odd

even

Simpson's 3/8 rule


b

j f{x)dx = | h[{f(a) + 3f(a + h) + 3f(a + 2h) + f(b)l

Jo

Hak Cipta Universiti Teknologi MARA

b-a
where h =
n

CONFIDENTIAL

CS/APR 2008/MAT575

APPENDIX 1 (2)

CONFIDENTIAL

Fourth Order Runae-Kutta method

where ^ = hf(t|,G>J) , K 2 = hf(tt + ,<, + & ) , K 3 - hf<t|


K 4 =hf(li+1l<Df + K 3 ) or K 4 =hf<tj

Euter's method
j + 1 =j +hf{t),coj) where COQ = a and i = 0,1 l .....,n-l

Discrete teast square

z*?

Continuous least sauares Approximation


ak jxJ+k dx = Jxif{x)dx for j = 0 , 1...n

Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

You might also like