You are on page 1of 10

COLLEGE OF ENGINEERING

PUTRAJAYA CAMPUS
TEST 1
SEMESTER 2 2011/2012
PROGRAMME

: Bachelor of Mechanical Engineering (Honours)/


Bachelor of Electrical Power Engineering (Honours)/
Bachelor of Electrical and Electronics Engineering (Honours)

SUBJECT CODE

: COEB223/MATB324

SUBJECT

: Numerical Methods for Engineers

DATE

: Tuesday, 9th July 2013

TIME

: 1 hour and 30 minutes (90 minutes)

INSTRUCTIONS TO CANDIDATES:
1.

This paper contains FIVE (5) questions in SEVEN (7) pages


(Formula sheets are attached after Question 5 on Page 4).

2.

Answer ALL questions.

3.

Write all answers in the answer booklet provided. Show ALL your workings.

4.

Write answer to each question on a new page.

5.

Please use FOUR (4) decimal points for your answers whenever possible.

THIS QUESTION PAPER CONSISTS OF 10 (7) PRINTED PAGES INCLUDING THIS


COVER PAGE.
Page 1 of 10

COEB223/MATB324 Semester 1 2013/14

PART A (50 marks)


1. Given the following data:
Xi
Yi

1
0.5

2
1.7

3
3.4

4
5.7

Fit a straight line to the x and y value using linear regression method. Find the standard
estimate of error,

S y /x

(17 marks)

2. Solve for the following matrix system using the LU decomposition method:

]{ } { }

6 8 12 x
466
2 3 4 y = 160
3 5 7 z
265

(18 marks)

3. You are designing a spherical tank to hold water for small village. The volume of the
liquid the tank can hold can be computed as
V = h2

3 Rh
3

where V = volume, h = depth of water in tank, and R = tank radius.


If R = 3m, what depth h must the tank be filled so that it holds 30m3? Use 3 iterations of
Newton-Raphson method to determine your answer. Use initial guess of h = 1.
(15 marks)

Page 2 of 10

COEB223/MATB324 Semester 1 2013/14

PART B (50 marks)

4. The rate of change of a scalar quantity z (in g/m3) in a tank system can be written as:
dz
V =FQzkVz 2
dt
Where V is the volume of the system = 12 m3, F is the input feed rate =175g/min, Q is the
outflow rate =1.0 m3/g/min and k a second-order reaction rate=0.15m3/g/min. It is
expected that for the given system, the steady state value for z is obtained about 6 minutes
after the system is switched on.
Given z(3.0) = 6.8, use the Eulers Method with a time step of 0.5 to find the value of z at
t=6 minutes. Find the error of approximation for each iteration.
(25 marks)

5. The ministry of housing is in the process of determining the population growth trend of a
city and adjacent suburb. The population of the urban area is declining with the time
according to
Pu ( t )=Pu , max ek t + Pu ,min
u

While the suburban population is growing, as in


P s ,max

Ps ( t ) =
1+

Ps , max
1 ek t
P0
s

Where Pu,max, ku, Ps,max, P0, and ks = empirically derived parameters. Determine the time
and corresponding value of Pu(t) and Ps(t) when the suburban has 20% larger
population than the city
The parameter value are Pu,max = 75,000 people, ku = 0.045/year, Pu,min = 100,000 people, Ps,max
= 300,000 people, P0 = 10,000 people, ks = 0.08/year. Use False Position Method with initial
guess of tL = 0, tU = 50. Do 3 iterations.

(25 marks)

6.

Page 3 of 10

COEB223/MATB324 Semester 1 2013/14

FORMULA SHEET FOR NUMERICAL METHODS FOR ENGINEERS


COEB223 / MATB324

Part 1: Modeling, Computers and Error Analysis


Error Definitions
Et =true valueapproximation

True error:
True percent relative error:
t =

true valueapproximation
100
true value

Approximate percent relative error:


a =

present app roximation previous approximation


100
present approximation

Stopping criterion:
Terminate computation when a < s where s is the desired percent relative error

Taylor Series
Taylor series expansion
(n)

f ' ' ( x i) 2 f ' ' ' ( x i ) 3


f ( xi ) n
f ( x i+1 ) =f ( x i ) + f (x i ) h+
h+
h ++
h + Rn
2!
3!
n!
'

where remainder
f (n+1 ) ( ) n+1
Rn=
h
( n+1 ) !

or

Rn=O ( h n+1 )

Error propagation
For n independent variables x1, x2, , xn having errors
error in the function f can be estimated via

Page 4 of 10

~
x1

~
x2

, ,

~
xn

, the

COEB223/MATB324 Semester 1 2013/14

| | | |

f=

| |

f
f ~
f
~
x1+
x2 ++
~
xn
x1
x2
xn

Page 5 of 10

COEB223/MATB324 Semester 1 2013/14

