PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility...

45
P P G M - L 97 - 76 T&M /D?? ^^P^tZ PENYELESAIAN PERSAMAAN DEFERENTIAL SECARA NUMER1K DENGAN METODE RUNGE - KUTTA Karsono BADAN TENAGA ATOM NASIONAL. PUSAT PENEUHAIS" TENAGA ATOM GAMA YOGYAKARTA—INDONESIA ; •-,* <y<

Transcript of PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility...

Page 1: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

P P G M - L 97 - 76 T&M /D?? ^^P^tZ

PENYELESAIAN PERSAMAAN DEFERENTIAL

SECARA NUMER1K DENGAN METODE

RUNGE - KUTTA

K a r s o n o

BADAN TENAGA ATOM NASIONAL.

PUSAT PENEUHAIS" TENAGA ATOM GAMA Y O G Y A K A R T A — I N D O N E S I A

; •-,* < y<

Page 2: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

We regret that some of the pages in the microfiche

copy of this report may not be up to the proper

legibility standards, even though the best possible

copy was used for preparing the master fiche.

Page 3: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

H a l l a i n inengenai t e n a g a n u k l i r

Metode Mateniatilc dan Kode Komputer

Peri i i tungan n u k l i r dan t i r u a n

PPGM - L 97 - 76

PENYELESAIAN PERSAMAAN DEFERENSIAL

SECARA NUHERIK DENGAN METODE

RUNGE - KUTTA

Karsono

1976

BADAN TENAGA ATOM NASIONAL

PUSAT PENELITIAN TENAGA ATOM GAMA

J l . B a b a r s a r i , P .O.Box.08, Telp.3661

YOGYAKARTA-INDONESIA

Page 4: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

ABSTRAK

Disajxkan peninjauan secara t e o r i metode Runge-Rutta untruk

mencari penyelesaian. numerik persamaan deferensial l i n i e r , begitu pula

program dengan kalkula tor Hewlett Packard~65 dar i rumus-rumus yang d i -

peroleh. Bi tu l i s pula program subroutine di dalam bahasa Fortran yang

akan dipakai n a r t i b i l a sudah ada komputer.

ABSTRACT

The Runge-Kutta method for solving l inea r d i f f e r en t i a l equa­

t ion i s discussed with appropriate programming using the Hewlett Pac-

kard-65 Calculator. A subroutine programme wri t ten in FORTRAN language

I'B nlra gavan which *«r*i be used when a computer i s available 4f ^ t U ^

Page 5: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

DAFTAR ISI

I . Pendahuluan 1

I I . Penanjauan metoda Eunge-Kutta secara t e o r i t i s 2

A. Metoda Runge-Kutta untuk persamaan d i ferens ia l l i n i e r

orde sa tu 2

B. Metoda Runge-Kutta untuk sistem persamaan d i fe rens ia l

l i n i e r orde satu 11

C. Metoda Punge-Kutta untuk persamaan d i fe rens ia l l i n i e r

orde t ingg i 13

III. Program untuk Hewlett Packard- fS 16

A. Untuk persamaan d i fe rens ia l l i n i e r orde satu 16

B. Untuk persamaan d i fe rens ia l l i n i e r orde dua 28

IV. Program dalam FORTRAN 34

V. Kesimpulan 39

Referensi 40

i i

Page 6: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

I. PENDAHULUAN

Beberapa tahun t e r akh i r i n i kixa ser ing menjumpai penyelesa-

ian persamaan d i fe rens ia l secara numarik. Metode ini. memang memerlukan

banyak seka l i perhitungan dan operasi-operasi hi-tung yang pada umum—

nya s u l i t dikerjakan dengan perhrtrungan tangan biasa .

Akan t e t a p i perkembangan komputer dewasa in i telah sanggup

menghilangkan atau paling t idak meringankan problema di atas tneskipun

studi mendalam tentang anal isa numerik t idak akan bisa dit inggalkan

begi tu saja . Sepert i te lah k i t a ke tahu i , untuk memecahkan persoalan

yang sama kadang-kadang k i t a memiliki lebih dar i satu metoda, sehing-

ga kemampuan memilih metoda yang t epa t akan memberi sumbangan yang

b e r a r t i pada ketepatan jawaban.

Khususnya, untuk mencari penyelesaian pendekatan secara nu­

merik bagi persamaan d i fe rens ia l l i n i e r , t e l ah dikenal metoda Runge-

Kutta. Metoda i n i amat sering digunakan dan t e r d i r i atas berbagai ma-

cam rumus pendekatan yang masing-masing memiliki kelebihan s e r t a ke-

kurangan. Metoda Eunge-Kutta i n i k i t a pe l a j a r i secara t e o r i t i s untuk

kemudian dibuat program dengan kalkulator Hewlett-Packard 65.

1

Page 7: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

I I . PENINJAUAN HETODA RUNGE-KUTTA SECARA TEORITIS

Penyelesalan pendekatan secara numerik ser ing lebih p r ak t i s

dibandingkan netoda a n a l i t i s ataupun metoda in teg ras i berulang, h a s i l

perhitungan te rsebut bisa k i t a sajikan dalam t a b e l .

D i s in i , metoda Bungs-Kutta d ipe la ja r i secara t eo r i untuk

mencari penyelesaian pendekatan persamaan d i fe rens ia l l i n i e r orde sa -

t u , s is t im persamaan d i fe rens ia l dan persamaan d i fe rens ia l l/.nier or-

de t i n g g i . Sudah barang ten tu disamping keuntungan-keuntungannya ada

juga beberapa kekurangan yang per lu diketahui agar k i t a terhindar dar i

kesalahan s e r i u s .

A. Metoda Runge-Kutta untuk persamean d i fe rens ia l orde satu

Dipandang persamaan d i fe rens ia l orde satu ( l i n i e r )

y- (x) = f ( x , y) (1)

dengan syarat awal y(x ) = y

Kita andaikan f (x , y) mempunyai de r iva t i f -de r iva t i f p a r s i i l kontinyu

sampai orde n , pada daerah t e r t e n t u yang diinginkan. In i b e r a r t i bahwa

penyelesaian pendekatan yang k i t a inginkan aken mempunyai der iva t i f -

de r iva t i f p a r s i i l kontinyu sampai dengan orde (n + 1 ) , b i s a

d i t u l i s sebagai

n+1 (x-x )m , •. . y(x) = y(xo) + I - 1 j 4 - y o

i n ) • 0 ( | x - x o r + 1 ) (2) m=1

Dengan menganibil h = x - x cukup k e c i l , k i t a b i sa mengabaikan suku

0( |x - x | ) pada ruas kanan persamaan di atas sehingga pendekatan

kasar yang diperoleh adalah ( x ) _ , ^ y + *~*o (m) ( 3 ) y y o £ . m I o

m=l

Page 8: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

3

Untuk memperoleh k e t e l i t i a n yang k i t a inginkan, kadang-kadang k i t a tak

per lu menghitung seluruh suku di ruas kanan da r i ( 3 ) . Setelah k i t a da-

pa t menghitung harga de r iva t i f -de r iva t i f i t u maka y(x) - y(x ) b i sa

k i t a ke tahui .

Untnk sampai pada ramus pendekatsn Rwge-Kutta k i t a i ku t i

langkah-langkah ber ikut :

(«0

H fir + f f ~ ) ***> Secara umum

dx

Sekarang k i t a definisikan operator

