Sie sind auf Seite 1von 13

Multiple-Choice Test

Runge-Kutta 2nd Order Method


Ordinary Differential Equations
COMPLETE SOLUTION SET
1. To solve the ordinary differential equation
dy
3 + xy 2 = sin x, y (0) = 5
dx
by the Runge-Kutta 2nd order method, you need to rewrite the equation as
dy
(A) = sin x − xy 2 , y (0 ) = 5
dx
(B)
dy 1
( )
= sin x − xy 2 , y (0) = 5
dx 3
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).

To solve ordinary differential equations by the Runge-Kutta 2nd order method, you need to
rewrite the equation in the following form
dy
= f (x, y ), y (0) = y 0
dx
Thus,
dy
3 + xy 2 = sin x, y (0) = 5
dx
dy
3 = sin x − xy 2 , y (0) = 5
dx
dy 1
( )
= sin x − xy 2 , y (0) = 5
dx 3
2. Given
dy
3 + 5 y 2 = sin x, y (0.3) = 5
dx
and using a step size of h = 0.3 , the value of y (0.9 ) using the Runge-Kutta 2nd order Heun
method is most nearly
(A) –4297.4
(B) –4936.7
(C) –0.21336 × 1014
(D) –0.24489 × 1014

Solution
The correct answer (A).

dy
3 + 5 y 2 = sin x, y (0.3) = 5
dx
is rewritten as
dy 1
dx 3
( )
= sin x − 5 y 2 = f ( x, y )

1
(
f ( x, y ) = sin x − 5 y 2
3
)
1
In Huen’s method a2 = is chosen, giving
2
1
a1 =
2
p1 = 1
q11 = 1
resulting in
⎛1 1 ⎞
yi +1 = yi + ⎜ k1 + k 2 ⎟h
⎝2 2 ⎠
where
k1 = f ( x i , y i )
k 2 = f (xi + h, yi + k1h )
h = 0 .3

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
k 2 = f ( x0 + h, y 0 + k1h )
= f (0.3 + 0.3,5 + (− 41.5682 × 0.3))
= f (0.6,−7.4704)
1
(
= sin(0.6) − 5(− 7.4704 )
3
2
)
1
= (0.56464 − 279.04 )
3
= −92.824
⎛1 1 ⎞
y1 = y 0 + ⎜ (k1 ) + (k 2 )⎟h
⎝2 2 ⎠
⎛1 1 ⎞
= 5 + ⎜ (− 41.5682) + (− 92.824)⎟0.3
⎝2 2 ⎠
= 5 + (− 67.196) × 0.3
= −15.159
x1 = x0 + h
= 0.3 + 0.3
= 0.6
y (0.6 ) ≈ y1 = −15.159
for i = 1, x1 = 0.6, y1 = −15.159
k1 = f ( x1 , y1 )
= f (0.6,−15.159 )
1
(
= sin (0.6) − 5(− 15.159 )
3
2
)
= −382.80
k 2 = f ( x1 + h, y1 + k1h )
= f (0.6 + 0.3,−15.159 + (− 382.80 × 0.3))
= f (0.9,−130.00)
1
(
= sin(0.9) − 5(− 130.00)
3
2
)
1
= (0.78333 − 84500)
3
= −28166
⎛1 1 ⎞
y 2 = y1 + ⎜ (k1 ) + (k 2 )⎟h
⎝2 2 ⎠
⎛1 1 ⎞
= −15.159 + ⎜ (− 382.80) + (− 28166)⎟0.3
⎝2 2 ⎠
= −15.159 + (− 14274) × 0.3
= −4297.4
x2 = x1 + h
= 0.6 + 0.3
= 0.9
y (0.9 ) ≈ y 2 = −4297.4
3. Given
dy
3 + 5 y = e 0.1x , y (0.3) = 5
dx
dy
and using a step size of h = 0.3 , the best estimate of (0.9) using the Runge-Kutta 2nd order
dx
midpoint method most nearly is
(A) –2.2473
(B) –2.2543
(C) –2.6188
(D) –3.2045

Solution
The correct answer is (C).

dy
3 + 5 y = e 0.1x
dx
is rewritten as
dy 1 0.1x
dx 3
( )
= e − 5 y = f ( x, y )

1
(
f ( x, y ) = e 0.1x − 5 y
3
)
In the midpoint method a 2 = 1 is chosen, giving
a1 = 0
1
p1 =
2
1
q11 =
2
resulting in
y i +1 = y i + k 2 h
where
k1 = f ( x i , y i )
⎛ 1 1 ⎞
k 2 = f ⎜ xi + h, y i + k1 h ⎟
⎝ 2 2 ⎠
h = 0 .3

