[SIZE=+5]Ordinary Differential Equations using MATLAB[/SIZE]
[SIZE=+2]by David Arnold & John C. Polking [/SIZE]
This is a manual for using MATLAB in a course on Ordinary Differential Equations. It can be used as a supplement of almost any textbook.
The manual completely describes two special MATLAB routines. DFIELD5 is a very easy to use routine which takes a user defined first order differential equation, and plots its direction field. It also allows the user to plot solution curves.
PPLANE5 plots vector fields for planar autonomous systems. It allows the user to plot solution curves in the phase plane. It also enables the user to plot these solutions in a variety of plots versus the independent variable. There are a number of advanced features, such as finding equilibrium points, displaying linearizations, and plotting separatrices.
The built-in MATLAB commands for solving ODEs are completely described in their most elementary usages, including the new ODE suite in version 5 of MATLAB. There is a treatment of linear algebra using MATLAB that is sufficient for understanding first order systems with constant coefficients.
The second edition was published by Prentice Hall in the Summer of 1999. Information about ordering the manual can be obtained from
them. The ISBN number is 0-13-011381-6. The Table of Contents and Preface are available in either
postscript or
Adobe Acrobat formats. There are several different versions of DFIELD and PPLANE which have been developed over the years for use with different versions of MATLAB. A
description and instructions for downloading them are available.
Code
http://math.rice.edu/~dfield/
[SIZE=+4]ODE Software for M[/SIZE][SIZE=+3]ATLAB[/SIZE]
DFIELD and PPLANE
The programs dfield and pplane are described in some detail in the manual
Ordinary Differential Equations using MATLAB. There are several versions of the software available for use with various editions of MATLAB.
dfield and pplane are copyrighted in the name of John C. Polking, Department of Mathematics, Rice University. They are not in the public domain. However, they are being made available free for use in educational institutions. This offer does not extend to any application that is made for profit. Users who have such applications in mind should contact
John C. Polking. Several versions of dfield and pplane are available. In addition there are a couple of pieces of related software.
In addition there are
java versions of dfield and pplane available for use on the internet.
ODESOLVE
odesolve is a MATLAB program for solving arbitrary systems of ordinary differential equations. It is still in an early stage of development, but it is fairly stable. Its use is described in the third edition of
Ordinary Differential Equations using MATLAB. Further development of this product is awaiting feature requests from users. Suggestions for changes in the design and for additional features, as well as notification of bugs should be directed to
John C. Polking.
Downloading the software
To download what you need, simply click on the appropriate links below.
The files must be saved in a directory that MATLAB can find. If your copy of MATLAB cannot find dfield or pplane, it is most likely because the directory in which you saved the files is not on the MATLAB path. On modern versions of MATLAB there is a path browser, which can be opened from the menu or from the toolbar. This tool will enable you to add a directory to the path.
Delivery of the software via the world wide web is probably the easiest method for users to employ. The disadvantage is that no record is kept of the downloads. It would be greatly appreciated if you would contact
John C. Polking, and tell him how you are using dfield and pplane, what level of course you are teaching, how many students you have, and what you think of the programs. If you acknowledge your use of the programs in this way you will be informed as new versions are released. Since changes are made as bugs are discovered and corrected and as good, new ideas are implemented, this will occur once or twice each year.
For use with version 7 of MATLAB.
This is only a maintenance update to make the software run well under version 7 of MATLAB.
Two files are needed:
For use with version 6.5 of MATLAB.
The software has been rewritten using new features of MATLAB. The new versions are described in the third edition of Ordinary Differential Equations using MATLAB.
The file ppn6out.m is no longer required, so only two files are needed:
For use with version 6.0 of MATLAB.
This is only a maintenance update to make the software run well under the new version of MATLAB.
Three files are needed:
For use with version 5.3 of MATLAB.
The most significant change from the older software is a better way of handling temporary files. For most people this will not be important, however the change is essential to making the software run on the Linux operating system.
Previous changes
There are two major changes.
- I have added an option that allows the plotting of level curves on the Display Window. Its use should be self explanatory.
- I have integrated the dfield and pplane menus with the new MATLAB menus that allow plot editing of graphical figures. In addition, I have integrated the Toolbar into all graphical figures. The integration works pretty well, but there are some glitches. This must be considered a work in progress, both for The MathWorks and myself. The user should approach plot editing with some care. I would very much like to hear what the users think about this new feature.
Three files are needed:
For use with version 5.2 of MATLAB.
This is a minor revision of dfield and pplane. There is one major difference. Now what were Parameter edit boxes will accept mathematical expressions as well. A
description is available.
Three files are needed:
For use with version 5 of MATLAB.
dfield and pplane have been completely reworked to take advantages of the much improved programming capabilities of version 5 of MATLAB. There are a number of new features. A
description is available.
Three files are needed:
For use with version 4.2 of MATLAB.
These are essentially the versions described in
Ordinary Differential Equations using MATLAB. There have been some
features added and bugs removed. Version 4.2 of MATLAB is required.
Four files are needed:
For use with version 4.0 of MATLAB.
These are the versions described in
Ordinary Differential Equations using MATLAB. They will work on any variant of version 4 of MATLAB.
Four files are needed:
For use with version 3.5 of MATLAB.
If anyone has still not upgraded from version 3.5 of MATLAB, these files will work. dfield was called df35 and pplane was called phpl35 in those days.
Five files are needed:
Other MATLAB ODE Solvers.
It is a very easy task to program in MATLAB the elementary single step solvers which are typically discussed in beginning ODE courses. However, if you do not want to take the time, here they are. These routines should work in any version of MATLAB. They have been revised so that the syntax of the solvers is closer to the ODE suite in version 5 of MATLAB.
- Euler's method: eul.m
- Second order Runge-Kutta: rk2.m
- Fourth order Runge-Kutta: rk4.m
MULTIGRAF.
MULTIGRAF is an easy to use MATLAB routine which enables the placing of up to six MATLAB figures on one page. Special attention is payed to dfield and pplane figures.
MATLAB code for a square wave.
Another simple code, this time to produce a square wave. MATLAB has a version of this, but unfortunately only in an add on toolbox. For those who might want to use it,
here it is.
[SIZE=+5]
dfield and pplane [/SIZE][SIZE=+2]the java versions
[/SIZE]
The java versions of dfield and pplane contain most of the features of the original
MATLAB versions. Click on the appropriate button below to run the dfield or pplane applet.
If you do not see the applet buttons above, it means that your browser is not Java 1.1.6 enabled. There are several possible reasons for this, including the following.
- You are running a browser that does not support Java 1.1.6,
- There is a firewall around your internet access, or
- Java has been deactivated in your browser preferences.
Most recent versions of
Netscape Communicator and
Microsoft Internet Explorer support Java 1.1.6. However, it is not automatically installed with Netscape Communicator 6. Be sure to choose the option to install it.
Printing
You can print the display figures from dfield and pplane using modern browsers. With Netscape 6 it is enabled by default. However, it is necessary to configure printing in Internet Explorer 5.5 before printing is possible. To do so perform the following steps. Notice that it will be necessary to restart your computer at the end of this procedure.
- From the Tools menu choose "Internet Options".
- Click the button labeled "Security".
- Near the bottom, click the button labeled "Custom Level ...".
- Click the button labeled "Java Custom Settings" on the bottom left of the screen.
- Click the tab labeled "Edit Permissions".
- In the menu look for "Unsigned Content --> Run Unsigned Content --> Additional Unsigned Permissions --> Printing". Under this heading, click "Enable.".
- Exit out of all of the windows, making sure that your new option is activated.
- Restart your computer.
References
The MATLAB versions of the programs dfield and pplane are described in some detail in the manual
Ordinary Differential Equations using MATLAB by John Polking and David Arnold. The java versions are modelled after the MATLAB versions, so the descriptions in the Manual should suffice to explain the use of the java versions. The Manual is published by
Prentice Hall.
Several textbooks on differential equations refer to and use dfield and pplane. Among them are
Differential Equations and
Differential Equations with Boundary Value Problems by John Polking, Albert Boggess, and David Arnold. They are published by Prentice Hall.
Legal stuff
dfield and pplane are copyrighted in the name of
John Polking. They are not in the public domain. However, they are being made available free for use in educational institutions. This offer does not extend to any application that is made for profit. Users who have such applications in mind should contact
John Polking.
It would be greatly appreciated if you would contact
John Polking, and tell him how you are using dfield and pplane, what level of course you are teaching, how many students you have, and what you think of the programs. If you acknowledge your use of the programs in this way you will be informed as new versions are released. Since changes are made as bugs are discovered and corrected and as good, new ideas are implemented, this will occur a few times each year.