Metoda Runge-Kutta

U metodi Runge-Kutta se također računa #tex2html_wrap_inline38098# pomoću već poznate vrijednosti #tex2html_wrap_inline38100# Taj račun je točniji, jer uzima u obzir i neke međuvrijednosti funkcije #tex2html_wrap_inline38102# Tako imamo sljedeći algoritam

Algoritam 10   <#12094#>(Metoda Runge-Kutta)<#12094#> Izaberemo dovoljno velik prirodni broj #tex2html_wrap_inline38105# Za zadani korak #math2712#

#tex2html_wrap_indisplay38107#

računamo niz brojeva #tex2html_wrap_inline38109# po formuli

#tex2html_wrap_indisplay38110# #tex2html_wrap_indisplay38111# ;SPMnbsp;;SPMnbsp;;SPMnbsp;

gdje je


#tex2html_wrap_indisplay38112# #tex2html_wrap_indisplay38113# ;SPMnbsp;;SPMnbsp;;SPMnbsp;
#tex2html_wrap_indisplay38114# #tex2html_wrap_indisplay38115# ;SPMnbsp;;SPMnbsp;;SPMnbsp;
#tex2html_wrap_indisplay38116# #tex2html_wrap_indisplay38117# ;SPMnbsp;;SPMnbsp;;SPMnbsp;
#tex2html_wrap_indisplay38118# #tex2html_wrap_indisplay38119# ;SPMnbsp;;SPMnbsp;;SPMnbsp;

Početna vrijednost #tex2html_wrap_inline38121# je određena početnim uvjetom.

Radi bolje preglednosti prilikom računanja se koristi tabela
#tex2html_wrap_inline38123# #tex2html_wrap_inline38125# #tex2html_wrap_inline38127# #tex2html_wrap_inline38129# ;SPMnbsp;
0 #tex2html_wrap_inline38132# #tex2html_wrap_inline38134# #tex2html_wrap_inline38136# #tex2html_wrap_inline38138#
;SPMnbsp; #math2713##tex2html_wrap_inline38140# #math2714##tex2html_wrap_inline38142# #tex2html_wrap_inline38144# #tex2html_wrap_inline38146#
;SPMnbsp; #math2715##tex2html_wrap_inline38148# #math2716##tex2html_wrap_inline38150# #tex2html_wrap_inline38152# #tex2html_wrap_inline38154#
;SPMnbsp; #tex2html_wrap_inline38156# #tex2html_wrap_inline38158# #tex2html_wrap_inline38160# #tex2html_wrap_inline38162#
;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; #math2717##tex2html_wrap_inline38164#
#tex2html_wrap_inline38166# #tex2html_wrap_inline38168# #tex2html_wrap_inline38170# #tex2html_wrap_inline38172# #tex2html_wrap_inline38174#
;SPMnbsp; #math2718##tex2html_wrap_inline38176# #math2719##tex2html_wrap_inline38178# #tex2html_wrap_inline38180# #tex2html_wrap_inline38182#
;SPMnbsp; #math2720##tex2html_wrap_inline38184# #math2721##tex2html_wrap_inline38186# #tex2html_wrap_inline38188# #tex2html_wrap_inline38190#
;SPMnbsp; #tex2html_wrap_inline38192# #tex2html_wrap_inline38194# #tex2html_wrap_inline38196# #tex2html_wrap_inline38198#
;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; #math2722##tex2html_wrap_inline38200#
#tex2html_wrap_inline38202# #tex2html_wrap_inline38204# #tex2html_wrap_inline38206# #tex2html_wrap_inline38208# #tex2html_wrap_inline38210#
;SPMnbsp; ... ... ... ...

Mathematica program 7   (Metoda Runge-Kutta)
verbatim175#

Primjer 3.18   Riješiti isti zadatak kao u primjeru #pr:eulermet#9915> metodom Runge-Kutta. Rješenje. Primijenimo li gornji program, koji slijedi algoritam metode Runge-Kutta, dobivamo sljedeće točke grafa rješenja.
#tex2html_wrap_inline38279# #tex2html_wrap_inline38281#
0 #tex2html_wrap_inline38284#
#tex2html_wrap_inline38286# #math2723##tex2html_wrap_inline38288#
#tex2html_wrap_inline38290# #math2724##tex2html_wrap_inline38292#
#tex2html_wrap_inline38294# #math2725##tex2html_wrap_inline38296#
#tex2html_wrap_inline38298# #math2726##tex2html_wrap_inline38300#
#tex2html_wrap_inline38302# #math2727##tex2html_wrap_inline38304#
#tex2html_wrap_inline38306# #math2728##tex2html_wrap_inline38308#
#tex2html_wrap_inline38310# #math2729##tex2html_wrap_inline38312#
#tex2html_wrap_inline38314# #math2730##tex2html_wrap_inline38316#
#tex2html_wrap_inline38318# #math2731##tex2html_wrap_inline38320#
#tex2html_wrap_inline38322# #math2732##tex2html_wrap_inline38324#
Egzaktno rješenje je #tex2html_wrap_inline38350# pa je rješenje u granicama točnosti stroja ispisano s deset znamenaka
#tex2html_wrap_inline38352# #tex2html_wrap_inline38354#
0 #tex2html_wrap_inline38357#
#tex2html_wrap_inline38359# #math2733##tex2html_wrap_inline38361#
#tex2html_wrap_inline38363# #math2734##tex2html_wrap_inline38365#
#tex2html_wrap_inline38367# #math2735##tex2html_wrap_inline38369#
#tex2html_wrap_inline38371# #math2736##tex2html_wrap_inline38373#
#tex2html_wrap_inline38375# #math2737##tex2html_wrap_inline38377#
#tex2html_wrap_inline38379# #tex2html_wrap_inline38381#
#tex2html_wrap_inline38383# #math2738##tex2html_wrap_inline38385#
#tex2html_wrap_inline38387# #math2739##tex2html_wrap_inline38389#
#tex2html_wrap_inline38391# #math2740##tex2html_wrap_inline38393#
#tex2html_wrap_inline38395# #math2741##tex2html_wrap_inline38397#
Odmah možemo uočiti mnogo bolju točnost nego kod metode Eulera.

Postoji cijela familija metoda zasnovanih na ideji da se podsegment podijeli na još manje dijelove kako bi se izračunala vrijednost u sljedećem čvoru. Sve one nose naziv Runge-Kutta metode. Opisani postupak se najčešće upotrebljava.