for i = 0, x0 = 0.3, y0 = 5
k1 = f ( x0 , y 0 )
= f (0.3,5)
1
(
= e 0.1×0.3 − 5 5
3
)
1
= (1.0305 − 11.180)
3
= −3.3833
⎛ 1 1 ⎞
k 2 = f ⎜ x0 + h, y 0 + k1h ⎟
⎝ 2 2 ⎠
⎛ 0.3 1 ⎞
= f ⎜ 0.3 + ,5 + (− 3.3833 × 0.3)⎟
⎝ 2 2 ⎠
= f (0.45,4.4925)

=
3
e(
1 0.1×0.45
− 5 4.4925 )
1
= (1.0460 − 10.598)
3
= −3.1839
y1 = y0 + k 2 h
= 5 + (− 3.1839) × 0.3
= 4.0448
x1 = x0 + h
= 0.3 + 0.3
= 0.6
y (0.6 ) ≈ y1 = −3.1839
for i = 1, x1 = 0.6, y1 = 4.0448
k1 = f ( x1 , y1 )
= f (0.6,4.0448)
1
(
= e 0.1×0.6 − 5 4.0448
3
)
1
= (1.0618 − 10.056)
3
= −2.9980
⎛ 1 1 ⎞
k2 = f ⎜ x1 + h, y1 + k1h ⎟
⎝ 2 2 ⎠
⎛ 0.3 1 ⎞
= f ⎜ 0.6 + ,4.0448 + (− 2.9980 × 0.3)⎟
⎝ 2 2 ⎠
= f (0.75,3.5951)

=
3
(
1 0.075
e − 5 3.5951 )
= −2.8008
y 2 = y1 + k 2 h
= 4.04483 + (− 2.8008) × 0.3
= 3.2046
x2 = x1 + h
= 0.6 + 0.3
= 0.9
y (0.9 ) ≈ y 2 = 3.2046
Thus
dy
(0.9) = f (x, y )
dx x = 0.9

≈ f ( x2 , y2 )
= f (0.9,3.2046)
1
(
= e0.1×0.9 − 5 3.2046
3
)
1
= (1.0942 − 8.9507 )
3
= −2.6188
4. The velocity (m/s) of a body is given as a function of time (seconds) by
v(t ) = 200 ln (1 + t ) − t , t ≥ 0
Using the Runge-Kutta 2nd order Ralston method with a step size of 5 seconds, the distance in
meters traveled by the body from t = 2 to t = 12 seconds is estimated most nearly as
(A) 3904.9
(B) 3939.7
(C) 6556.3
(D) 39397

Solution
The correct answer is (A).

dS
= f (t , S ) = 200 ln (1 + t ) − t , t ≥ 0
dt
2
In the Ralston method a2 = is chosen, giving
3
1
a1 =
3
3
p1 =
4
3
q11 =
4
resulting in
⎛1 2 ⎞
Si +1 = Si + ⎜ k1 + k2 ⎟h
⎝3 3 ⎠
where
k1 = f (t i , S i )
⎛ 3 3 ⎞
k 2 = f ⎜ t i + h, S i + k 1 h ⎟
⎝ 4 4 ⎠
h=5
for i = 0, t0 = 2 s, S0 = 0 m, we are assuming S (2 ) = 0
k1 = f (t0 , S0 )
= f (2,0)
= 200 ln (1 + 2) − 2
= 217.72
⎛ 3 3 ⎞
k2 = f ⎜ t0 + h, S0 + k1h ⎟
⎝ 4 4 ⎠
⎛ 3 3 ⎞
= f ⎜ 2 + × 5,0 + (217.72 )5 ⎟
⎝ 4 4 ⎠
= f (5.75,816.46 )
= 200 ln(1 + 5.75) − (5.75)
= 381.91 − 5.75
= 376.16
⎛1 2 ⎞
S1 = S0 + ⎜ k1 + k2 ⎟h
⎝3 3 ⎠
⎛1 2 ⎞
= 0 + ⎜ (217.72 ) + (376.16 )⎟ × 5
⎝3 3 ⎠
= 1616.7 m
t1 = t 0 + h
= 2+5
=7
S (7 ) ≈ S1 = 1616.7 m
for i = 1, t1 = 7 s, S1 = 1616.7 m
k1 = f (t1 , S1 )
= f (7,1616.7 )
= 200 ln(1 + 7 ) − 7
= 408.89
⎛ 3 3 ⎞
k2 = f ⎜ t1 + h, S1 + k1h ⎟
⎝ 4 4 ⎠
⎛ 3 3 ⎞
= f ⎜ 7 + × 5,1616.7 + (408.89)5 ⎟
⎝ 4 4 ⎠
= f (10.75,3150.1)
= 200 ln (1 + 10.75) − (10.75)
= 492.77 − 10.75
= 482.02
⎛1 2 ⎞
S 2 = S1 + ⎜ k1 + k2 ⎟h
⎝3 3 ⎠
⎛1 2 ⎞
= 1616.7 + ⎜ (408.89 ) + (482.02 )⎟ × 5
⎝3 3 ⎠
=1616.7 + (457.64 ) × 5
= 3904.9 m
t 2 = t1 + h
= 7+5
= 12
S (12 ) ≈ S 2 = 3904.9 m
Hence the distance covered between t = 2 and t = 12 seconds is
d = S (12) − S (2)
≈ S 2 − S0
= 3904.9 − 0
= 3904.9 m
5. The Runge-Kutta 2nd order method can be derived by using the first three terms of the Taylor
series of writing the value of yi +1 (that is the value of y at xi +1 ) in terms of yi (that is the value
of y at xi ) and all the derivatives of y at xi . If h = xi +1 − xi , the explicit expression for yi +1 if
the first three terms of the Taylor series are chosen for solving the ordinary differential equation
dy
+ 5 y = 3e − 2 x , y (0 ) = 7
dx
would be
( )
(A) yi +1 = yi + 3e − 2 xi − 5 yi h + 5
h2
2
( ) (
(B) yi+1 = yi + 3e −2 xi − 5 yi h + − 21e −2 xi + 25yi ) h2
2
( ) ( )
2
h
(C) y i +1 = y i + 3e − 2 xi − 5 y i h + − 6e −2 xi
2
(
(D) y i +1 = y i + 3e ) (
− 2 xi
− 5 y i h + − 6e)− 2 xi
+5
h2
2
Solution
The correct answer is (B).

