Vous êtes sur la page 1sur 2

Exam Preparation Questions

1.a. For the following data, create the forward


difference table and find the Gregory-Newton
function. Calculate the value of function at x=-0.5
and x=1.5 Use four decimal digits arithmetic.
i
x
-1 0 1 2 3
i
f
10 0 -2 -3.75 4

1.b. For the data given in 1.a., find the Newton
interpolation function. Calculate the value of function
at x=-0.5 and x=1.5 Use four decimal digits
arithmetic.

2. Compute the following integral using Simpsons
rule with n=4. Use six decimal digits arithmetic.
}

4
3
4
3
16
4 5
dt
t
t t

3. Compute the following integral using Trapezoidal
rule with n=4. Use six decimal digits arithmetic.
}
+
8
2
3 2
4
dx
x
x

4.a. Derive the general least square formula for a
second order function in the form of
3 2
2
1
a x a x a y + + = for n data set consisting of
i
x and
i
y . Note: Derivation can be made in two ways:
I . First, write the error term and set the derivative of
it according to
1
a ,
2
a and
3
a to zero to find
1
a ,
2
a
and
3
a .
I I . Using Vandormonde matrix as taught in the class.

4.b. Fit a quadratic polynomial to the following data,
(use the formula derived in 4.a).
i
x
0 1 2 3
i
y
-1 0 3 8

4.c. Fit a quadratic polynomial to the following data,
(use the formula derived in 4.a). Use two decimal
digits arithmetic.
i
x
0 2 3 5
6
i
y
-3 -1 4 7
10

4.d. Find the Newton interpolation function for the
data given in 4.b.

4.e. Fit a linear polynomial to the following data,
(make use of the formula derived in 4.a by removing
first row and first column). Use two decimal digits
arithmetic.
i
x
3 5 6 9
11
i
y
16 23 26.5 37
44

5.a. Find y value for x=0 using Lagrange
interpolation. Use four decimal digits arithmetic.
i
x
-3 -2 1 3 6
i
y
-70 -19 2 26 317

5.b. Find y value for x=7 using Lagrange
interpolation. Use four decimal digits arithmetic.
i
x
2 4 6 8 10
i
y
1 1.8 2.1 3.5 4

6.a. Derive the general least square formula for an
exponential function in the form of
x a
e x a y

1
2
= for
n data set consisting of
i
x and
i
y . Note: First write
the error term, let
1 1
lna t = and set the derivative of it
according to
1
t and
2
a to zero to find
1
t and
2
a , then
1
a .
6.b. Fit a function in the form of
x a
e x a y

1
2
= . (By the formula you derived in 6.a.).
Use three decimal digits arithmetic.
i
x
0.5 1 2 4
i
y
0.0625 0.5 4 32

7.a. For the following data, create the forward
difference table and calculate the first, second and
third numerical derivatives at x=0.
i
x
0 0.2 0.4 0.6 0.8
1
i
f
0 0.5 0.8 0.4 0
0.2

7.b. Find the Gregory-Newton function and compute
the value of function at x=0.3 Use six decimal digits
arithmetic.
8.a. Compute dx e
x
1
9
0
}
+ using Simpsons 3/8
th
rule
with n=9. If the exact result of the integration is
178.957474, calculate your error percentage. Use six
decimal digits arithmetic.
8.b. Compute the integral in 8.a. using Rombergs
method with n=4. Use six decimal digits arithmetic.

9. For the following data, find the Vandermonde
interpolation function.
i
x
-5 3 8
i
y
98 10 150

Formula to be given in the exam:

( )
( )
[
=
=

=
n
k i
k k i
k
i
x x
x x
x
) (
0
) (

=
= ~
n
i
i i
x y x p x f
0
) ( ) ( ) (
( )
n n
b
a
b
a
p p p p p
h
x p x f + + + + + = ~

} }
) .. ( 2
2
) ( ) (
1 2 1 0

( )
3 2 1 0
) ( 3
8
3
) ( ) ( p p p p
h
x p x f
b
a
b
a
+ + + = ~
} }

( )
2 1 0
4
3
) ( ) ( p p p
h
x p x f
b
a
b
a
+ + = ~
} }

=
A
|
|
.
|

\
|
+ =
n
i
i
f
i
s
f x f
1
0 0
) (
h
x x
s
0

=
!
) 1 )..( 2 )( 1 (
i
i s s s s
i
s
+
=
|
|
.
|

\
|

r
i
r
r
h
f
x f
A
= ) (
) (

(
(
(
(
(

1
1
1
1
2 1
2
2
2
1
2
1
2
1
1
1
n n
n
n
n
n
x x x
x x x
x x x
V


nn n n
R R R
R R
R


2 1
22 21
11

n n
b
a
R x f
,
) (
}
~
1
2

=
k k
a b
h
1
) 5 . 0 (

+ =
k i
h i a p
| | ) ( ) (
2
1
11
b f a f
h
R + =
2..n
2
,
2
) (
2
1 , 1
1
1
1 ,
2
=

+ =

k
k
i
i
k
k
R
p f
h
R
k

2..n 2..n, ,
1 4
4
1 - j
1 , 1 1 ,
1 - j
,
= =

=

j i
j i j i
j i
R R
R



















Answers:
1.a. p(-0.5)=2.8515 and p(1.5)=-3.0860
1.b. p(x)=10-10(x+1)+4(x+1)x-1.2917(x+1)x(x-
1)+0.7084(x+1)x(x-1)(x-2)
p(-0.5)=2.8515 p(1.5)=-3.0860
2. Simpsons integral value=1.521749
3. Trapezoidal rule integral=9.450104

4.a.

(
(
(




i
i i
i i
i i
i i i
i i i
y
x y
x y
a
a
a
n x x
x x x
x x x
2
3
2
1
2
2 3
2 3 4

4.b. y=x
2
-1
4.c. y=0.09x
2
+1.67x-3.27
4.d. y=x
2
-1
4.e. y=3.5x+5.5
5.a. f(0)=5.0129
5.b. f(7)=2.7030
6.a.
( )
( )


= +
= +
i i i i i
i i i
x y x x a x t
x y x a n t
ln ln
ln ln
2
2 1
2 1

6.b.
x
e x y
109 . 1
125 . 0 =
7.a. 5 . 2 ) 0 ( = ' f 5 ) 0 ( = ' ' f 5 . 62 ) 0 ( = ' ' ' f
7.b. f(0.3)=0.749609
8.a. 088285 . 179 1
9
0
~ +
}
dx e
x
,the error is
0.073096%
8.b.
9. c={3 -5 -2}
T
p(x)=3x
2
-5x-2

Vous aimerez peut-être aussi