Sie sind auf Seite 1von 4

# Department of Chemical Engineering

## Indian Institute of Technology Guwahati

CL 314: Numerical Methods in Chemical Engineering

## Solution key of Midsem Feb 28, 2019

1. In order to use Regula Falsi method, let us take the function f (x) = x2 − 18 which
needs to be ushered to the value of ZERO. The Regula-Falsi method argues

f (xl ) f (xu )
=
(xr − xl ) (xr − xu )

## which subsequently yields

f (xu ) (xl − xu )
xr = xu −
f (xl ) − f (xu )
(x2 − 18) (xl − xu )
= xu − 2 u
(xl − 18) − (x2u − 18)
= ···
x2 − 18
= xu − u
xl + xu

xr − xr,old
εs = × 100%
xr

## Hereby the following table may be generated

x2 − 18

xr − xr,old
iteration xl xu xr = xu − u x2r
f (xr ) = − 18 εs = × 100%
x l + xu xr
1 4 5 4.2222 -0.17284 ···
2 4.2222 5 4.241 -0.014226 0.44192
3 4.241 5 4.2425 -0.0011661 0.036285
−5
4 4.2425 5 4.2426 -9.5555×10 0.0029738

Hence the answer is 18 = 4.2426

## Page 1 of 4 Please go on to the next page. . .

Solution Key of Midsem CL 314: Numerical Methods in Chemical Engineering Feb 28, 2019

## 2. The first iteration with x = {0.1, 0.4, 0.7} yields

 
f (x) = −1.604 −0.416 0.898
   
h = (x2 − x1 ) (x3 − x2 ) = 0.3 0.3
 
f (x2 ) − f (x1 ) f (x3 ) − f (x2 )  
δ= = 3.96 4.38
x2 − x1 x3 − x2
δ2 − δ1
a= = 0.7
h2 + h1
b = ah2 + δ2 = 4.59
c = f (x3 ) = 0.898

## The sign of b is +ve. Hence

−2c
x4 = x3 + √ = 0.49814
b + b 2 − 4ac

x4 − x3
εs =
× 100% = 40.522%
x4

## The value of x4 is nearer to x2 and x3 . So the second iteration is done with x =

{0.4, 0.7, 0.49814} which yields
 
f (x) = −0.416 0.898 −0.0078876
 
h = 0.3 −0.20186
 
δ = 4.38 4.4878
a = 1.0981
b = 4.2661
c = −0.0078876

## The sign of b is +ve. Hence

−2c
x4 = x3 + √ = 0.49999
b + b 2 − 4ac

x4 − x 3
εs =
× 100% = 0.36961%
x4

or
Y = a0 + a1 X

## Page 2 of 4 Please go on to the next page. . .

Solution Key of Midsem CL 314: Numerical Methods in Chemical Engineering Feb 28, 2019

where
Y = log y
a0 = log a
a1 =b
X = log x
Now the following table may be generated
i xi yi Xi = log xi Yi = log yi Xi2 X i Yi
1 2.5 13 0.91629 2.5649 0.83959 2.3502
2 3.5 11 1.2528 2.3979 1.5694 3.004
3 5 8.5 1.6094 2.1401 2.5903 3.4443
4 6 8.2 1.7918 2.1041 3.2104 3.7701
5 7.5 7 2.0149 1.9459 4.0598 3.9208
6 10 6.2 2.3026 1.8245 5.3019 4.2012
7 12.5 5.2 2.5257 1.6487 6.3793 4.1641
8 15 4.8 2.7081 1.5686 7.3335 4.2479
9 17.5 4.6 2.8622 1.5261 8.1922 4.3679
10 20 4.3 2.9957
P 1.4586
P 8.9744
P 2 4.3696
P
Xi = 20.979 Yi = 19.179 Xi = 48.451 Xi Yi = 37.84
X̄ = 2.0979 Ȳ = 1.9179
Hence
P P P
n Xi Yi − Xi Yi
a1 = = −0.54029
n Xi2 − ( Xi )2
P P

a0 = Ȳ − a1 X̄ = 3.0514
a = ea0 = 21.146
b = −0.54029
Further at x = 9 , y = 21.146 × 9−0.54029 = 6.4515
4. The Lagrange interpolating polynomial is given by
(π − 2.5) (π − 2.75) (π − 3) (π − 3.25)
cos (π) = cos (3.5)
(3.5 − 2.5) (3.5 − 2.75) (3.5 − 3) (3.5 − 3.25)
(π − 2.5) (π − 2.75) (π − 3) (π − 3.5)
+ cos (3.25)
(3.25 − 2.5) (3.25 − 2.75) (3.25 − 3) (3.25 − 3.5)
(π − 2.5) (π − 2.75) (π − 3.5) (π − 3.25)
+ cos (3)
(3 − 2.5) (3 − 2.75) (3 − 3.5) (3 − 3.25)
(π − 2.5) (π − 3.5) (π − 3) (π − 3.25)
+ cos (2.75)
(2.75 − 2.5) (2.75 − 3.5) (2.75 − 3) (2.75 − 3.25)
(π − 3.5) (π − 2.75) (π − 3) (π − 3.25)
+ cos (2.5)
(2.5 − 3.5) (2.5 − 2.75) (2.5 − 3) (2.5 − 3.25)
= −0.999998654862319

## Page 3 of 4 Please go on to the next page. . .

Solution Key of Midsem CL 314: Numerical Methods in Chemical Engineering Feb 28, 2019

5. If matrix A is expressed as a product of one lower triangular (L) and one upper triangular
(U ) matrices, then
    
a11 a12 a13 a14 1 0 0 0 u11 u12 u13 u14
 a21 a22 a23 a24   l21 1 0 0   0 u22 u23 u24 
 a31 a32 a33 a34  =  l31 l32 1 0   0
    
0 u33 u34 
a41 a42 a43 a44 l41 l42 l43 1 0 0 0 u44

or
 
u11 u12 u13 u14
 l21 u11 u22 + l21 u12 l21 u13 + u23 l21 u14 + u24 
A=
 l31 u11 l32 u22 + l31 u12 u33 + l31 u13 + l32 u23

l31 u14 + l32 u24 + u34 
l41 u11 l42 u22 + l41 u12 l43 u33 + l41 u13 + l42 u23 u44 + l41 u14 + l42 u24 + l43 u34

u11 = a11
u12 = a12
u13 = a13
u14 = a14

## or for an n × n system, u1i = a1i for i = 1, 2, . . . , n. Further,

a21
l21 =
u11
a31
l31 =
u11
a41
l41 =
u11
ai1
or for an n × n system, li1 = for i = 2, . . . , n. Further, the rest of the elements
u11
may sequentially be calculated in the order of - one unknown row of U followed by one
unknown column of L. The unknown row of U is expressed as
i−1
X
uij = aij − lik ukj for i 6 j
k=1

## and unknown column of L is expressed as

j−1
!
1 X
lij = aij − lik ukj for i > j
ujj k=1