Unformatted text preview: Chapter 3
k3 = hf k2 h x + ,y + 2 2 = 0.005 k2 y+ 2
2 − 2e(x+h/2) y + k2 2 + e2(x+h/2) + e(x+h/2) , k4 = hf (x + h, y + k3 ) = 0.005 (y + k3 )2 − 2e(x+h) (y + k3 ) + e2(x+h) + e(x+h) . Hence in Step 4 we have x = x + 0.005 , 1 y = y + (k 1 + 2 k 2 + 2 k 3 + k 4 ) . 6 Using the initial conditions x0 = 0, y0 = 3, c = 2, and N = 400 on Step 3 we obtain k1 = 0.005 32 − 2e0 (3) + e2(0) + e0 = 0.025 , k2 = 0.005 (3 + 0.0125)2 − 2e(0+0.0025) (3 + 0.0125) + e2(0+0.0025) + e(0+0.0025) ≈ 0.02522 , k3 = 0.005 (3 + 0.01261)2 − 2e(0+0.0025) (3 + 0.01261) + e2(0+0.0025) + e(0+0.0025) ≈ 0.02522 , k4 = 0.005 (3 + 0.02522)2 − 2e(0+0.0025) (3 + 0.02522) + e2(0+0.0025) + e(0+0.0025) ≈ 0.02543 . Thus, Step 4 yields x = 0 + 0.005 = 0.005 and y ≈3+ 1 (0.025 + 2(0.02522) + 2(0.02522) + 0.02543) ≈ 3.02522 . 6 Thus the approximate value at x = 0.005 is 3.02522. By repeating Steps 3 and 4 of the subroutine we ﬁnd that, at x = 0.505, y = 2.0201 · 1013 . The next iteration gives a ﬂoating point overﬂow. This would lead one to think the asymptote occurs at x = 0.51 . As a check lets apply the 4th order RungeKutta subroutine with the initial conditions x0 = 0, y0 = 3, c = 1, and N = 400. This gives a ﬁner step size of h = 0.0025. With these inputs, we ﬁnd y (0.5025) ≈ 4.0402 · 1013 . Repeating the subroutine one more time with a step size of 0.00125, we obtain the value y (0.50125) ≈ 8.0804 · 1013 . Therefore we conclude that the vertical asymptote occurs at x = 0.50 and not at 0.51 as was earlier thought. 160 ...
View
Full Document
 Spring '10
 Hald,OH
 Math, Differential Equations, Linear Algebra, Algebra, Equations, initial conditions, London Buses route K3, Daewoo K3, London Buses route K4, Transdev London, London Buses route K1

Click to edit the document details