D = | — + f | — f = f(x ,y 1 (6) 8 x o 3 y o o °

Maka , 2 , 3 „ Ay^ = y(x) - y(x ) = hf + ~ Df + g r (D f+ f Df) + o o 2; o: y

H

~ (D3f + f D2f + f2Df + 3Df Df + (7) «+.' y y y

Dianibil kombinasi l i n i e r

P r i y h ) + P r 2 k 2 (h i + + p r r k r ( h ) (8)

dimana para p .konstan, k . (h) = hf(£ . , n . ) dengan (9)

?. = x +a.h , n = y + B k (h) + + B. , k. , (h) 1 0 1 1 O 1 1 I 1 , 1 - 1 1 - 1

a. , 6. . konstanta-konstanta dengan a. = 0 .

Untuk menghitung k . (h) lebih dahulu harus k i t a hitung a. , g. .

Page 9: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

4

Harga h b i sa d i p i l i h sekehendak. .

Jadi k. (h) = hf (x , y ) 1 O3 J o

k (h) = h£U + a h , y + B01k,) £ O •£ O 21 l

k 3 (h) = hf(xQ + a3h, y + n^k + e3 2^2) ( 0)

k (h) = hf(x + a h , y + 6 ,k, + 6 ,k , ) r o r Jo r1 1 r , r-1 r-1

Dengan mengidentikkan (3) dan (8) sampai suku h pangkat t e r t en tu k i t a

dapatkan p . . a. dan 3 . . . r r r i • i i ]

Kita definisikan

4» (h) = y(x + h) - y(x ) - v> , k , (h ) - - p k (h) r J o J o *r1 1 r r r r

yang memenuhi syarat <(> (0) = <j>"(0) = <j> (0) = 0 dan

• £ 8 + , ) * 0 . (11)

Kita p i l i h harga s te rbesar yang masih memenuhi syarat i t u . J ika y(x)

adalah penyelesaian oxak dar i persamaan ( 1 ) , maka s e l i s i h harga (exak)

A y dengan harga pendekatan Ay = p .k.. + p k adalah

hs+Vs+1) u) V fciTT- °*«*h (12)

untuk se t iap langkah pendekatan, ar t inya kesalahan yang t e r j a d i pada

pendekatan di t i t i k x + h.

Adapun syarat (J> (0) = 0 mengharuskan y(x ) = y > sedangkan syarat

(k) ij) (0) = 0 memberikan kesamaan r

Ay ( k ) (0) = p , k j k ) (0 ) + t p k ( k ) ( 0 ) (13) o r r l I r r

Page 10: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

5

Dengan mengingat h = x - x dan k . (h) = hf(E. . n . ) maka o l i * i

k^h) = f(xQ , yQ) , kjn )(h) = 0 n * 2

k.-(h) = f (s . , TI ) + h<* 4 r + Tjr(h) |—) f(g. , T, )

= «5±, v + f> i ! r+ (B i ik i+ 3 i2k2 +

Pertama-tama ambilah r = 1

(14)

• t ( h ) = y(x + h) - y(x ) - P n h f ( x , y ) ( 5)

6j"(h) = y*(xQ + h) - P n f ( x Q , y o ) ( 6)

Bilamana h = 0 maka 6/(0) = y (x ) - p , , f (x ,y )

1 o 11 o " o

Agar dipenuhi 6j*(0) = 0 untuk set iap f (x , y ) , haruslah p . . = 1 . Lebih

jauh lag i 6j"(0) - y" pada umumnya t idak sama nol t Dengan demikian

k i t a telah msndapatkan penyelesaian pendekatan y(x) = y(x ) + hf(x , y ) atau

o o o

y(x) = y + hf(x , y ) (17) •'o p o

Dalam rumus in i kesalahan untuk se t iap langkah pendekatan

h2 R = 5 - y " ( S ) • x * £ * x + h

2

Jadi dalam orde kesalahan h .

Metoda pendekatan i n i dikenal sebagai metoda Euler.

Untuk r = 2

*2(h> = y(xQ + h) - yQ - p ^ k ^ h ) - p 2 2 k 2 (h) (18)

62(h) = f(xQ + h) - p2 lk1 ' (h) - P2 2k^(h)

•2<°> = fo - p 2 1k-(o) - p22k2-(o) = fo - (p 2 1 + p 2 2 ) f o

(19)

Page 11: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

6

*--«,) = [IfflS? + m^\)o - p2lkr(0) - p22kr(0) (20)

Syarat (ji*(0) = 0 dan <|>''(0) = 0 meraberi persamaan

P 2 1 + P 2 2 = 1

2 P22 «2 = 1 (21)

2 p 2 2 fl21 - 1

Sedangkan de r iva t i f * ' 2 ' ( 0 ) J 0 .

Dengan mudah k i t a simpulkan bahwa a. = 8„| .

Bilamana diambil a2

= g21 = 1 * m a* a p22 = p ^i = ^2

sehingga rumus pendekatan yang k i t a peroleh adalah

y(x) « yQ + (k1 + k 2 ) /2 (22)

dimana k, = hf(x ,y ) , k , = hf(x + h/2 ,y + k , / 2 ) . I O O £ O 0 1

Kesalahan untuk se t iap langkah pendekatannya berorder h .

Sekarang, anibilah penyelesaian yang la in dengan mengambil

a2 = e2l = 1 / 2 •

Untuk harga i t u maka p . = 0 dan p 2 2 = 1 sehingga rumus pendekatannya

• 8 a j a d i y(x) * yo + k2 (23)

dengan k, = h£(x ,y ) , k„ = hf(x + h/2 ,y + k , / 2 ) . 1 o o 2 o o I

3 Orde kesalahan untuk se t i ap langkah pendekatan h

Kita masih b i s a mengambil pasangan harga yang l a i n , misalnya

«2 = G21 = 2 / 3 , p - = 1/4 dan p 2 = 3/4 yang menghasi3kan rumus pende­

katan

y(x) = y o + (k1 + 3k 2 ) /4 (24)

Page 12: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

7

dengan k = hf(x 3y ) dan k = hf"(x + 2h/3,y + 2k- / 3 ) .

3 Orde kesalahan untuk se-tiap langkah psndekatan adalah h .

Untuk r = 3

Orde kesalahan pada rumus pendekatan berikut adalah h .

Para a. S. . . dan p . . harus memenuhi

tt2 = B21

tt3 = B31 + 332

P3 1 + P 3 2 + P 33 (25)

P32 a2 + P33 a 3 = 1 / 2

P32 a 2 + P 3 3 °3 = 1 / 3

p„„ B a ~ 1/6 F33 32 2

Tiga persamaan te rakhi r bisa dipandang sebagai persamaan l i n i e r dalam

P 3 2 dan p 3 3 untuk harga-harga a dan a„ yang k i t a p i l i h . Oleh karena

i t u }

"2

2 ''2

0

a 3 "

2 °3

532 a 2

1/2

1/3

1/6

= 0

