|≤ x ≤||with|
|≤ y ≤||with|
with h =
To specify initial values for solution curves, either:
Users enter a first-order ODE in the form dy/dx = f(x,y), or a system in the form dx/dt = f(t,x,y) and dy/dt = g(t,x,y). (Note: A limited number of alternative variables can be chosen, to make it easier to adapt to different applications or textbook conventions.)
For ODEs, a slope field is displayed; for systems, a direction field is shown. (In the case of non-autonomous systems—that is, where either dx/dt or dy/dt depends on t—the direction field shown is for t = 0.)
By specifying initial values, users can see approximate solution curves, with several choices for the solution method (click links to read more at Wikipedia):
The "switching" option next to the choice of method is an adaptation that produces better solution plots in some cases. It affects all of the numerical methods for ODEs (it has no effect on solutions for systems). Specifically: If, at any point, |dy/dx| > 3 (i.e., if the tangent lines get too steep), the method switches the roles of x and y. For example, for the DE dy/dx = -y/x (a circle), here are solution curves for RK4 with h=0.05 without switching (left) and with switching (right):
For the most part, expressions are entered using standard mathematical notation, with a few caveats:
Special thanks to Larry Friesen at Butler Community College, who suggested many improvements to this page, and (with his colleagues and students) tested it extensively.
Condensed release history: (September 3, 2014) First release. Tested on Chrome (fairly extensively), Firefox (less), and Explorer (minimally). Reasonably functional, but incomplete. (September 7) Added numerical tables and extended addresses (with updating link to current state of the page). (September 9) Added the option for selectable "presets." The "BDH" presets are exercises from Differential Equations, Blanchard/Devaney/Hall, 3rd edition (mostly). (September 11) Tweaked some features, and added a couple of additional methods.
(October 9, 2014) Added support for systems with two dependent variables. (October 16) Improved support for systems; they are now included in the link, and the solution tables are formatted better. (October 27) Some system presets included. You can also save the graph as a PNG file, or open it in a new window, using the given link, or by right-clicking on the link. You can also copy the image to the clipboard (though perhaps not on all systems). Note: In Firefox, "View image" will open the image IN THE CURRENT WINDOW.
(February 25, 2016) Create time plots for systems, and allow limited changes to the names of the independent and dependent variables (e.g., x and y, or y and t, etc.)
(March 11, 2016) Recognizes when an initial value is an equilibrium point; zooming/panning and tracing (via hovering) on timeplots. Phase plane curves default to "t>0" only; this is controlled by the "lock t=0" option under the timeplot.
(February 1, 2017) When a link includes initial-value points, the last of these points shows up in the input boxes.
(March 1, 2017) Added an explanation of the "switching" option (see "How to use this page").
(October 2, 2017) Added descriptions of if/when, step, and delta functions. Overhauled to remove MooTools dependency.
TODO: Improve support for mobile devices, iPads, etc. Display the initial point for each curve. For non-autonomous systems, allow user to select the value of t for which the direction field is displayed. Add more methods, including one or more adaptive methods which adjust the size of h.
The contents of this page are © 2017 Darryl Nester. It is available to anyone who wishes to use it (like most things on the Internet). Please send me an email if you have found it to be useful, or if you have suggestions. (In particular, if you have a "preset" you would like to suggest, email me the link above.)