Part 2: Roots of Equations


Method
Bisection

False Position

Newton Raphson

Secant

Formulation
x r=

x l+ x u
2

x r=x u

f ( x u ) ( x lx u )
f ( x l ) f ( x u )

x i+1=x i

x i+1=x i

If

f ( x l ) f ( xr ) <0,

set

x u=x r

If

f ( x l ) f ( xr ) >0,

set

x l=x r

If

f ( x l ) f ( xr ) <0,

set

x u=x r

If

f ( x l ) f ( xr ) >0,

set

x l=x r

f ( xi )
f ' ( xi )
f ( x i ) ( x i1 xi )
f ( x i1 )f ( xi )

Part 3: Linear Algebraic Equations


Gauss Elimination

][

a11 a12 a13 b1


a11 a12 a 13

a21 a22 a23 b2


0 a ' 22 a ' 23
a31 a32 a33 b3
0
0 a ' ' 33

b ' ' 33
a' ' 33
b1
b ' a ' 23 x 3
b ' 2 x3 = 2
a' 22
b' ' 3
b a x a x
x 3= 1 12 2 13 3
a11

Back
Substitution
LU
decomposition
Decomposition

Page 6 of 10

x3 =

COEB223/MATB324 Semester 1 2013/14

] [ ]{ } { } [

]{ } { } { }

a11 a12 a13


b1
u11 u12 u13 x1
d1
x1
1 0 0 d1
a21 a22 a23 l 21 1 0 d 2 = b2 0 u ' 22 u ' 23 x2 = d 2 x 2
l 31 l 32 1 d 3
a31 a32 a33
b3
0
0 u ' '33 x3
d3
x3

Forward Substitution

Page 7 of 10

COEB223/MATB324 Semester 1 2013/14

Gauss-Seidel method

b 1a12 x 2j1a13 x3j1


continue iteratively until
a11
j
j1
xijx ij 1
b 2a 21 x1 a23 x 3
j
100 < s
x 2=
a22
x ij
b3a31 x 1j a32 x2j
for all xi ' s
j
x 3=
a33

x1j =

With relaxation,
new
old
x new
i = x i +(1 )x i

Part 4: Curve Fitting


Method
Linear
Regression

Formulation
y=a0+ a1 x

Errors
S y / x=

where
n

i=1

i=1

S r = e 21= ( y ia0a1 x i )2

a1=

n x i yi x i y i

S t = ( y i y ) 2

For a 2nd order polynomial fit,


y=a0+ a1 x+ a2 x

S t S r
St

where:

n x i ( x i )

a0 = ya 1 x
Polynomial
Regression

r 2=

Sr
n2

S y / x=

Sr
n( m+ 1 )

where
n

2 2

S r = ( y ia0a1 x ia2 x i )
i=1

by differentiating Sr with respect to each coefficients


and setting the partial derivatives equal to zero, we
have:

Page 8 of 10

r 2=

S t S r
St

where:
S t = ( y i y ) 2

COEB223/MATB324 Semester 1 2013/14

[
Multiple
Linear
Regression

xi
x2i

xi x 2i
x2i x 3i
x3i xi4

]{ } { }
a0
a1 =
a2

yi
xi y i
x2i y i

y=a0+ a1 x1 ++a m x m

S y / x=

Sr
n( m+ 1 )

For a two-variable linear fit,


y=a0+ a1 x1 +a 2 x 2

r 2=

S t S r
St

where
n

S r = ( y ia0a 1 x 1a2 x 2 )

where:

S t = ( y i y ) 2

i=1

by differentiating Sr with respect to each coefficients


and setting the partial derivatives equal to zero, we
have:

[
Newtons
divided
difference
interpolating
polynomial

x 1i x 2i
x 21i x 1 i x 2 i
x 1 i x 2 i x 22i

n
x1 i
x2 i

]{ } { }
a0
a1 =
a2

yi
x1 i yi
x 2 i yi

f (3) ( )
R2=( xx 0 ) ( xx 1 ) ( xx 2 )
For third order:
6
f 3 ( x )=b 0+ b1 ( xx 0 )+ b2 ( xx 0 )( xx1 ) + b3 ( xx 0 )( x x1 ) ( xx 2 )
or

where

R2=( xx 0 ) ( xx 1 ) ( xx 2 ) f [ x3 , x 2 , x

b0 =f ( x 0 )
b1=f [ x1 , x 0 ]
b2=f [ x 2 , x 1 , x 0 ]
b3 =f [ x 3 , x 2 , x 1 , x 0 ]
Lagrange
interpolating
polynomial

f n ( x ) = Li ( x ) f ( x i )
i=0

where,
Page 9 of 10

COEB223/MATB324 Semester 1 2013/14

Li ( x ) =
j=0
j i

xx j
x ix j

-END OF QUESTION PAPER -

Page 10 of 10

You might also like