A review by David Arnold
Summer, 1997
Every once in a while, something really special comes along that greatly enhances what students and teachers are trying to accomplish in the classroom. Such is the case with dfield5 and pplane5, two excellent Matlab 5 GUI's (graphical user interface) written by Dr. John Polking at Rice University (http://math.rice.edu/~polking/). These routines enable the user to find and manipulate graphical solutions of ordinary differential equations.
On the negative side, if you wish to use dfield5 or pplane5 , you must have the Matlab 5 application installed on your system. On the positive side, since Matlab 5 runs on Mac, PC, and UNIX, Dr. Polking's programs will run equally well on each of these platforms. Dr. Polking's archive also contains versions of dfield and pplane that will run on past versions (previous versions of dfield and pplane may not contain all of the features described in this article) of Matlab (versions 3.5, 4.0, and 4.2). All versions of these programs are currently offered as freeware.
Visit http://math.rice.edu:80/~polking/odesoft/dfpp.html and download the versions appropriate for your system. You will also find links at this address to new features and descriptions of the software. As a courtesy, if you decide to use the software, please email Dr. Polking at polking@rice.edu and let him know how you are using the software in your classroom or studies.
Dfield5 offers a point and click interface for solutions of the equation dy/dt = f(t,y) in the ty-plane. Typing dfield5 at the Matlab prompt introduces the DFIELD5 Setup dialog box shown in Figure 1.

Figure 1. The setup dialog box.
I've entered the differential equation dy/dt = y2 - alpha*t, declared the independent variable to be t, and initialized the parameter alpha to be 1. I could easily have used a, b, or c for my parameter, but Matlab allows the use of a small subset of the LaTeX code so I decided to get fancy. I've also adjusted the range of both the independent and dependent variables. Clicking on the Proceed button creates the DFIELD5 Display window shown in Figure 2.

Figure 2. The DFIELD5 Display window.
The solution trajectories you see in Figure 2 are easily created by pointing and clicking the mouse at various locations in the phase plane. You can also enter initial conditions with the keyboard as shown in Figure 3.

Figure 3. Keyboard input.
The default solver uses the Dormand-Prince algorithm. However, since dfield5 is likely to be used very early in a differential equations course, Dr. Polking has included Euler, Runge-Kutta 2, and Runge-Kutta 4 solvers as well. You can set the solvers to operate in the forward or backward direction, or both. You can plot several solutions at once, show the phase line, fine tune solver settings to improve accuracy and speed, and select arrows or line segments for the direction field (you can also opt for no direction field). You can add text to the display and zoom in and out with the mouse.
Pplane5 offers a point and click interface for solutions of the system
dx/dt = f(x,y)
dy/dt = g(x,y)
Pplane5 cannot handle non-autonomous systems (systems whose derivatives depend not only on x and y, but also on t), nor can it deal with systems of three or more equations (Matlab has a whole suite of solvers designed to solve both autonomous and non-autonomous systems. Check out Dr. Polking's text, Ordinary Differential Equations Using Matlab, Prentice Hall. A student of mine, Jonathan duSaint, has written a Matlab GUI that simplifies the use of Matlab's ODE solvers. Contact me at darnold@northcoast.com if interested.) However, many of the systems in an introductory differential equations course qualify nicely for use with pplane5.
Typing pplane5 at the Matlab prompt creates the PPLANE5 Setup dialog box, as shown in Figure 4.

Figure 4. The PPLANE5 Setup dialog box.
Although pplane5 has all of the features of dfield5, the former program pales in comparison to pplane5. Significant differences are discovered when you begin exploring the menus of the dialog box shown in Figure 4.
Dr. Polking has included a gallery of frequently used systems such as linear, competing species, pendulum, and predator-prey. You can add new systems to the existing gallery or you can create new galleries from scratch. I have found this feature particularly useful for presentations by both teacher and student: prepare your systems in advance, save them in a gallery, then select the needed systems in sequence as you deliver your presentation. You can also save and load individual systems for future use.
Note also the radio button for Nullclines in Figure 4. Selecting this option creates the nullclines and draws a few select arrows on the nullclines indicating the direction of trajectories as they cross the nullclines. Later, you can also select an option that superimposes the nullclines on the direction field.
At this point, click the proceed button and use the mouse to plot solution trajectories as shown in Figure 5.

Figure 5. The PPLANE5 Display window.
Many solvers do all the calculations for the trajectory in the background, then provide the final image. An important pedagogical feature of both dfield5 and pplane5 is that trajectories are drawn in real time. You get to watch as trajectories are drawn, which gives you a feel for the speed of a particle, say, when it rounds a corner. This is possible because Dr. Polking has written his routines so that trajectories automatically stop when certain conditions are met (near an equilibrium point, near a limit cycle, etc.). If you wish, as in dfield5, you can also use the keyboard to designate an initial condition and a specific computation interval.
Further exploration of the menus of PPLANE5 Display shown in Figure 5 reveal some very interesting features. For example, the Graph menu allows you to draw x or y versus t, individually or simultaneously. You can also plot a 3-dimensional graph of a trajectory, with time being the z-axis. A composite drawing is also available, which is the 3D graph with projections of the trajectory on the xy-, xt-, and yt-planes.
It is a simple matter to draw an x versus t plot. Simply select the x versus t option on the Graph menu, then use a mouse to select a trajectory in the PPLANE5 Display window, giving an image similar to that in Figure 6.

Figure 6. An x versus t plot.
At this point, you can change the type of plot, or, more importantly, use the mouse to ``crop'' the trajectory. You need only drag your mouse over the part of the image you wish to keep, say from t=0 to t=10, then click the ``crop'' button with your mouse. A new window opens with a trajectory drawn over the interval you selected with the mouse.
Dr. Polking has included routines for finding and classifying equilibrium points (of course, these are easily visualized by noting the points of intersection of the nullclines). Select ``Find an equilibrium point'' from the Solutions menu of PPLANE5 Display. Then use the mouse to click near a suspected point of intersection (where the direction arrows get smaller, or where two nullclines cross), and you'll get a summary window similar to that in Figure 7.

Figure 7. An equilibrium point summary.
The information in Figure 7 declares the equilibrium point to be a spiral source, then lists the Jacobian along with its eigenvalues and eigenvectors. Of particular interest here is the ``Display the linearization'' button. Clicking this button creates a linearization of the original non-linear system near the equilibrium point, as shown in Figure 8.

Figure 8. A linear approximation near an equilibrium point.
You can also plot the stable and unstable orbits near a saddle equilibrium point.
I have used both dfield5 and pplane5 for two years and found them both to be indispensable classroom tools. The learning curve is minimal and their reliability and performance are excellent. Most importantly, the tools and options provided by Dr. Polking's routines are exactly what my students need on a daily basis. These are excellent programs and I recommend them without reservation.