12.07.2015 Views

Numerical Mathematics - A Collection of Solved Problems

Numerical Mathematics - A Collection of Solved Problems

Numerical Mathematics - A Collection of Solved Problems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gde je F = f x + ff y ,. Tada imamoMETODI RUNGE-KUTTA 365(2)Φ(x n , y n , h) = A(a)f + B(a)(f + aFh) + O(h 2 )= (A(a) + B(a))f + aB(a)Fh + O(h 2 ).S druge strane, slično kao u prethodnom zadatku, dobijamoΦ T (x n , y n , h) = y(x n + h) − y(x n )hNa osnovu (2) i (3) imamo= f + 1 2 Fh + O(h2 ).Φ T (x n , y n , h) − Φ(x n , y n , h) = (1 − A(a) − B(a))f + (1/2 − aB(a))Fh + O(h 2 ),odakle zaključujemo da treba nametnuti uslove(4) 1 − A(a) − B(a) = 0,12 − aB(a) = 0da bi metod (1) bio drugog reda. Rešavanjem sistema jednačina (4) dobijamoA(a) = 2a − 12a , B(a) = 12a .Iz uslova A(a) = B(a) sleduje a = 1, tj. A(a) = B(a) = 1/2, pa u tom slučajumetod (1) postaje(5) y n+1 = y n + 1 2 h(k 1 + k 2 ),gde suk 1 ≡ k 1 (x n , y n ) = f(x n , y n ), k 2 ≡ k 2 (x n , y n ) = f(x n + h, y n + hk 1 ).Za Cauchyev problem dat zadatkom y ′ = 2xy − 2x 2 + 1, y(0) = 1 imamo daje f(x, y) = 2xy − 2x 2 + 1. Uzimajući h = 0.1, na osnovu (5) dobijamo rezultate(zaokružene na četiri decimale), prikazane u tabeli.n x n k 1 (x n , y n ) k 2 (x n , y n ) y n y(x n )0 0.0 1.0000 1.2000 1.0000 1.00001 0.1 1.2020 1.4121 1.1100 1.11012 0.2 1.4163 1.6494 1.2407 1.24083 0.3 1.6564 1.9277 1.3940 1.39424 0.4 1.9386 2.2669 1.5731 1.57355 0.5 1.7835 1.7840

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!