atau a2 a3 ( a3 - a2 ) - (?32 a2(2 - 3^)

Persamaan terakhir ini ekwivalen dengan

(26)

a 3 ( a 3 " a 2 ) 332 ° 2 ( 2 " 3 a 2 ) = ° (27)

oleh sebab d.K'-l (25) , p 3 3 4 0, a2 4 0 dan B32 4 0.

Page 13: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

8

Dipilih a , a , 8 . , 03. dan 3_2 sedemikian sehingga

a2 = 621

«3 = P31 + *32 ( 2 8 )

a3 ( a3 - a2 } ~ B32 a 2 ( 2 " 3 a 2 ) = °

Kemudian dengan eliminasi pada persamaan

P33 p32 a2 = 1 / 5

P32 a 2 + P 3 3 a 3 = 1 / 2 ( 2 9 )

P31 + P32 + P 33 = 1

k i t a tentukan p 3 1 s p g 2 dan p 3 3 .

Dengan memilih ha rga ou = 6 . = 1/2 dan a- - 1, k i t a p e r o l e h

e 32 ' °» 331 " - 1 ' P33 = 1 / 6 ' P 32 = 2 / 3 d a n P31 = 1 / 6 -

Menghasilkan pendekatan

y ( x ) a y + (k , + 4k„ + k . ) / 6 (30)

dimana k, = h f ( x ,y ) , k„ = h f (x + h / 2 , y + k , / 2 ) dan 1 o " o - 2 o " o 1

k . = h f ( x + h , y +• 2k„ - k . ) . 3 0 0 2 1

Sekarang d iambi l h a r g a a„ = g = 1/3 dan a = 2 / 3 .

K i t a pe ro leh B 3 2 = 2 / 3 , S 3 l = 0 , p 3 3 = 3 / 4 , p 3 2 = 0 dan ? 3 , = 1/4.

Rumus pendekatan yang s e s u a i adalah

y(x) » y + (k1 + 3k3)/4 (31)

dengan k1 = hf(x ,y ) , k = hf(x + h/2, y + kj/3) dan

k_ = h£(x + 2h/3, y + 2k_/3). 3 o o 2

Page 14: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

9

Akhirnya, pemilihan a = 6 . = 1/2 dan a„ = 3 A menghasilkan

B32 = 3/4 , S31 = 0, p 3 3 = if/9, p 3 2 = 173 dan p 3 , = 2 /9 .

Rumus pendekatannya

y (x ) « y + (2k1 + 3k2 + 4k 3 ) /9 (32)

dengan k, = hf(x ,y ) . k„ = hf(x + h/2 ,y + k.,/2) i o o 2 o J o l

k„ = hf(x + 3h/4,y + 3k / 4 ) . « J O O £.

Untuk R = k

Sejalan dengan pembicaraan sebeluiunya untuk harga r - 4 i n i

para a. , S. . , p u . ditentukan da r i syarat :

^ ( 0 ) = * - ' ( o ) = 4 . ' ^ ' (0) = 0.

Dengan sediki t perhitungan k i t a akan sarapai pada rurcus-rumus pendekat-5

a t yang mempunyai kesalahan dar i orde h untuk se t i ap langkah pende­kat an.

Misalkan k i t a p i l i h a2 = 1/2, a3 = 1/2 dan &32 = 1 / 2 .

Dalam hal in i B21 = 1/2, 3 g 1 = 0, c^ = 1 , 6 ^ = 1 ,

\ 2 = °' % = °» P W = 1 / 6 > p 4 3 = 1 / 3 > PU2 = 1 / 3 d a n

PU1 = 1/6-

Oleh karena i t u rumus pendekatannya adalah

y(x) a y + ( k t + 2k2 + 2k3 + k 4 ) / 6 (33)

dengan k. = hf(x ,y ) , k . = hf(x + h / 2 , y + k ^ 2 ) ,

k3 = hf(xQ + h / 2 , y o + k 2 /2) dan k^ = hf(xQ + h , yQ + k 3 ) .

Kalau diattibil a = 1/3 dan a = 2/3, maka 8-1= 1/3,

% = ' • B32 = '» S31 = ~ 1 / 3« 3H3, = '> B»2 =- * U ^ \ ' \\

Page 15: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

10

Pi+i = 1 / 8 , p ^ = 3 /8 , p ^ = 3/8 dan p^ = 1/8: i n i membe-

r i rumus pendekatan

y ( x ) = yQ + (k1 + 31c2 + 3k3 + k 4 V 8 (341

dimanak, = hf(x , y ) , k . = hf(x + n / 3 . y + k , / 3 ) „ 1 o Jo ' 2 o ' J o l

k , = hf(x + 2h /3 , y - k , / 3 + V ) dan O O O I 2

k^ = hf(y.o + h , yQ + k1 - k2 + k 3 ) .

Sedangkan a = 3 . = 1/4 dan a = 1/3 menyebabkan

e32 = 1 / 2 > »31 = ° ' \ = '» S 4 3 = 2 ' P42 = - 2 '

eHl = 1* V = 1 / 5 > P43 = 2 / 3 > P42 = ° d a n PU1 = 1 / 5 -

Rumus pendekatan

y (x ) = y + (k1 + 4k3 + \)/6 (35)

dengan k, = hf(x „y ) , k = hf(x + h/4 ,y + k , /4 ) I O O £ O O I

k3 = hf(xQ + h /2 ,y o + k 2 / 2 ) , k^ = hf(xQ + h,y + k} - 2k2 + kg) .

Sebenarnya. masih mungkin untuk mendapatkan rumus pendekatan

yang la in dengan mengambil harga-harga a„ dan a yang berbeda.

Page 16: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

B. Metoda Bunge-Kutta untuk sist im persamaan d i ferens ia l l i n i e r orde

satu

Berdasarkan h a s i l untuk persamaan d i fe rens ia l l i n i e r orde

satu di muka, k i t a b i s a memakai metoda te rsebut untuk s i s t im persama­

an d i fe rens ia l l i n i e r orde sa tu .

Dipandang s i s t im persamaan

y ' ( x ) = f (x . y , z)

s ' ( x ) = g(x, y s z) (36)

dengan syarat awal : y(x ) = y , z(x ) = z .

Untuk i t u dibentuk fungsi-fungsi

k . (h) = h f ( £ . , n . , O l i l i

t . (h ) = hg(f i3 n.3 £.) (37)

dimana £,. = x + a.h , a, = 0 x o x 1

I. = x + a.h , a, = 0 (38) x o x i

n i s y o + Bn k i + B i2 k2 + + 0x,i- ik i - i

^ i = y o + § i 1 k 1 + § i 2 k 2 + +B i , i -1k i -1

h = Zo + ^ 1 * 1 + Y i 2 t 2 + + *i,1-1*1-1

g i s "0^11*1 +Yi2t2+ +* i , i - lVl

Persoalannya sekarang adalah menentukan konstan-konstan a. „

6. . , Y. .» o. , 3. . j Yn- • 3 P • dan q . sedamikian sehingga fungsi-fungsi

& yQ - ( p r i k i ( h ) + p r 2k 2 ( h ) + • • • • + p r r V h ) ) ( 3 9 )

11

Page 17: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

12

dapat diexpansikan sebagai deret pangkat dalam h dengan pangkat dar i h

sebesar mungkin.

Misalkan, Bunge-Kutia dengan orde kesalahan h mensyaratkan

bahwa fungsi-fungsi

<j>(h) = y (x o ' + h) - y(xQ) - (p kjOO + . . . + p ^ k ^ h ) )

*(h) = z(xQ + h) - Z ( X Q ) - (q^ t^(h) + . . . + q ^ t ^ ( h ) )

(uo)

harms memenuhi

• ' (0) = * " < 0 ) = <J»"'(0) = $ " " ( 0 ) = 0

i|»'(0) = * " ( 0 ) = \J> <0> = $ (0) = 0

Sekali l a g i , sejalan dengsn pembicaraan di muka k i t a b i sa mencocokksn

rumus pendekatan

y(x) = y + Ck. + 2k + 2k„ + k u ) /6 O I l 3 4 < 4 2 j

z(x) = z^ t ( t , + 2t0 + 2t , + t.,)/6 O I £ o 4

damana

k. = hf(x ,y ,z ) i o " o o

t , = hg(x 4y 5z ) i ° o o o

k0 = hf(x + h/2 .y + k , / 2 , z + t - / 2 ) £ O O I O I

t2 = h g ( x o + h / 2 ' y o + k 1 / 2 j Z o + t 1 / 2 )

k, = hf(x + h/2,y + k o / 2 0 z + t_ /2)

t - = hg(x + h/23y + k o /2 0 z + t_ /2) •3 O O <i O £

ku = hf(x o + h > y o + k 3 s Z o + t 3 ) •

t 4 = hg(xo + h , y o + k3 SZo + t 3 )

Page 18: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

Hasil tersebut b i sa k i t a generalisasikan untuk sistiir. per

caan d i fe rens ia l l i n i e r dengan n buah perubah t ak bebas

y£(x) = f ^ x . y j , y2, . . . . yR) i = 1 , 2 , , n (•<

dengan syarat awal y . (x ) = y. •

Penyelesaian pendekatannya adalah :

y . (x ) e y . + (k . + 2k-. + 2k_. + k u J / 6 (L" ) i zo x 2a 3x *ti

dimana

k 1 i = h f i ( x o ' y 1 ( x o ) ' y 2 ( x o ) » y n ( x o ) }

k 2 i = h f i (x Q + h / 2 , y ] ( x o ) + k n / 2 , . . . , yn(xQ) + k 1 n / j

k 3 i = h f i ( x o + ^^y^V + k21 / 2> " • • ' y n( x o } + k 2 n 7 >

\i = h f i ( x o + h »y i ( x0

) + k3l > •••• > V V * + k 3n )

C. Metoda Runge-Kutta untuk persamaan d i fe rens ia l l i n i e r orde -tino'.:

Persamaan d i fe rens ia l orde t ingg i b isa k i t a ubah menjcM

s is t im persamaan d i fe rens ia l orde s a t u , oleh karena i t u ruffus per

katan (44) dapat digunakan di s i n i .

Sebagai contoh persamaan d i fe rens ia l l i n i e r orde dua di bawah i n i :

y " ( x ) = f (x ,y ,yO ( ')

dengan syarat awal y(x ) = y , y ' ( x ) = y" .

Lebih dalmlu persamaan te rsebut diubah menjadi s i s t im persamaan

y ' (x ) = z(x)

z'(x) = f(x, y, z) ("•)

Sedang syarat awalnya menjadi y(x ) = y , z(x ) = y^ .

Sejalan dengan pembicaraan di muka untuk orde kesalahan h ( set? -7

langkah pendekatan ) , akan diperoleh hubungan sebagai berikut :

Page 19: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

V*

«2 = B21 = Y21 ; a2 = P2J = 9 2 1

a 3 = B31 + 832 = Y31 + Y32 < *3 = h\ + h'2 = ^31 + ^32

P 3 ! + p32 + P33 = 1 ' %\ + %2 + q33 = '

P32a2 + P33a3 = 1 / 2 ; q32 «2 + *33 °3 = 1 / 2 ( 4 7 )

P32a2 + P33 a3 = 1 / 3 ' %2 °2 + *33 °3 = 1 /3

P33 P32 a2 = 1 / 5

!*.= a2

632 .

Y32

r 933 *32 a2 = 1 / 6

= ?32_

^32

Menggunaksn (47) i n i 3 k i t a perolah

A y o = h y ; + { (P3 2Y2 ]+P33Y3 1) f0 +

Pa3Y32 f (xo + » 2 h * o + *21 hK< + *21 h f o ^ ' ( 4 8 1

A 2o = q31 *1 + «32*2 + ^ 3 * 3 ^™*

t . = hf 1 o

t 2 = hf(xo + 5 2h 5y o + B21 h y ; , y ; + Y 2 1 hfQ)

t 3 = hf(x o + S3h,yo + B3 hy; + B 3 2 Y 2 1 h2fQ ,y^ t Y31hfQ +

Y 3 2h f ( x o + S 2 h ^ o + «21 hK>K + Y21

h f0 >

Untuk iBudahnya diambil P32Y21 + P33Y31 = 0 (49)

dan kemudian digunakan persamaan kedua dan keempat dar i (47)untuk men-

dapatkan P33Y32 = 1 / 2 .

Syarat-syarat i n i dipenuhi b i l a diambil a. = a . , B. . = B. . = Y.. - Y.. J r l i 13 i ] 13 i ]

Page 20: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

15

Sehingga c2 = a2 = ^ = B21 - y^ = y^ = 1/3

a3 = S3 = 832 = l32 = Y32 = *32 = 2/3 (50)

B31 = f31 = Y31 = *31 = °

»33 = 133 = 3 / U ; P32 = q32 = ° 5 * 3 1 = q31 = 1 ^ 14.

Sekarang k i t a saispai pada rumus pendekatan dengan orde kesalahan h

y(x) = y + b y ' + hk./2

y ' (x ) « y'Q + kQ/U + 3k2/4 (51)

dimana k = hf 0 o

k1 = hf(x + h/3,y + hy^/3 sy^ + k /3)

k_ = hf(x + 2h/3,y + 2hy ' /3 + 2hk / 9 , y ' + 2k,/3) 2 o " o ' o 0 0 1

Untuk persamaan d i fe rens ia l yang sama, k i t a b isa juga nancari penyele-

saian pendekatan yang la in sebagai ber ikut :

y(x) « y^ + h y ' + ( h / 6 ) ( t . + t „ + t _ )

y ' ( x ) » y^ + ( t 1 + 2 t 2 + 2 t 3 + t ^ ) / 6 (52)

dimana t. = hf(x ,y ,y") 1 o o Jo

t 2 = hf(xQ + h/2,yQ + hyV2,y^ + t , / 2 )

t g = hf(xQ + h/2,yQ + hy^/2, + h ^ / 4 ^ + tg /2 )

t l t B h f ( x o + h a y o + h y ; + h t 2 / 2 , y ; + t 3 )

5 Untuk se t iap langkah pendekatan, orde kesalahan adalah h .

Untuk persamaan d i fe rens ia l orde yang lebih t i n g g i , penyele-

saian pendekatannya diperoleh dengan cara yang sama, y s i t u dengan me-

ngubah te r leb ih dahulu menjadi sistiro persamaan d i fe rens ia l kemudian

digunakan penyelesaian dar i s i s t en i n i .

Page 21: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

I I I . PROGRAM UNTUK HP-65

Dalam bab i n i d i s a j i k a n program {untuk HP-65) d a r i masing

masing rumus pendekatan yang t e l a h d i p e r o l e h pada bab sebelumnya.

A. untulc persamaan d i f e r e n s i a l l i n i e r orde s a t u

PROGRAM RK-1.3.1

y(xQ + h ) = yQ + <k1 + k 2 ) / 2 ; y(x o> = y Q

ditnana k, = h f ( x ,y ) , k = h f ( x + h / 2 , y + k . , / 2 ) . I o Jo 2 o " o 1

Program :

LBL

A

STO

+

1

RTN

LBL

B

STO 2

RTN

LBL

C

STO 3

RTN

LBL

E

D

2

'

RCL 2

+

STO 2

RCI. 3

2

:

A

D

2

:

RCL 2

+

STO 2

RCL 3

2

Ins t ruks i :

I . Sispkan k a l k u l a t o r pada W/

PRGM, masukkan program i t u .

I I . Pindahkan W/PRGM ke RUN s e t e -

l a h sebelufflnya memasukkan

LBL D untuk h f ( x , y ) .

I I I . Pejet lah

x > A) y , B, h , C yang meru-

pakan input.

P e j e t E memberi y ( x + h)

pada penampil k a l k u l a t o r .

Catatan x » Pv, = y , Ro = h .

16

Page 22: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

17

PROGRAM RK-1.3.2

y ( x + h ) = y + k,. • y {x ) = y

dinana k . = hfCx ,y ) , k_ = h f ( x + h / 2 , y + k,/2">. i o " o 2 o , J o 1

Program :

! LBL ! i ! A I

! STO

+

1

RTN

LBL

B

STO 2

RTN

LBL

C

STO 3

RTN

LBL

E

RCL 2

STO 4

D

2

RCL 2

STO

RCL

2

A

D

RCL

+

STO

RCL

2

A

' RCL

RTN

2

3

4

2

3

2

I n s t r u k s l :

I . Siapkan kalkulalror pada W/PRGtf,

masukkan program i t u .

I I . Buat lah LBL D untuk h f ( x , y )

kemudian pindahkan W/PRGM ke

RUN.

I I I . Peje-t lah :

x ,A, y , B, h , C yang meru-

paksn input.

P e j e t l a h E untuk mendapatkan

h a r g a y ( x + h) pada penampi l .

P e j e t l a h E l a g i b i l a ing in

h a r g a y (x + 2h) , d s t .

Cata tan

B i l a d i i ng inkan harga h b i s a d i g a n t i

dengan h ' dengsn j a l a n tnemasukkan h '

kemudian memejet C.

R, = X , R = y , E, = h .

Page 23: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

18

PROGRAM RK-1 .4-.1

yCx + h ) = y + (k . + 4k + k ) / 6 , y ( x ) = y o o ' ^ o o c

d i a a n a k = h f ( x ^ , y ^ ) , k = hf (x^ + h / 2 , y _ + k , / 2 ) , o " o

k . = h f ( x + h , y + 2k„ - k , ) , 3 O o 2. I

Program :

LBL

A

STO

+

1

RTN

LBL

B

STO

+

2

RTN

LBL

C

STO 3

RTN

LBL

E

D

STO 5

RCL 3

2

i : 1

A

RCL 5

2

;

B

D

STO 6

RCL 3

2

:

A

RCL 5

3

X

2

:

CHS

B

RCL 6

i

2

X

B

D

7

ENTER

RCL 5

X

+

8

ENTER

RCL 6

X

-

6

:

B

RCL 2

RTN

I n s t r u k s i :

I . Siapkan k a l k u l a t o r

pada W/PRGM, masuk-

kan program t e r s e -

t>ut.

I I . Buatlah LBL D un-

tuk h f ( x , y ) . , pindsh-

kan W/PRGM ke RUN.

I I I . P e j e t l a h :

X Q , A, y Q , B , h , C

yang merupakan

•input.

P e j e t l a h E sebonyak

n k a l i uirtuk mempe-

r o l e h y(x + iih) . o

harga i n i nampak pa

da penampi l .

Cata tan

R1 = x ' R2 = y » R3 =

Page 24: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

PRGOGRAM RK-1.4.2

y ( x + h ) = y + (k, + 3 k _ ) / 4 i v ( x ) = y O O ' 0 * " O C

dimana k . = hf (x ,y ) k„ = h f ( x + h / 2 , y + v / 3 ) dan 2 a o 1

k = h f (x + 2 h / 3 , y + 2k / 3 ) ,

Program

" — LBL

A

STO

+

1

RTN

LBL

B

STO

RTN

LBL

C

STO

RTN

LBL

E

RCL

STO

D

STO

3

j

2

3

2

4

5

RCL 2

+

STO 2

RCL 3

2

A

D

2

x

3

4

RCL 4

t

STO 2

RCL 3

"6

D

3

X

RCL

+

4

5

RCL

+

STO

RCL

3

:

A

RCL

RTN

1

5

4

2

3

2

Tns t ruks i :

I . Siapkan k a l k u l a t o r

pada W/PRGM, masukkan

program t e r s e b u t .

I I . Buat lah LBL D untuk

h f ( x , y ) kemudian p i n -

dahkan W/PRGM ke RUN,

I I I . P e j e t l a h :

*•> As y Q , B, h s C

yang merupakan input,

P e j e t l a h E untuk men-

dapatkan harga y(xQ+h)

pada penawpi l j d s t .

Cata tan

Sama dengan c a t a t a n pada

PROGRAM RK-1.3.2

R1 = x , R2 = y , R3 = h .

Page 25: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

20

PROGRAM RK-1.4.3

v (x + h ) = y + (2k, + 3k„ + U V V 9 o o 1 2 3

y(x ) = y J o •'o

dimana k , = h f ( x ,y 1 , k„ = h f ( x + h / 2 , y + k , / 2 ) dan I O O 2. 0 O 1

k - = h f ( x + 3h /4 ,y + 3k 0 /M) . d o O A

Program :

LBL

A

STO

+

1

RTN

LBL

B

STO 2

RTN

LBL

C

STO 3

RTN

LBL

E

RCL 2

STO 4

D

STO 5

2

:

RCL 2

+

STO 2

RCL 3

2

A

D

STO 6

3

X

4

RCL 4

+

STO 2

RCL 3

4

A

D

4

X

3

ENTER

RCL 6

X

+

2

ENTER

P.CL 5

X

+

0

:

RCL 4

+

STO 2

RCL 3

4

'•

A

RCL 2

RTN

Page 26: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

21

Ins t ruksl :

I . Siapkan kalkulator pada V/PRGM,. tnasukkan program t e r s ebu t .

I I . Buatlah LBL D w t u k hf(x,y) kemudian pindahkan V/VRGVi ke RUN,

I I I . Pejetlah :

x , A ,y , B, h . C yang merupakan. input.

Pejetlah E sebanyak n ka l i untuk mendapatkan harga y(x + n h ) ,

harga i n i nampak pada penampil dar i ka lku la tor . «

Catatan

Bila k i t a ingin merubah harga h dengan h^ k i t a t ingga l memasukkan h"

i n i kemudian d i iku t i dengan metnejet C.

Jelasnya demikian.

Setelah k i t a mengerjakan ins t ruks i I dan I I kemudian memejet x , A

y , B, h , C se r t a memejet tombol E sebanyak n k a l i , maka angka pada

penampil adalah harga y(x + nh) ; apabila ketnudian k i t a mengikuti

langkah tersebut dengan memejet h ' , C se r t a E sebanyak a k a l i akan

muncul angka penampil sebagai harga yCx + nh + mh') .

Page 27: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

22

PROGRAM RK-1.5.1

y (x Q + h) = y Q + (k1 + 2k2 + 2k3 + k ^ / 6

y(x ) = y

dimana k, = hf(x ,y ) s k„ = hf(x + h/2,y + k,/2) , I c J o * 2 o o •

k . = h f (x + W 2 , y + k / 2 ) dan k. = h f ( x + h s y + k j . 3 o " o 2 "4 o o 3

Progran :

LBL

A

STO

+

1

RTW

L3L

B

STO 2

RTN

LBL

C

STO 3

RTN

LBL

E

RCL 2

STO H

D

STO 5

2

:

RCL k

+

STO 2

RCL 3

2

A

D

STO 6

2

RCL 4

+

STO 2

D

STQ 7 I

RCL 4

+

STO 2

RCL 3

2

A

D

2

ENTER

RCL 7

X

+

2

ENTER

RCL 6

X

+

RCL 5

+

6

.-

RCL 4

+

STO 2

RCL 2

RTN

Page 28: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

23

Instruksi :

I . Siapkan kalkulator pada W/PRGM, masukkan program te r sebu t .

I I . Euatlah LBL B untuk hf(>:.,y) keinudian pindahkan W/PRGM ke KUN.

I I I . Pejet lah :

x 4 A,y , B,, h , C yang merupakan input.

Pejetlah S sebanyak n k a l i untuk raendaDatkan harga y(x + nil),, o

ini nampak pada penampil.

Catatan

Sama dengan catatan pada PROGRAM RK-1.4.3.

R1 = x , Rj = y» R3 = h.

Page 29: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

24

PROGRAM R K - 1 . 5 . 2

y(XQ + h) = y + (lc1 + 3k,, + 3k3 + k ^ / 8

v < 0 = y

dimana k . = h f ( x , y J . k_ = h f (x + h / 3 Ay + v / 3 ) , I O O £. C " 0 1

kg = l i f (x + 2h /3 ,y Q - k j / 3 + k 2 ) dan

*4 * I * * » , + h 5 y o + k , - k 2 + k g ) .

Program :

IflL

A

STO

+

1

FTN

LBL

C

KCL 2

STO 4

B

STO 5

3

RCL 2

+

STO 2

RCL 3

A

B

STO 6

RCL **•

+

RCL 5

ENTER

3

:

-

STO 2

RCL 3

A

B

STO 7

FCL 6

-

RCL 5

i +

RCL

+

STO

RCL

A

B

3

4

2

3

ENTER

RCL

X

+

3

7

ENTER

FCL

X

+

PCL

6

5

4.

8

RCL

T

STO

RCL

KTN

4

2

2

t

Page 30: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

25

Instruksi :

I . Siapkan kalkula tor pada W/PRGM, raasukkan program tersebut .

I I . Buatlah LBL B untuk hf(x,y) dengan roenglngat bahwa pada storage

register 3 (R3) b e r i s i harga h / 3 .

Kemudian pindahkan da r i W/PFGM ke RUN,

I I I . Pejet lah :

x o , A , y , S T C 2 , h , ENTEF, 3 , : , STO 3 yang merupakan input.

Pejet lah C sebanyak n ka l i untuk mendapatkan harga y(x + n h ) ,

harga i n i nampak pada penstnpil.

Catatan

Bi la k i t a ingin mengubah harga h dengan h ' maka pe j e t l a j n % ENTER,

3 . := STD 3 .

Jelasnya dercikian.

Untuk raendapatkan harga y(x + nh + mh') k i t a havus mengerjakan I , I I ,

iremejet : x , A. y , STO 2 , h , ENTER, 3 , : , STO 3, memejet c sebanyak

n k a l i kemudian memejet : h ' , ENTER, 3 : , STO 3 dan akhimya c lagi

sebanyak m k a l i .

R1 = x > R2 = y , * 3 = h .

Page 31: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

2G

PROGRAM WC-1.5.3

y ( x + h ) = y + (k + 4k„ + k. ) / 6

y ( x o ) = y o

diraana k = h f ( x ,v ) » K - ^ f ( x + h / 4 , y + k . / U ) , 1 0 0 « ° o 1

k = h f ( x + h / 2 , v + k o / 2 d s n k = h f ( x + h ,y + k . o o " o ^ 4 o o 1

Program :

2k2 + k3 )

LBL

A

STO

+

1

RTN

LBL

r

RCL 2

STO 4

B

STO 5

4

:

RCL 4

+

STO 2

RCL 3

A

B

STO 6

2

:

RCL 4

+ j

STO 2

RCL 3

A

3

STO 7

PCL 4

+

RCL 5

+

2

ENTER

RCL 6

X

-

STO 2

P.CL 3

2

X

A

B

4

ENTER

RCL 7

X

+

RCL 5

+

6

:

RCL 4

+

STO 2

| ECL 2

RTN

Page 32: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

27

Instruksi t

I . Siapkan kalkula tor pada W/PP.GMS masukkan program te rsebut .

I I . Buatlah LBL B untuk hf(x,y) dengan mengingat bahwa storage re­

gister- 3 (R_) b e r i s i harga h /4 .

Keraudian pindahkan W/PRGM ke RUN.

I I I . Pejetlah r

x , A , y , STO 2 , h , ENTER}4,: .STO 3 yang merupakan input.

Pejetlali C sebanyak n k a l i untuk mendapatkan harga y(x + n h ) ,

harga i n i nampak pada penampil.

Catataii

Sania dengan catatan pada PROGRAM RK-1.5.2.

Page 33: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

B. Itatuk persamaan d i f e r e n s i a l l i n i e r orde dua

D i s i n i persaraasn d i f e r e n s i a l n y a berbentuk :

y " (x) = f ( x , y , y - )

dengan s y s r a t awal : y(x o> = yQ a y ' ( x ) = y* .

PROGRAM BK-2.4.1

y ( x + h ) = y + h y ' + ( / 2 ) o o o

hk,

y " (x + h ) = y' + ( 1 / 4 ) ic + ( 3 / 4 ) v O 0 O 2

dimana k = h f C x ^ y ^ y J )

k . = h f U + h / 3 , y „ + h y V 3 , y * + k / 3 ) 1 o o o " o o

k2 = hf(xQ + 2h/3,yQ + (2/3hy^ + (2/9)hko>y^ + 2k,

Program :

LBL

B

RCL 2

STO 5

A

STO 7

3

RCL 3

STO 6

+

STO 3

RCL 6

RCL 4

X

STO

+

2

RCL 4

STO

+

1

A

STO 8

2

X

3

:

RCL 6

+

STO 3

RCL 4

RCL 7

X

2

X

3

:

RCL 4

RCL 6

X

+

STO

+

2

RCL 4

STO

+

1

A

3

X

RCL 7

+

4

:

RCL 6

+

STO 3

R/S

RCL ^

STO

+

1

RCL 8

2

:

PCL 6

+

RCL 4

X

3

X

RCL 5

+

STO 2

RTN

Page 34: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

29

Instruksi :

I . Siapkan k a l k u l a t o r pada W/PRGM, masukkan program t e r s e b u t ,

I I . Buat lah LBL A untuk h f ( x , y , y * ) dengan neng inga t hahva. storage

register R1 untuk x , R_ untuk y . R^ trntuk y % R untuk h / 3 ; k e -

mudian pindahkan ke RUN.

III. Pejetlah :

x } STO 1 , y , STO 2 , y * . STO 3 , h „ OTTER, 3 , : , STO U-t yang me-

rupakan input.

B i l a d i p e j e t B akan muncul pada penampil ha rga y '6 i + h) kemudi-

an dengan memajet R/S akan b i s a d i l i h a t h a r g a d a r i y ( x + b ) .

B i l a k i t a inginkan ha rga y ' ( x t nh) dan y(x + nh) maka s e t e l a h

input dimasukkan k i t a p e j e t pasangan tombol B dan R/S sebanyak n

k a l i dengan u ru tan : B,R/S,B ,R /S ,

R1 = x , R2 = y , R3 = y ' s R^ = h /3

Sekedar memberikan gambaran bagaimana menggunakan program

t e r s e b u t , b e r i k u t i n i kami kemukakan contoh persamaan d i f e r e n s i a l l i -

n i e r orde s a t u :

y ' ( x ) = s i n x ; y ( 0 ) = -1

K i t a gunakan program RK-1.5.1 sebaga i b e r i k u t :

Page 35: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

30

Kalkulator k i t a siopkan pada W/PRGM.

Kita pejet tombol f PRGM dan k i t a masukkan program RK-1.5.1.

Kenudian k i t a Ireruskan dengan membuat l abe l D sebagai ber ikut :

LBL

D

S

DEG.

RCL 1

f

SIN

RCL 3

x

180

g

7T

X

KTN

Setelah i t u , k i t a pindah W/PRGM ke RUN.

. Kita masukkan 0 , peje t As k i t a masukkan (pejet angka) 1, pejet

CHS (bera r t i k i t a masukkan harga - 1 ) , pejet B. pe je t 5 ( be ra r t i

k i t a masukkan harga h = 5 ) , pejet C, kemudian k i t a pejet E seba-

nyak 38 k a l i misalnyas dengan mencatat angka pada penampil set iap

ka l i k i t a memejet E. Hasilnya sebagai berikut :

Page 36: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

x (derajat) y

5

10

15

20

25

30

35

40

45

50

55

60

55

70

75

80

85

90

95

1 0 0

105

110

-0 .99619

-0 .9848

-0.96593

-0 .93969

-0 .90631

-0.8P603

-0 .81915

-0 .76604

- 0 . 7 0 7 1 1

-0.64279

-0 .57358

-0.50000

-0.42252

-0.34202

-0.25882

-0.17365

-0.087156

+0.000000

0.087156

0.17365

0.25882

0.34202

x (darajat) y

115

120

125

130

135

140

145

150

155

160

165

170

175

180

185

190

0.42262

0.50000

0.57358

0.64279

0.70711

0.76604

0.81915

0.86603

0.90631

0.93969

0.96593

0.98481

0.99619

1.00000

0.99619

0.98481

Page 37: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

32

Sekarang k i t a akan rnenibandingkan h a s i l yang diperoleh dengan

menggunakan £K-1 .3J { SK-1-4-1 <len BK-1.5.1 imtuk perssnaen.

y~(x} ^ y . y(o) = 1

x Pk-1.3.1 BK-1.4.1 Fk-1.5.1 « x (#)

0

0 . 1

0 . 2

0 . 3

0 . 4

0 . 5

0 . 6

0 . 7

0 . 8

0 . 9

1 .0

2 . 0

3 . 0

4 . 0

5 . 0

6 . 0

7 . 0

8 .0

9 . 0

10

1.00000000

1.05000000

1.22102500

1.31+923262

1.49090205

1.64744677

1.82042868

2,01157369

2.22278892

2.45618176

2.71408084

6.78520212

16.9630653

42.4075132

106.018783

265.046958

662.617395

1656.54343

4141.35872

10353.3758

2,0000000

1,1051667

1.2213934

1.3498432

1.4918017

1.6486896

1.8220767

2.0136985

2.2254724

2.4595180

2.7181773

7.2484727

19.329261

51.544695

137.45252

366.540O5

977.44014

2606.5070

6950.6854

18535.161

1.0000000

1.1051708

1.2214026

1.3498585

1.4918242

1.6487206

1.8221180

2.0137516

2.2255400

2.4596014

2.7182798

7.3620076

19.938771

54.000837

146.25227

396.09989

1072.7705

2905.4202

7868.8464

21311,459

1.000O000

1.1051709

1.2214028

1.3498588

1.4918247

1.6487213

1.8221188

2.0137527

2.2255409

2.4596031

2.7182818

7.3890561

20.085337

54.598150

148.41316

403.42879

1096.6332

2980.9580

8103.0839

22026.466

Page 38: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

33

£ A F i r s t Course in Numerical Analysis - Anthony Ralston , HJm. 207.

Oari x=0 s . d . x=1 fc=0.1 ; sedang da r i x=l s . d . x=10 h=t>

Perlu di ingat bahwa program dengan HP-65 t idak boleh lebih

atari 100 langkah termasuk di s i n i langkah pada label untuk harga nf (x , 2

y) atau h f(x,y) (pada contoh RK-1.5.1 di muka LBL D). Oleh karena i t u

program-program di muka b i sa digunekan asalkan langkah program t o t a l -

nya t idak raelampaui 100 langkah.

Juga, sebelttm program dimasukkan seyogyanya k i t a memejet da-

hulu f PRGM j sudah barang tentu setelah kalkulator disiapkan pada W/

PRGM9 agar t idak t e r j a d i kesalahan karena t e l ah t e r i s i n y a storage re­

gister dengan program yang l a in .

Program untuk penyelesaian persamaan d i fe rens ia l l i n i e r or -

de dua yang lain> juga untuk sis t im persamaan d i ferens ia l l i n i e r belum

b i s a kami buat dengan p r a k t i s . Hal i n i karena terbatasnya langkah yang

disediakan kalkulator i t u . Perhitungan perbandingan waktu hitung t idak

b i sa dilakukan juga, meskipun k i t a t e t ap b i sa membandingkan cacah ope-

r a s i hitung yang diperlukan oleh se t iap rumus pendekatan metoda Runge-

Kutta i n i ,

Program untuk se t i ap rumus pendekatan di muka memang t idak

tunggal dalam a r t i masih b i sa dibuat model program yang berbeda dalam

rumus pendekatan yang sama.

Page 39: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

IV. Program dalam FORTRAN

Berikut i n i diberikan program dengan bahasa FOPTPJW dar i me-

toda Pictge-Kutta :

- untuk persamaan d i fe rens ia l l i n i e r orde se.tu y"(x) = f(x.y^ , y(x ~)~

y berdasarkan psda penyelesaian pendekatan

y(x„ + h> = 7 + (k. + 21c, + 2k., + k . l / B O O I i. J 4

dir.ana k, = hf(x .y ) - k = hf(x + h/2,y + k , ^ 1 o • Jo " 2 o o '

k = hf(x + h/23y + k /2^ dan k„ = hf(x + h .y n + k_) . 3 o o 2 4 o 0 3

- untuk sist im nersEonaan d i fe rens ia l orde sa tu yT(x^ = £ . (x . . , . . , y )

y , (x 1 = y. i berdasarkan pada penyelesaian pendekatsn

y . (x + M = y . + ( k , . + 2k0 . + 2k. . + k u . V 5 i i o l i 2 x 3 i 4 i

diniana Ni = h f i ( V y 1 ( V* ' ^ V ^ k 2 i = h f . ( x c + h / 2 , y i ( x o t + k n / 2 , . . . . , y n (x o ) t k 1 n / 2 )

k 3 i = h f i ( X o + h / 2 , y i ( x ^ + k 2 , / 2 j . . . . s yn(xo> + k 2 n / 2 )

k„. = hf. (x + h y . (x } + L . , y (x ") + k,, ) 4i l o J1 o 31 - - ' n o 3n

Program untuk kedua penyelesaian pendekatan tersebut k i t a jadikan

subroutine yang skan b i sa dipakai nant i b i l a komputer sudah k i t a

m i l i k i . Perlu kami kemukakan juga bahwa program i n i belun pernah ka-

mi coba dengan komputer karena kesem'patan untuk i t u belum kami per-

oleh.

Program untuk penyelesaian pendekatan yang lainnya akan mi-

r ip dengsn program di a tas (logika programnya) sehingga kami sengaja

t idak menibuatnya.

34

Page 40: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

Flow Chart : SUBROUTINE RUNGEKUTTA (XI ..YI tEX,HfF..RK)

r ^

' mulailah dengan i i VARX = XI , VARY = YI '

.1 i hrtung AKl = F

i — _

VARX = VAPX + H/2 VARY = YI + AKl/2

f ~

, - ! _ _ ; hitung A .K2 = F

L. .... . . . . . . i VARY = YI + AK2/2

k

i

. 1

i i l i

A

' hitune AK3 = F

i VARX = VARX + H/2 VARY = YI + AK3

-Nil

| ! gmbillah YI = RK J i i dan XI = VARX > 1 i p 1

h i t u n g AK4 = F

.>!/_ i h i t u n g PK = YI + j (AK1 + 2AK2 + 2AK3 + AK*0/6

Page 41: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

35

SUBROUTINE RUNGEKUTTA (XIJ l ,EX.H ,FSRK)

108(0 VARX = XI

VARY = YI

~.K1 = F

VARX = VARX + H/2,

VARY = YI + AK1/2.

AK2 = F

VARY = YI + AK2/2.

AK3 = F

VAPX = VAF.X + H/2,

VARY = YI + AK3

AK4 = F

PK = YI + (AK1 + 2, ... AK2 + 2, ft AK3 + KM)/5.

IF (VARX - EX) 1001,10^2;1002

1001 XI = VARX

YI = F.K

GO TO 1000

1002 RETURN

END

Keterangan

Dalam program utana k i t a tentukan XI = harga x awalj YI =

harga y awals Ex = harga absis x dimana ordinat y yang sesuai dengan-

nya yang k i t a inginkan, H = harga sub i n t e r v a l (h) yang' k i t a p i l i h

dan F = hf(x,y) dengan catatan untuk variabel-variabelnya : VARX = x ;

VARY = y dan H = h.

Contoh, F = H .,. ( VARX ... ,,. 2 + VARY ) b i l a f(x.y) = x2 + y.

Page 42: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

37

SUBROUTINE RUNGEKUTTA ST (X ..Y,EX,H ,F,M1

DIMENSION Y(N) , VARY(U) -F(N> ,AKlCO ,AK2(N) ,AK3(N) ^AK^d-f)

6 VARX = X

DO 1 1=1 ,N

1 VARY(I) = Y(T)

DO 2 J=1.N

AK1(J) = F ( J )

2 VARY(J) = Y(J) + AKl ( J ) /2 .

VARX = VARX + H/2.

DO 3 K=1,W

AK2(K> = F(K)

3 VARY(K) = Y(K) + AK2(K)/2,

DO H L=1,N

AK3(L) = F(L)

"+ VARY (Li = Y(L) + AK3(L)

' VARX = VARX + H/2.

DO 5 M=1,N

AK4(M) = F(M)

5 Y(M) = Y(M"> + (AK1(M) + 2.*AK2(M) + 2.*AK3(M) + AK4(M))/6.

IF (VARX - EX) 6,7S7

6 X = VARX

GO TO 8

7 RETURN

END

Page 43: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

38

Keterangan

M s a l n y a k i t a dihadapkan pada s i s t em persamaan d i f e r e n s i a l :

yj"(x) = 5x + y 2

y^Cx) = 2x" + y i y 2

denean s v a r s t awal : y , ( x ) = r y_(x ) = s

Maka dalera h a l i n i , N = 2 dan pada p r o g r a a utama k i t a nasukksn

V. - x o , ' / (1) = r , Y(2^ = s , F ( H = H * ( 5 . * VARt + VARY(2)) dan

F(2) = h * ( 2 . « VARX •'<* 2 + VARY(0 * VARY(2>)

Dengan demikian y . ( x ) = Y(1) dan y , ( x ) = Y{2)} d i s i n i EX = x .

Page 44: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

V, KESIMPULAN

Beberapa kesimpulan ysng b i s a d i a n b i l d a r i pembicaraan me-

n g e n a i roetoda Runge-Xutta a n t a r a l a i n :

- met ode i n i self stavtir.g dan dap a t d ipaka i untuk menyelesaikan p e r -

soa lan sampai k e t i t i k yang k i t a i n g i n k a n , s e i s i n i t u b i s a p u l a hsnya

untuk menghasi lkan starting values yang d ipe r lukan o leh metoda l a i n

( n i s a l n y a , raetoda p r e d i k t o r - k o r e k t o r )

- sub i n t e r v a l ft b i s a k i t a p i l i h sekehendak s e s u a i kebutuh?n k i t a

- cukup t e l i t i dibandingkan metoda p r e d i k t o r - k o r e k t o r

- kesa lahan p e r lengkah pendekatan memang sukar d i t e n t u k a n s e c a r a

exak ,oleh k a r e n a i t u sub i n t e r v a l h b i a s a n y a d i ambi l l e b i h pendek

d a r i yang d i p e r l u k a n menurut t e o r i dalam mencapai k e t e l i t i a n yang

d i ing inkan

- dibandingkan ^.etoda p r e d i k t o r - k o r e k t o r s metoda Punge-Kutta i n i l e ­

b ih banyak memerlukan perhi tun/ jan f ( x . y ) ( s e s u a i dengan orde k e s a ­

lahan d a r i rumus pendeka tannya) 5 s eh ingga ka l ah cepa t

- k i t a dapat menggabungkan rr.etoda Punge-Kutta dengan metoda p r e d i k t o r

- k o r e k t o r dimana metoda Punge-kuttft da lan h a l i n i digunakan untuk

mencari starting values yang dibutuhkan raetoda p r e d i k t o r - k o r e k t o r

- mengingat kemampuan k a l k u l a t o r HR-65 k i t a ^ j e l a s l a h beberapa program

hanya b i s a digunakan untuk menyelesaikan problem-problem sede rhana ;

t e r b a t a s n y a j e n i s problem persamaan d i f e r e n s i a l yang s e c a r a p r a k t i s

b i s a k i t a s e l e s a i k a n i n i akan b i s a d ih i l angkan dengan menggunakan

k a l k u l a t o r a t au komputer yang memil ik i kemampuan l e b i h b a i k .

39

Page 45: PUSAT PENEUHAIS TENAGA ATOM GAMAcopy of this report may not be up to the proper legibility standards, even though the best possible copy was used for preparing the master fiche. Hal

Referensi

1. Berezinj I .S . , Zhidkov. N.P._ Computing Methods_ Volume Il.Pergaraon

Press , 19 C5.

2 . Rsls tcn. Anthony, A First Course in unnericsl Analysis, McGraw-Hill

Kogakusha, Tokyo, 1955,

3. Clay ; Poy.L. _ Solutions of Si,3ten of Differential Equation- Lawren­

ce Radiation Laboratory University of California. USA June 1959,

4. In ternat ional Seminar Course 2-20 Agust 1971. Computing as A Lan­

guage of Physics. In te rna t iona l Atomic Energy Agency, Vienna 19 71.

5. Proceeding of A Seminar 17-21 January 1972, numerical Peactor Cal­

culations^ In te rna t iona l Atonic Energy Agency., Vienna. 1972.

6. Fox, L.j How to get Memingless Answers in Scientific Computation

(aid what to do about it). . . , „

W