Introduction to Numerical Methods
摘要
This chapter is an introduction to numerical methods featuring Euler’s method and the improved Euler’s method (often called Heun’s method) and the classical Runge-Kutta method (RK4 method). The author, who taught at a university with a large number of engineering and science majors and was himself an erstwhile physics major, contends that part of the curriculum of an introductory differential equations class should include some basic numerical methods for approximating solutions of ODEs—simply because they are commonly used in undergraduate engineering and physics courses and are essential to modeling a wide spectrum of engineering systems. Furthermore, questions related to these methods appear now and then on the FE (Fundamentals of Engineering) exam, which is one of the first steps in the process of becoming a licensed professional engineer. The narrative in Chap. 3 involving an accelerating yacht whose position in a lake is governed by a differential equation is used to introduce Euler’s method. A sequence of connected line segments whose slopes are obtained from the differential equation is used to construct an Euler polygonal curve that approximates the actual path of the yacht. This example eventually culminates with Euler’s recursive formula and the numerical algorithm known as Euler’s method. This is followed by examples, where the first several numerical calculations are shown in detail along with comparisons of the relative errors of the approximations as the step size is reduced. Due to time constraints and the fact that this textbook is written for readers who have only completed the first two calculus courses, the usual derivations of the Runge-Kutta methods of order two, such as the improved Euler’s method, and the higher-order Runge-Kutta methods, such as the RK4 method (both of which involve Taylor polynomials in two variables and the attendant error analysis) is best left to a numerical analysis course. Instead, a less formal introduction to the improved Euler’s method involving the trapezoidal rule of integration is used to improve upon Euler’s method. Similarly, the RK4 method is introduced using Simpson’s rule in order to enhance the accuracy of the improved Euler’s method.