Graphics Programs Reference
In-Depth Information
is moderately stiff and estimate
h
max
, the largest valueof
h
forwhich the Runge-Kutta
methodwouldbestable. (2) Confirmthe estimate by computing
y
(10) with
h
≈
h
max
/
2
and
h
≈
2
h
max
.
y
1
and
y
=
Solution of Part (1)
With the notation
y
=
y
2
the equivalent first-order
differentialequations are
⎡
⎣
⎤
⎦
=−
y
1
y
2
y
2
y
=
19
4
−
y
1
−
10
y
2
where
⎡
⎣
⎤
⎦
0
−
1
=
19
4
10
The eigenvalues of
are givenby
−
λ
−
1
|
−
λ
I
| =
=
0
19
4
10
−
λ
which yields
λ
1
=
1
/
2 and
λ
2
=
19
/
2. Because
λ
2
isquite abitlarger than
λ
1
, the
equations are moderately stiff.
Solution of Part (2)
An estimate for the upper limit of the stable rangeof
h
can be
obtained fromEq. (7.15):
2
λ
max
=
2
19
h
max
=
2
=
0
.
2153
/
Althoughthisformulaisstrictlyvalid forEuler's method, it is usuallynot too far off
for higher-orderintegration formulas.
Here are the results from the Runge-Kuttamethodwith
h
=
.
1 (by specifying
freq = 0
in
printSol
,only the initial and final values were printed):
0
>>
x
y1
y2
0.0000e+000 -9.0000e+000
0.0000e+000
1.0000e+001 -6.4011e-002
3.2005e-002
The analytical solutionis
19
2
e
−
x
/
2
1
2
e
−
19
x
/
2
y
(
x
)
=−
+
yielding
y
(10)
=−
0
.
0640 11, which agrees with the valueobtained numerically.
Search WWH ::
Custom Search