Question 1 (20 marks)
a) The voltage in a high-voltage transmission line is stated to be 2.4MV while the
actual voltage may range from 2.1 MV to 2.7 MV. What is the maximum absolute and
relative error of voltage? (10 Marks)
b) Find the most accurate value of the following operation
3.2525-2.112 + 1.9856 +4.3335
where each numbers has been rounded. (10 Marks)
Question 2 (20 marks)
a) Given a function 4 x3 +2 x 2+ 3 . Check whether there is root in the interval:
i) [-1.4,-1.0]
ii) [-1.0,1.0]
(4 marks)
b) Next, using Bisection method and the suitable interval, find the root of the
function. Perform the calculation at 4 decimal points.
(8 marks)
c) Using Newton method, find the root at 4 decimal points with
i) x0=-1.0
ii) x0=1.0
Do your calculations until 4 iterations only.
What is your conclusion with these two different x0?
(8 marks)
1
Question 3 (20 marks)
a) You are given matrix A as follows,
A= [ 104 −9−2 ]
i) Find the characteristic function for the matrix A.
(4 marks)
b) For the matrix B given below,
[ ]
4 0 1
B= −2 1 0
−2 0 1
i) Find the dominant eigenvalue and corresponding eigenvector using
power method. Start with the initial vector , v(0) = (1,1,0)T and iterate
until Mn+1 - Mn ≤ ɛ = 0.05. Do your calculations in 3 decimal points.
(8 marks)
ii) Given the dominant eigenvalue of B is 3, determine the shifted matrix,
Bshifted of B and apply the shifted Power Method to generate the next
approximate eigenvector, v(1) with the initial vector, v(0) = (1,1,1)T.
(8 marks)
1
v ( k +1 )= Bv( k )
(hint: mk +1 B
and shifted
=B−λ1 I ).
2
Question 4 (20 marks)
a) Consider a function with the following tabulated values:
K 0 1 2 3 4
xk 0.0 0.2 0.4 0.6 0.8
yk 1.000 0.024 -0.102 0.898 3.024
i) What is the most suitable Newton method to approximate y(0.1) and
y(0.7)?
(2 marks)
ii) Using the suitable Newton method, approximate y(0.7).
(6 marks)
b) Answer the questions based on the following data.
X -0.1 0.0 0.2 0.3
f(x) 5.3 2.0 3.19 1.0
i) Using all data points, find f(0.1) using Lagrange formula.
(6 marks)
ii) A linear polynomial in term of p ( x ) =a0 + a1 x that suits the data using
smallest square approximation.
(6 marks)
3
Question 5 (20 marks)
3 2
a) Given f (x )=5 x −x +7 x −2 . Perform calculation at 3 decimal
points.
i)Derive the first derivative, f ' (x ) and second derivative, f ''( x ) of the above
function .
(2 marks)
ii) Using direct method, fill in the following table with relevant f (x )
values, f ' (x ) and f ''( x ) . Calculate value only for non- shaded box.
(3 marks)
x 0.000 0.500 1.000 1.500 2.000 2.500
f (x )
f ' (x )
f ''( x )
iii) Using three-point forward formula, derive the value f ' (2. 00) and compare the
answer in the table. (5 marks)
b) Given the following integration:
3.6
∫ x3 x−4 dx
3
Do the calculation at 4 decimal points. Approximate the integration value of
the function using:
i) Trapezium Rule. Use h=0.1.
ii) 1/3 Simpson Rule. Use h=0.1.
(10 marks)
4
List of formulas
Non-Linear Equations
a+ b
x c=
2
Bisection Method:
af (b )−bf (a )
x c=
f (b )−f (a )
False Position Method:
x i f ( xi+1 )−x i+1 f ( x i )
x i+2 =
: f ( x i+1 )−f ( x i ) , where i=0,1,2 ..n
Secant Method
f ( xn )
x n+1 =x n − '
Newton’s Method: f ( x n ) where n=0,1,2,..m
Eigen values
1
v ( k +1 )= Av( k )
Power Method:
m k +1 , k=0,1,2....
Interpolation and Approximation
Newton Front Difference Formula:
r (r 1) 2 r (r 1)...r n 1 n
p n ( x ) y k ry k y k ... yk
2! n!
with
r x x k / h .
Newton Back Difference Formula:
r (r 1) 2 r (r 1)...r n 1 n
p n ( x ) y k r y k y k ... yk
2! n!
r x x k / h .
with
Newton Divided Difference Formula:
f [ xk 1 , xk 2 ,...., xk n ] f [ xk , xk 1 ,..., xk n 1 ]
f [ xk , xk 1 ,..., xk n ]
xk n xk
Lagrange Formula:
5
n
pn ( x )=L0 ( x ) y 0 + L1 ( x ) y1 +.. . .. .. Ln ( x ) y n =∑ Li ( x ) y i
i =0
with
n (x x )
( x x 0 )...( x xi 1 )( x xi 1 )...( x x n )
j
Li ( x )
( xi x 0 )...( xi xi 1 )( xi xi 1 )...( xi x n ) j 0 ( xi x j )
j i
6
Smallest Square Approximation:
a 0 s 0 a1 s1 ... a m s m v0
a 0 s1 a1 s 2 ... a m s m 1 v1
………
………
a 0 s m a1 s m1 ... a m s 2 m v m
with
n
s j x kj
k 0 , j 0, 1, ..., 2m
n
vl x kl f k
k 0 , l 0, 1, ..., m
Numerical Differentiation
Forward Difference
f ( x i +h ) −f ( x i)
f ' ( x i )=
h
Backward Difference
'
f ( x i ) −f ( x i−h )
f ( x i )=
h
Centre Difference Formula
'
f ( x i +h ) −f ( x i−h )
f ( x i )=
2h
Three-Point Forward Difference
1
2h [
−3 f ( xi ) + 4 f ( xi +h )−f ( xi +2 h ) ]
'
f ( x i )=
Three-Point Backward Difference
1
'
f ( x i )=
2h
[ f ( x i−2 h )−4 f ( x i−h ) +3 f ( x i ) ]
Five-Point Forward Difference
1
'
f ( x i )=
12 h
[ f ( xi −2 h )−8 f ( xi −h ) +8 f ( xi + h )−f ( x i+2 h ) ]
7
Five-Point Backward Difference
1
'
f ( x i )=
12 h
[−25 f ( xi ) + 48 f ( x i +h ) −36 f ( x i +2 h ) +16 f ( x i +3 h ) −3 f ( x i+ 4 h ) ]
Numerical Integration
Trapezium Rule
( )
b N−1
∫ f ( x ) dx= h2 f 0 +f N +2 ∑ f i
a i =1
One-third Simpson Rule
( )
b N/2 N /2−1
∫ f ( x ) dx= h3 (f 0 + f N )+ 4 ∑ f 2 i−1+2 ∑ f 2i
a i=1 i=1
Three-eight Simpson Rule
( )
b N/3 N /3−1
3h
∫ f ( x ) dx= 8
( f 0 + f N )+3 ∑ (f 3 i−2 + f 3 i−1 )+2 ∑ f 3i
a i=1 i=1