Professional Documents
Culture Documents
Quiz 08ode Runge4th Solution
Quiz 08ode Runge4th Solution
dy 1 xy 3
(C) cos x , y 0 5
dx 3 3
dy 1
(D) sin x , y 0 5
dx 3
Solution
The correct answer is (B)
dy
3 xy 2 sin x, y 0 5
dx
is rewritten as
dy
3 sin x xy 2 , y 0 5
dx
sin x xy 2 , y 0 5
dy 1
dx 3
dy
2. Given 3 5 y 2 sin x, y 0.3 5 and using a step size of h 0.3 , the value of y 0.9
dx
using Runge-Kutta 4th order method is most nearly
(A) –0.25011 10 40
(B) –4297.4
(C) –1261.5
(D) 0.88498
Solution
The correct answer is (C)
dy
3 5 y 2 sin x, y 0.3 5
dx
is rewritten as
dy 1
sin x 5 y 2 , y 0.3 5
dx 3
the Runge-Kutta 4th order method is
1
yi 1 yi k1 2k2 2k3 k4 h
6
where
k1 f xi , yi
1 1
k 2 f xi h, yi k1h
2 2
1 1
k3 f xi h, yi k2 h
2 2
k4 f xi h, yi k3h
for i 0, x0 0.3, y0 5
k1 f x0 , y 0
f 0.3,5
1
sin 0.3 5 5
3
2
41.5682
1 1
k 2 f x 0 h, y 0 k1 h
2 2
1 1
f 0.3 0.3,5 41.5682 0.3
2 2
f 0.45,1.23523
1
3
sin 0.45 5 1.23523
2
2.398
1 1
k 3 f x0 h, y 0 k 2 h
2 2
1 1
f 0.3 0.3,5 2.398 0.3
2 2
f 0.45,4.6403
1
sin 0.45 5 4.6403
3
2
35.7423
k 4 f x 0 h, y 0 k 3 h
f 0.3 0.3,5 35.7423 0.3
f 0.6,5.72269
1
sin 0.6 5 5.72269
3
54.3938
1
y1 y 0 k1 2k 2 2k 3 k 4 h
6
1
5 41.5682 2 2.398 2 35.7423 54.3938 0.3
6
3.61213
x1 x 0 h
0.3 0.3
0 .6
1
3
sin 0.75 5 6.84577
2
77.8804
1 1
k 3 f x1 h, y1 k 2 h
2 2
1 1
f 0.6 0.3,3.61213 77.8804 0.3
2 2
f 0.75,15.2942
1
sin 0.75 5 15.2942
3
2
389.627
k 4 f x 0 h, y 0 k 3 h
f 0.6 0.3,3.61213 389.627 0.3
f 0.9,120.5
1
sin 0.9 5 120.5
3
24200.2
1
y 2 y1 k1 2k 2 2k 3 k 4 h
6
1
3.61213 21.5576 2 77.8804 2 389.627 24200.2 0.3
6
1261.45
x 2 x1 h
0. 6 0. 3
0. 9
y x 2 1261.45
y 0.9 1261.45
dy
3. Given 3 y 2 e x , y 0.3 5 , and using a step size of h 0.3 , the best estimate of
dx
dy
0.9 Runge-Kutta 4th order method is most nearly
dx
(A) -1.6604
(B) -1.1785
(C) -0.45831
(D) 2.7270
Solution
The correct answer is (A)
dy
3 y 2 e x , y 0.3 5
dx
is rewritten as
dy 1 x
e y 2 , y 0.3 5
dx 3
the Runge-Kutta 4th order method is
1
yi 1 yi k1 2k2 2k3 k4 h
6
where
k1 f xi , yi
1 1
k 2 f xi h, yi k1h
2 2
1 1
k3 f xi h, yi k2 h
2 2
k4 f xi h, yi k3h
for i 0, x0 0.3, y0 5
k1 f x 0 , y 0
f 0.3,5
1
e 0.3 5
3
2
7.8833
1 1
k 2 f x 0 h, y 0 k1 h
2 2
1 1
f 0.3 0.3,5 7.8833 0.3
2 2
f 0.45,3.81751
3
1 0.45
e 3.81751
2
4.33502
1 1
k 3 f x 0 h, y 0 k 2 h
2 2
1 1
f 0.3 0.3,5 4.33502 0.3
2 2
f 0.45,4.34975
e 0.45 4.34975 2
1
3
5.784
k 4 f x 0 h, y 0 k 3 h
f 0.3 0.3,5 5.784 0.3
f 0.6,3.2648
1
e 0.6 3.2648 2
3
2.9456
1
y1 y 0 k1 2k 2 2k 3 k 4 h
6
1
5 7.88338 2 4.33502 2 5.784 2.9456 0.3
6
3.44665
e 0.6 3.44665 2
1
3
3.35243
1 1
k 2 f x1 h, y1 k1 h
2 2
1 1
f 0.6 0.3,3.44665 3.35243 0.3
2 2
f 0.75,2.94378
3
1 0.75
e 2.94378
2
2.18295
1 1
k 3 f x1 h, y1 k 2 h
2 2
1 1
f 0.6 0.3,3.44665 2.18295 0.3
2 2
f 0.75,3.11921
1
e 0.75 3.11921
3
2
2.53749
k 4 f x 0 h, y 0 k 3 h
f 0.6 0.3,3.44665 2.53749 0.3
f 0.9,2.6854
1
e 0.9 2.6854
3
2
1.58392
1
y 2 y1 k1 2k 2 2k 3 k 4 h
6
1
3.44665 3.35243 2 2.18295 2 2.53749 1.58392 0.3
6
2.72779
x 2 x1 h
0.6 0.3
0. 9
dy 1 x
dx 3
e y2
dy
dx
0.9 1 e 0.9 y 0.9 2
3
1
e 0.9 2.72779
3
2
1.6604
4. The velocity (m/s) of a parachutist is given as a function of time (seconds) by
t 55.8 tanh(0.17t ), t 0
Using Runge-Kutta 4th order method with a step size of 5 seconds, the distance traveled by the
body from t 2 to t 12 seconds is estimated most nearly as
(A) 341.43 m
(B) 428.97 m
(C) 429.05 m
(D) 703.50 m
Solution
The correct answer is (C)
t 55.8 tanh(0.17t ), t 0
the Runge-Kutta 4th order method is
1
S i 1 S i k1 2 k 2 2 k 3 k 4 h
6
where
k1 f t i , S i
1 1
k 2 f t i h, S i k1 h
2 2
1 1
k 3 f t i h, S i k 2 h
2 2
k 4 f t i h, S i k 3 h
for i 0, t 0 2, S 0 0
k1 f t 0 , S 0
f 2,0
55.8 tanh(0.17 2)
18.2732
1 1
k 2 f t 0 h , S 0 k1 h
2 2
1 1
f 2 5,0 18.2732 5
2 2
f 4.5,45.683
55.8 tanh 0.17 4.5
35.9359
1 1
k 3 f t 0 h, S 0 k 2 h
2 2
1 1
f 2 5,0 35.9359 5
2 2
f 4.5,89.8398
55.8 tanh 0.17 4.5
35.9359
k 4 f t 0 h, S 0 k 3 h
f 2 5,0 35.9359 5
f 7,179.68
55.8 tanh 0.17 7
46.3463
1
S 1 S 0 k1 2 k 2 2 k 3 k 4 h
6
1
0 18.2732 2 35.9359 2 35.9359 46.3463 5
6
173.636
t1 t 0 h
25
7
for i 1, t1 7, S1 173.636
k1 f t 1 , S 1
f 7,173.636
55.8 tanh(0.17 7)
46.3463
1 1
k 2 f t1 h , S 1 k 1 h
2 2
1 1
f 7 5,173.636 46.3463 5
2 2
f 9.5,289.502
55.8 tanh 0.17 9.5
51.5534
1 1
k 3 f t 1 h, S 1 k 2 h
2 2
1 1
f 7 5,173.636 51.5534 5
2 2
f 9.5,302.52
55.8 tanh 0.17 9.5
51.5534
k 4 f t1 h, S1 k 3 h
f 7 5,173.636 51.5534 5
f 12,431.403
55.8 tanh 0.17 12
53.9445
1
S 2 S1 k1 2 k 2 2 k 3 k 4 h
6
1
173.636 46.3463 2 51.5534 2 51.5534 53.9445 5
6
429.05 m
t 2 t1 h
75
12
The distance traveled from t = 2 to t = 12 is
Distance traveled S 2 S 0
S t2 S t0
S 12 S 2
429.05 0
429.05m
5. Runge-Kutta method can be derived from using first three terms of Taylor series of writing
the value of y i 1 , that is the value of y at xi 1 , in terms of y i and all the derivatives of y at
xi . If h xi 1 xi , the explicit expression for y i 1 if the first five terms of the Taylor series
are chosen for the ordinary differential equation
dy
5 y 3e 2 x , y 0 7 ,
dx
would be
(A)
y i 1 y i 3e 2 xi 5 y i h 5h 2
2
h2
2
y i 1 y i 3e 2 xi 5 y i h 21e 2 xi 25 y i
(B)
h6 300909e h24
3 4
483e 2 xi 625 y i 2 xi
390625 y i
h2 12e h6
2 3
y i 1 y i 3e 2 xi 5 y i h 6e 2 xi 2 xi
(C)
h24
4
24e 2 xi
h2 12e h6
2 3
y i 1 y i 3e 2 xi 5 y i h 6e 2 xi 5 2 xi
(D)
h24
4
24e 2 xi
Solution
The correct answer is (B)
3
h h4
483e 2 xi 625 y i 300909e 2 xi 390625 y i
6 24
6. A hot solid cylinder is immersed in an cool oil bath as part of a quenching process. This
process makes the temperature of the cylinder, c , and the bath, b , change with time. If the
initial temperature of the bar and the oil bath is given as 600 C and 27C, respectively, and
Length of cylinder = 30 cm
Radius of cylinder = 3 cm
kg
Density of cylinder = 2700 3
m
J
Specific heat of cylinder = 895 kg K
W
Convection heat transfer coefficient = 100
m2 K
J
Specific heat of oil = 1910 kg K
Mass of oil = 2 kg
the coupled ordinary differential equation giving the heat transfer are given by
Oil
Cylinder
d c
(A) 362.4 c b
dt
d
675.5 b b c
dt
d c
(B) 362.4 c b
dt
d b
675.5 b c
dt
d
(C) 675.5 c c b
dt
d
362.4 b b c
dt
d c
(B) 675.5 c b
dt
Solution
The correct answer is (A)
For the cylinder the rate of heat lost due to convection = h A c b .
where
h( ) = the convective cooling coefficient, W/(m2-K) and is a function of temperature
A surface area of the cylinder
The energy stored in the mass is given by
Energy stored by mass = m.C.
where
m = mass of the cylinder, kg
C = specific heat of the cylinder, J/(kg-K)
From an energy balance,
Rate at which heat is gained - Rate at which heat is lost =
= Rate at which heat is stored
gives
d
h A c b mC
dt
where
W
h 100
m2 K
A 2r 2 2rL
2 0.03 2 0.03 0.3
2
0.062204 m 2
m V
2700
kg
r 2 L m 3
m3
2700 0.03 0.3
2
2.2902 kg
Thus
d c
h A c b mC
dt
d c
100 0.062204 c b 2.2902 895
dt
d c
329.517 c b
dt
Similarly for the oil
d b
h A b c mC
dt
d b
100 0.062204 b c 2 1910
dt
d b
614.108 b c
dt