Lecture Notes in Differential Equations - Bruce E. Shapiro
Lecture Notes in Differential Equations - Bruce E. Shapiro Lecture Notes in Differential Equations - Bruce E. Shapiro
370 LESSON 33. NUMERICAL METHODS Heun’s Method is y n = y n−1 + h n 4 [ f(t n−1 , y n−1 ) + 3f ( t n−1 + 2 3 h, y n−1 + 2 )] 3 hf(t n−1, y n−1 ) (33.67) Both Heun’s method and the modified Euler method are second order and are examples of two-step Runge-Kutta methods. It is clearer to implement these in two “stages,” eg., for the modified Euler method, while for Heun’s method, ỹ n = y n−1 + hf(t n−1 , y n−1 ) (33.68) y n = y n−1 + h n 2 [f(t n−1, y n−1 ) + f(t n , ỹ n )] (33.69) ỹ n = y n−1 + 2 3 hf(t n−1, y n−1 ) (33.70) y n = y n−1 + h [ ( n f(t n−1 , y n−1 ) + 3f t n−1 + 2 )] 4 3 h, ỹ n (33.71) Runge-Kutta Fourth Order Method. This is the “gold standard” of numerical methods - its a lot higher order than Euler but still really easy to implement. Other higher order methods tend to be very tedious – even to code – although once coded they can be very useful. Four intermediate calculations are performed at each step: Then the subsequent iteration is given by k 1 = hf(t n , y n ) (33.72) k 2 = hf(t n + .5h, y n + .5k 1 ) (33.73) k 3 = hf(t n + .5h, y n + .5k 2 ) (33.74) k 4 = hf(t n + h, y n + k 3 ) (33.75) y n+1 = y n + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ) (33.76) Example 33.2. Compute the solution to the test equation y ′ = y, y(0) = 1 on [0, 1] using the 4-stage Runge Kutta method with h = 1/2. Since we start at t = 0 and need to compute through t = 1 we have to compute two iterations of RK. For the first iteration, k 1 = y 0 = 1 (33.77)
371 k 2 = y 0 + h 2 f(t 0, k 1 ) (33.78) = 1 + (0.25)(1) (33.79) = 1.25 (33.80) k 3 = y 0 + h 2 f(t 1/2, k 2 ) (33.81) = 1 + (0.25)(1.25) (33.82) = 1.3125 (33.83) k 4 = y 0 + hf(t 1/2 , k 3 ) (33.84) = 1 + (0.5)(1.3125) (33.85) = 1.65625 (33.86) y 1 = y 0 + h 6 (f(t 0, k 1 ) + 2f(t 1/2 , k 2 ) + 2f(t 1/2 , k 3 ) + f(t 1 , k 4 )) (33.87) = y 0 + h 6 (k 1 + 2k 2 + 2k 3 + k 4 ) (33.88) = 1 + .5 1 + 2(1.25) + 2(1.3125) + 1.65625 6 (33.89) = 1.64844 (33.90) Thus the numerical approximation to y(0.5) is y 1 ≈ 1.64844. For the second step, k 1 = y 1 = 1.64844 (33.91) k 2 = y 1 + h 2 f(t 1, k 1 ) (33.92) = 1.64844 + (0.25)(1.64844) (33.93) = 2.06055 (33.94) k 3 = y 1 + h 2 f(t 1.5, k 2 ) (33.95) = 1.64844 + (0.25)(2.06055) (33.96) = 2.16358 (33.97)
- Page 327 and 328: 319 we can replace (31.118) with a
- Page 329 and 330: 321 Corollary 31.12. The generalize
- Page 331 and 332: 323 where (A − λI)w 2 = w 1 , i.
- Page 333 and 334: 325 so that λ = 3, −5. The eigen
- Page 335 and 336: 327 Non-constant Coefficients We ca
- Page 337 and 338: 329 we find that ∫ M(t)g(t)dt = (
- Page 339 and 340: Lesson 32 The Laplace Transform Bas
- Page 341 and 342: 333 Figure 32.1: A piecewise contin
- Page 343 and 344: 335 Example 32.4. From integral A.1
- Page 345 and 346: 337 apply this result iteratively.
- Page 347 and 348: L [ t x−1] [ ] 1 d = L x dt tx =
- Page 349 and 350: 341 Equating numerators and expandi
- Page 351 and 352: 343 Derivatives of the Laplace Tran
- Page 353 and 354: 345 can be written as as illustrate
- Page 355 and 356: 347 Translations in the Laplace Var
- Page 357 and 358: 349 Summary of Translation Formulas
- Page 359 and 360: 351 The inverse transform is [ ] f(
- Page 361 and 362: 353 Example 32.18. Find the Laplace
- Page 363 and 364: 355 Similarly, we can express a uni
- Page 365 and 366: 357 Figure 32.7: Solution of exampl
- Page 367 and 368: Lesson 33 Numerical Methods Euler
- Page 369 and 370: 361 Figure 33.1: Illustration of Eu
- Page 371 and 372: 363 y 4 = y 3 + hf(t 3 , y 3 ) (33.
- Page 373 and 374: 365 Figure 33.3: Illustration of th
- Page 375 and 376: 367 result with a smaller step size
- Page 377: 369 Expanding the final term in a T
- Page 381 and 382: Lesson 34 Critical Points of Autono
- Page 383 and 384: 375 Since both f and g are differen
- Page 385 and 386: 377 Using the cos π/4 = √ 2/2 an
- Page 387 and 388: 379 values, of the matrix. We find
- Page 389 and 390: 381 Distinct Real Nonzero Eigenvalu
- Page 391 and 392: 383 eigendirection {λ 1 , v 1 }dom
- Page 393 and 394: 385 Figure 34.5: Phase portraits ty
- Page 395 and 396: 387 Complex Conjugate Pair with non
- Page 397 and 398: 389 The angular change is described
- Page 399 and 400: 391 Figure 34.8: Topological instab
- Page 401 and 402: 393 Figure 34.10: phase portraits f
- Page 403 and 404: Appendix A Table of Integrals Basic
- Page 405 and 406: 397 ∫ x √ x − adx = 2 3 a(x
- Page 407 and 408: 399 ∫ x √ ax2 + bx + c dx = 1 a
- Page 409 and 410: 401 ∫ ∫ ∫ ∫ e ax2 dx = −
- Page 411 and 412: 403 ∫ tan 3 axdx = 1 a ln cos ax
- Page 413 and 414: 405 Products of Trigonometric Funct
- Page 415 and 416: Appendix B Table of Laplace Transfo
- Page 417 and 418: 409 e at cosh kt t sin kt t cos kt
- Page 419 and 420: Appendix C Summary of Methods First
- Page 421 and 422: 413 The resulting equation is linea
- Page 423 and 424: 415 for y once z is known. Method o
- Page 425 and 426: Bibliography [1] Bear, H.S. Differe
- Page 427 and 428: BIBLIOGRAPHY 419
371<br />
k 2 = y 0 + h 2 f(t 0, k 1 ) (33.78)<br />
= 1 + (0.25)(1) (33.79)<br />
= 1.25 (33.80)<br />
k 3 = y 0 + h 2 f(t 1/2, k 2 ) (33.81)<br />
= 1 + (0.25)(1.25) (33.82)<br />
= 1.3125 (33.83)<br />
k 4 = y 0 + hf(t 1/2 , k 3 ) (33.84)<br />
= 1 + (0.5)(1.3125) (33.85)<br />
= 1.65625 (33.86)<br />
y 1 = y 0 + h 6 (f(t 0, k 1 ) + 2f(t 1/2 , k 2 ) + 2f(t 1/2 , k 3 ) + f(t 1 , k 4 )) (33.87)<br />
= y 0 + h 6 (k 1 + 2k 2 + 2k 3 + k 4 ) (33.88)<br />
= 1 + .5 1 + 2(1.25) + 2(1.3125) + 1.65625<br />
6<br />
(33.89)<br />
= 1.64844 (33.90)<br />
Thus the numerical approximation to y(0.5) is y 1 ≈ 1.64844. For the second<br />
step,<br />
k 1 = y 1 = 1.64844 (33.91)<br />
k 2 = y 1 + h 2 f(t 1, k 1 ) (33.92)<br />
= 1.64844 + (0.25)(1.64844) (33.93)<br />
= 2.06055 (33.94)<br />
k 3 = y 1 + h 2 f(t 1.5, k 2 ) (33.95)<br />
= 1.64844 + (0.25)(2.06055) (33.96)<br />
= 2.16358 (33.97)