Phase Portraits for ODE's and Autonomous Systems

Author of the original version: Richard Mansfield
Modified by Frits Beukers

A black window will appear. Click in it to select initial conditions!

Warning: under Solaris the window may come up white. Just resize it a little.

To plot the solution curves of a two dimensional system of autonomous differential equations, click on the box beside the x'(t) = label and enter an expression. The TAB key will cycle you through to the next field where you can enter the right hand side of the second equation. You will need to reset the screen for these changes to take effect. Click anywhere in the top window to select an initial condition. You will then see part of the integral through that point. If the curve stops at a point while you really would like to see it continue, push the '>>' button. If you want to see where the integral curve came from, push the '<<' button. If you are sorry about a plot you can use the "undo" button. In the process you can change the colors of the integral curves for a nice visual effect.

The little direction field lines are dotted to indicate time's arrow. The little dots indicate beginning of time and the little stick indicate forward time. You can toggle the visibility of these line elements in the menu "view".

The nullclines can be made visible with the option "nullclines" in the "view"-menu. However, it slows down redraws of the phase-portrait. This goes in particular for the "Teddy bear"-example.

You may also plot a single first order equation by letting x'=1. Or better yet, since dy/dx = y'/x', to solve dy/dx = f(x,y), choose any two functions whose ratio is f.

The window option in the menu "view" will open another panel where you can adjust the range of x and y that are displayed on the screen.

If you enter bad expressions in the x' or y' textfields, clicking to set initial conditions will do nothing. If you enter bad numbers in the window pop-up, "ok" will not hide the box. In any event you can always go back and fix the mistake.

Printing the graphics you generate is not entirely a trivial process. Because of entirely justified security concerns, most web browsers will not give this applet access to your file system and so it cannot print anything. You will have to grab the graphics with your own screen grabber (say xv in linux or snapshot on a Sun system) and print it yourself. There must be some equivalent programs for Win95 or Mac.

The parser was written by Darius Bacon and is available at his web site. Please see his file on copying the software.

Note on stepsize: The stepsize is adjusted dynamically. What I do is set the variable maxjump to be half the perimeter of the window divided by 200. Then at any point in the screen, I define Mod to be the maximum of sqrt((x')^2+(y')^2)) and .01. Then the local stepsize is maxjump/Mod. This prevents huge jumps from one point to the next, even when the derivatives are very large and allows for a modest speed up when they are small.

Back to my Homepage.