blah |
---|
≤ x ≤ |
with |
≤ y ≤ |
with |
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 except for RKF (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:
I created this page as a replacement for the very nice JODEapplet by Marek Rychlik. I had used his Java applet for many years in my Calculus 2 and DE classes, but began to have issues with unstable Java installations and nuisance security alerts. (In particular, I never know if a particular classroom's computer will be able to run it.) This page is written in JavaScript (not Java), so it does not have those compatibility and security issues. In addition, your Web browser's "zoom" features will work with this page (often not the case with Java), so you can increase the display size if you need to do a demonstration for a large class.
Thanks to many users for helpful feedback, especially to Larry Friesen at Butler Community College, who suggested many improvements to this page, and (with his colleagues and students) tested it extensively.
NOTE: If this page is misbehaving, it may be that your browser is still using an old version of one of the support files. You might be able to fix this by clearing your browser's cache (click THIS LINK to find instructions) and then reloading this page. If this does not work, please contact me and describe the problem you are having.
(September 30, 2024) Squashed a bug involving models with constants. (I mistyped the name of a JavaScript variable, which meant that changing the values of those constants sometimes produced an error instead of the appropriate change in the graph.)
(December 23, 2022) Tweaked the new interface a bit more, so that (among other things) the entire graph is automatically visible in the window.
(December 2, 2022) A MAJOR interface overhaul. There are still a few glitches (at least some of which were pre-existing, not arising from these changes), but I'm crossing my fingers and releasing it, because I think the cleaner interface is worth the risk. (I hope this interface will also be more friendly for use on mobile phones and tablets.) If you prefer the old interface, you can find it at slopefields-old-interface.html, but I will not maintain that page with further updates.
(November 4, 2022) A few alterations to the interface, but mostly correcting some bugs introduced in the previous update.
(November 2, 2022) In specifying DEs, or in graphing exact solutions (functions, parametrics, etc.), you can can include constants (A,B,C,D,K,M,N,P,Q,R,b,c,d,k,m,n,p,q,r), and then vary the values of those constants to see the effect on the solution. This is still a little buggy; e.g., in some situations, a graph might not update when a value is changed. For example, try:
(October 15, 2022) Corrected/improved some interface issues. Can graph (any number of) function/parametric/polar/implicit plots.
(September 22, 2020) Runge-Kutta-Fehlberg method (beta).
(August 28, 2020) Added ability to overlay up to four graphs of functions, plus minor interface tweaks.
(November 5, 2018) Fixed some glitches in the "preset" menu.
(February 11, 2018) Minor bug fixes, and added (beta) support for polar-coordinate ODEs and systems.
(October 2, 2017) Added descriptions of if/when, step, and delta functions. Overhauled to remove MooTools dependency.
(March 1, 2017) Added an explanation of the "switching" option (see "How to use this page").
(February 1, 2017) When a link includes initial-value points, the last of these points shows up in the input boxes.
(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 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.)
(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.
(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.
The contents of this page are © 2024 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.)