This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Applications of MATLAB: Ordinary Differential Equations (ODE) David Houcque Robert R. McCormick School of Engineering and Applied Science - Northwestern University 2145 Sheridan Road Evanston, IL 60208-3102 Abstract Textbooks on differential equations often give the impression that most differential equations can be solved in closed form, but experience does not bear this out. It remains true that solutions of the vast majority of first order initial value problems cannot be found by analytical means. Therefore, it is important to be able to approach the problem in other ways. Today there are numerous methods that produce numerical approximations to solutions of differential equations. Here, we introduce the oldest and simplest such method, originated by Euler about 1768. It is called the tangent line method or the Euler method . It uses a fixed step size h and generates the approximate solution. The purpose of this paper is to show the details of implementing a few steps of Eulers method, as well as how to use built-in functions available in MATLAB (2005) . In the first part, we use Euler methods to introduce the basic ideas associated with initial value problems (IVP). In the second part, we use the Runge-Kutta method pre- sented together with the built-in MATLAB solver ODE45 . The implementations that we develop in this paper are designed to build intuition and are the first step from textbook formula on ODE to production software. Key words : Eulers methods, Euler forward, Euler modified, Euler backward, MAT- LAB, Ordinary differential equation, ODE, ode45. 1 Introduction The dynamic behavior of systems is an important subject. A mechanical system involves displace- ments, velocities, and accelerations. An electric or electronic system involves voltages, currents, and time derivatives of these quantities. An equation that involves one or more derivatives of the 1 unknown function is called an ordinary differential equation , abbreviated as ODE. The order of the equation is determined by the order of the highest derivative. For example, if the first derivative is the only derivative, the equation is called a first-order ODE. In the same way, if the highest derivative is second order, the equation is called a second-order ODE. The problems of solving an ODE are classified into initial-value problems (IVP) and boundary- value problems (BVP), depending on how the conditions at the endpoints of the domain are spec- ified. All the conditions of an initial-value problem are specified at the initial point. On the other hand, the problem becomes a boundary-value problem if the conditions are needed for both initial and final points. The ODE in the time domain are initial-value problems, so all the conditions are specified at the initial time, such as t = 0 or x = 0. For notations, we use t or x as an independent variable. Some literatures use t as time for independent variable....
View Full Document
This note was uploaded on 02/15/2012 for the course CIVIL 3101 taught by Professor Barnes during the Spring '11 term at Minnesota.
- Spring '11