The first three terms of the Taylor series are as follows


1
yi +1 = yi + f ( xi , yi )h + f ′( xi , yi )h 2
2!
Our ordinary differential equation is rewritten as
dy
+ 5 y = 3e − 2 x , y (0 ) = 7
dx
f ( x, y ) = 3e −2 x − 5 y, y (0) = 7
Now since y is a function of x,
∂f ( x, y ) ∂f ( x, y ) dy
f ′( x, y ) = +
∂x ∂y dx
=

(
∂x
) [(
3e − 2 x − 5 y +

∂y
)]( )
3e − 2 x − 5 y 3e − 2 x − 5 y
−2 x
(
= −6e + (−5) 3e − 5 y −2 x
)
= −21e −2 x + 25 y
The 2nd order formula for the above ordinary differential equation would be
1
y i +1 = y i + f (xi , y i )h + f ′( xi , y i )h 2
2!
( ) ( 1
)
= yi + 3e − 2 xi − 5 yi h + − 21e − 2 xi + 25 yi h 2
2
6. A spherical ball is taken out of a furnace at 1200 K and is allowed to cool in air. You are given
the following

radius of ball = 2 cm
J
specific heat of ball = 420
kg ⋅ K
kg
density of ball = 7800
m3
J
convection coefficient = 350
s ⋅ m2 ⋅ K
ambient temperature = 300 K

The ordinary differential equation that is given for the temperature θ of the ball is

= −2.20673 × 10 −13 (θ 4 − 81 × 10 8 )
dt
if only radiation is accounted for. The ordinary differential equation if convection is accounted
for in addition to radiation is

(A)
dt
( )
= −2.20673 × 10−13 θ 4 − 81 × 108 − 1.6026 × 10− 2 (θ − 300)

(B) = −2.20673 × 10−13 (θ 4 − 81 × 108 ) − 4.3982 × 10− 2 (θ − 300)
dt

(C) = −1.6026 × 10− 2 (θ − 300 )
dt

(D) = −4.3982 × 10 − 2 (θ − 300)
dt
Solution
The correct answer is (A).

The rate of heat loss due to convection


Rate of heat loss due to convection = hA(θ − θ a ) `
where
J
h = convection coefficient = 350
s ⋅ m2 ⋅ K
2
A = surface area of the ball, m
The energy stored by mass is
Energy stored by mass = mCθ
where

m = mass of the ball , kg


J
C = specific heat of the ball,
kg ⋅ K
A = 4πr 2
= 4π × 0.022
= 0.0050265 m 2
m = ρV
⎛4 ⎞
= ρ ⎜ πr 3 ⎟
⎝3 ⎠
⎛4 ⎞
= 7800⎜ π × 0.023 ⎟
⎝3 ⎠
= 0.26138 kg
From the energy balance
(Rate at which heat is gained) – (Rate at which heat is lost) = (Rate at which heat is stored)
we get

mC
dt
( ( ))
= mC − 2.20673 × 10−13 θ 4 − 81 × 108 − hA(θ − θ a )

dθ hA(θ − θ a )
dt
( (
= − 2.20673 × 10−13 θ 4 − 81 × 108 −
mC
))
( (
= − 2.20673 × 10−13 θ 4 − 81 × 108 −
(350)(0.0050265)(θ − 300)
))
0.26138 × 420
−13 4
( 8
)
= −2.20673 × 10 θ − 81 × 10 − 0.016026(θ − 300 )
= −2.20673 × 10 −13
(θ 4
− 81 × 10 ) − 1.6026 × 10 (θ − 300)
8 −2

Das könnte Ihnen auch gefallen