Numerical Methods for Differential
NUMERICAL METHODS FOR DIFFERENTIAL EQUATIONS
Differential equations can describe nearly all systems undergoing change. They are ubiquitous is science and engineering as well as economics, social science, biology, business, health care, etc. Many mathematicians have studied the nature of these equations for hundreds of years and there are many well-developed solution techniques. Often, systems described by differential equations are so complex, or the systems that they describe are so large, that a purely analytical solution to the equations is not tractable. It is in these complex systems where computer simulations and numerical methods are useful.
The techniques for solving differential equations based on numerical approximations were developed before programmable computers existed. During World War II, it was common to ﬁnd rooms of people (usually women) working on mechanical calculators to numerically solve systems of differential equations for military calculations. Before programmable computers, it was also common to exploit analogies to electrical systems to design analog computers to study mechanical, thermal, or chemical systems. As programmable computers have increased in speed and decreased in cost, increasingly complex systems of differential equations can be solved with simple programs written to run on a common PC. Currently, the computer on your desk can tackle problems that were inaccessible to the fastest supercomputers just 5 or 10 years ago.
This chapter will describe some basic methods and techniques for programming simulations of differential equations. First, we will review some basic concepts of numerical approximations and then introduce Euler’s method, the simplest method. We will provide details on algorithm development using the Euler method as an example. Next we will discuss error approximation and discuss some better techniques. Finally we will use the algorithms that are built into the MATLAB programming environment. The fundamental concepts in this chapter will be introduced along with practical implementation programs. In this chapter we will present the programs written in the MATLAB programming language. It should be stressed that the results are not particular to MATLAB; all the programs in this chapter could easily be implemented in any programming language, such as C, Java, or assembly. MATLAB is a convenient choice as it was designed for scientiﬁc computing (not general purpose software development) and has a variety of numerical operations and numerical graphical display capabilities built in. The use of MATLAB allows the student to focus more on the concepts and less on the programming.
1.1 FIRST ORDER SYSTEMS
A simple ﬁrst order differential equation has general form
means the change in y with respect to time and
is any function of y and time. Note that the
derivative of the variable, , depends upon itself. There are many different notations for , common ones include
One of the simplest differential equations is
" ¥ £
We will concentrate on this equation to introduce the many of the concepts. The equation is convenient because the easy analytical solution will allow us to check if our numerical scheme is accurate. This ﬁrst order equation is also relevant in that it governs the behavior of a heating and cooling, radioactive decay of materials, absorption of drugs in the body, the charging of a capacitor, and population growth just to name a few. To solve the equation analytically, we start by rearranging the equation as
"&¥ © (
and integrate once with respect to time to obtain
where C is a constant of integration. We remove the natural log term by taking the...
Please join StudyMode to read the full document