Professional Documents
Culture Documents
ODEjain PDF
ODEjain PDF
0; ie, the error tends to zero as ht -» 0 like Ch? for some constant
C for tx € io, b], We shall now state a resujt which tells us about how the
error €, tends to zero,
THEOREM 2.3 Iff is sufficiently differentiable, €, will satisfy
n= WP B (ta) +0 (hE) (2.11)
where 8 (1) is the solution of the ini value problem
8) = Ale, yO) BO
Let us denote »,, (i) the aie en of y (tn) calculated from (2.6)
with step 4. Then (2.11) can be written as
Yn (It) = y(t) AP 8 (tn) +0 (he) (2.13)
In conclusion, Taylor’s series method has advantages; it is easily derived in
* any order, and values of y (1) for 1 not on the grid are easily obtained, How-
ever, the method suffers from the time consumed in calculating the higher
derivatives.
+ PHN), 8 (to) = 0 (2.12)
2.3 RUNGE-KUTTA METHODS
We first explain the principle involved in the Runge-Kutta methods. By
the Mean-Value Theorem any solution of
L(ts §))s to) = Yor 1 E [oy 6]
satisfies 9" (tuts) = y(ta)-thy’ (En)
Vita) hf (ny ¥ (End)
tt nh OK On
h f
oui = self (tot Fe sot E flim on) @u4)
Alternatively, again using Euler's method, we proceed as follows:
a” (ot b )= $b" (Fy (nea)
7 LLC MAL Unb Seen32 NUMERICAL SOLUTIONS.
and thus we have the approximation
yaa = Yet LLM Altes In FAO Dd (15)
Either (2.14) or (2.15) can be regarded as
Yati = Yah (average slope) (2.16)
This is the underlying idea of the Runge-Kutta approach. In general, we
find the slope at f, and at several other points: average these slopes, multiply
by A, and add the result to yn, Thus the Runge-Kutta method with v slopes
can be written as
Ki = hf lteter, Yok i ayKi)s er = OE = Vy Queers 9 (2.17)
or K, =hf(ta; ya)
Ky = hf (tat eah, yebon Ki)
Ky = hflturbes, yottay Ki tas: Ka)
Kg = hf (tut cqhy Yn aay Ki t@ag Kat aus Ks)
and Ines = Yat a wi Ky
where the parameters c2. C3, +1, Co, 42) +++) @etv_y) aNd wy are arbitrary,
From (2.16), we may interpret the increment function as the linear
combination of the slopes at f, and at several other points between ta and
ta4,..To obtain specific values for the parameters, we expand yn41 in powers
of f such that it agrees with the Taylor series expansion of the solution of
the differential equation to a specified number of terms,
Let us study this approach with just two slopes.
2.3.1 Second Order Methods
Define
Ky = hf(te yn)
Ky = hf(tetberh, yo an Ky)
and Yat, = Yow, Ki pw, Kz (2.18)
where the parameters c>, a1, ; and ware chosen to make y,+, closer to
Hines).
Now Taylor's series gives
2
I oes) = ¥ Ce) bhy" (10+ y(t
(2.19)
where
Sit {fe
Lut Uf firth AL LAG)SINGLESTEP METHODS 33
The values of y' (tn), y" (tn), «+ ate obtained by substituting ¢ = t,. We
expand X, and K, about the point (tn, yn).
Ki=hfe
Ky = hf (tee h, yw ay h fn)
= AE flte, Yn)-Hlez bh fb an hi fr fr
Fy (GIA Sich Den aa fF IE ooo]
= hifurt Heafitayfefe)+
FPG hic Rehr oh Pio
Substituting the values of K, and K in (2.18), we get
Yarn = Yok (re bwadh fob A? (wea fie waar fif)-+
F Wulf Restarhfirb a f3fylt (220)
Comparing (2.19) with (2.20) and matching coefficients of powers of h, we
obtain three equations for the parameters
Wy ti = 1
2 Wy = 1/2
ayy W2 = 1/2
From these equations, we see that if cz is chosen arbitrarily (nonzero), then
1 1
Ay = 62 55 1-5 (2.21)
Using (2.21) in (2.20), we get
2 13
Yast = InN GAGA + fut aft fehodt- (2.22)
Subtracting (2.22) from (2.19), we obtain the local truncation error
Ta = ¥ (tats) —Ynt
=P [(F-B)ter enter in) +t (seths )]e
2
= Hr2—3ea +302 frp] ten
We observe that no choice of the parameter c, will make the leading term
of 7» vanish for all f(t, y). The local truncation error depends not only on
derivatives of the solution y(r) but also on the function f. This is typical of
all the Runge-Kutta methods; in most other methods the truncation error
depends only on certain derivatives of y(t). Generally, cz would be chosen
between 0 and I. From the definition of the Runge-Kutta equations, we see34 NUMERICAL SOLUTIONS
that any Runge-Kutta formula must reduce to a quadrature formula of the
same order or greater for,f(t, 3’) independent of y,, {wy} and fey) being, the
weights and abscissas of such formula. In the present case, cp = 1/2 and
¢z = 1 give the mid-point and the trapezoidal rule of integration for f(t. y)
independent of y. An alternative way of choosing the arbitrary parameters
isto produce zeros among iiy’s, where possible, to simplify the final formula,
The choice of c; = 1/2, for example, makes w, = 0. Sometimes the free
parameters are chosen either to have as large as possible the interval of
absolute stability or to minimize the sum of the absolute values of the
coefficients in the term Ty. Such a choice is called optimal. In the latter case
we define
atty rey.
aren < rp hia O12
We find
\fI g, we obtain a method order of (p+q) which has a finite stability
interval.
2.8 SYSTEMS OF DIFFERENTIAL EQUATIONS
We have already shown that any mth order initial value problem can be
replaced by a system of m first order initial value problems. The system of
n equations in the vector form may be written as
ya Beatynciss (2.90)
¥ (to) = Yo
” FFi Ct Yin Yas vere In)
where y=| 92 | fGy) “lf (te Ys Yar seen Yn)
Ya Sn (ty Yas Yay 00s Yn)
Yio
and r= Ye e
1% Yom o
The singlestep methods developed for a single first order equation can be
directly written for the system (2.90). For example, the general singlestep
method is given by
Yin = yrthO(t, yuh) 2.91)
a PPE Mt 25 i as ty oon Yon te AD
where — DB (try yoy) == | a (tts Yardy Hae ts ovey Yes ty A)
Yar ty h)
$a (th Yu Pare «
2.8.1 Taylor series method
We write
i
a
é ie we
Yin = hy ay PMP T= 0,12, NL (292)
Pa hilu, Yi Yas ty s+ Yost) 7
BP (toy Yate tr Yas te eos Yoo
ae
Ea he Yt Yr te oes You) |
Ge
where = y) =68 NUMERICAL SOLUTIONS
2.8.2 Runge-Kutta methods
The classical fourth order Runge-Kutta formula becomes
1 e-
Yun = wt se (K, +2K2+2K3+Kq) (2.93)
Ku Ky Ky Ky
where = Ky =] Ka |, Kp =] Kaz [Ks =| Kos | Ka =| Kaw
Rut Kee Krs Ka
and Ky = AF Mls Vs ts F2 te e Ye
1 1
Kaa ity (try haw chy Kinde chy Kay man chy Kn )
I 1 1 I
Kiam hy ( ub by rt Kins p Kan vs tn ck Ka)
Kig = hf (ith vy, Kia, Ya, it Kos, oy Yn Keg), f= 12)
In an explicit form (2.93) may be expressed as
Jy iti | te {[{ Ku Ka Ka Ke]
ly !
Yaist |=] Yaa it e4| Ka fr2 +2) Ka [+] Kae | >
i ge ll i} | : =f
Yay 4 dmid UL Ra Kat Lk Ku JJ
Example 2.4 Solve the initial value problem
x=y, x0) =0
y x, M0) = 1,2 € (0, 1]
by second order Runge-Kutta method with h = 0. 1.
Forn=0
to = 0, x0 = 0, y= 1
= lif (toy Xo, Yo) = ACL) = «1
hfs (tor Xo. Jo) = -1(0) = 0
Afi (to+h, Xo+Ki\. Jo+K21) = .L +0) =
hf (to +h, xo Ki, Yor Kar) = 1 (O-.1) = =.01
Ud ea! 1
x = xotog (Kit Kia) = 04 5 GID =
yr =e b (Ky+- Ka) = 14-b 0.01) = 1=.005 = .995
Form =1
clyxy = My = 995
If (ty, Xi, Yr) = 1.995) = 0995
ifs (ty, X01) = A(—.1) =—.01
tbh, Xi: +Kie YA Ka1) = 1 (.995—01)
0985SINGLESTEP METHODS. 69
Ra = Ahh, xt Kis vit Ku)
== 01995
el [=(.14+.0995)]
xe mt (Kut Ku)
= 1 ++ (.0995-+.0985)
= 1990
gi bl pea
yas net (Kart Re)
= 99544 (—.01=.01995)
rt
= .980025,
The exact solution is given by
x(t) = sin t, v1) = cos t
The computed solution is listed in Table 2.5.
TABLE 2.5 Sotuion oF y" = 1,1" ==, x(0) = 0, (0) = I ay THE
SFcOND Orprr RUNGE-Kutra METHOD WITH h = 0.1
a Mb) v(t)
0 1 1
ot ot 0.995 0.099833 0.995005
0.2 0.1990 0.980025 0.198669 0.980067
03 0.296008 0.955225 0.295520 0.955336,
04 0.390950 0.920848 0.389418 0.921061
0.5 0.480185 0.877239 0.479426 0.877583,
06 0.565507 0.824834 0.564642 0.825336
“0.7 0.645163 0.764459 0.644218 0.764842
08 0.718353 0.695822 0.757356 0.696707
09 0.784344 0.620508 0.783327 0.621610
10 0.842473 0.538971 0.841471 0.540302
2.8.3 Stability analysis
The stability of the numerical methods for the system of first order differ-
ential equations is discussed by applying the numerical methods to the
homogeneous locally linearized form of the equation (2.90). Assuming that
a
the functions f, have continuous partial derivatives SH = qi; and A denotes
7]
the »
You might also like