![]() |
Instructions for using the Differential Equations Applet |
Go to the slope field applet for dy/dx
Go to the slope field applet for dx/dt
Go to the direction field applet
eqn #k: dy/dx=The number k is used to identify the equation number in error messages, so that possible problems can be traced to a particular equation. In the default mode, the applet has only one equation. Equation #0, if present, contains initialization code. This code is evaluated only once after its change. It is typically used to define constants and functions.
In addition to the ordinary arithmetical operators +, -, *, /, the following operators are available for use in expressions:
k=7; k^3-k^2-1
Click your mouse in the canvas area to select an initial condition. A solution passing through the indicated initial condition will be plotted. You can also select the initial condition precisely by typing in values of x and y. This method is described in this section.
Note: If there are more variables than 2, only two variables will be set based on the position of the mouse. The remaining variables will be set to 0.
The applet tabulates numerical solutions of the differential equations. You can view tabulated values for each initial conditions in a window by clicking on the button labelled "Show table". A window entitled "Solution table" will pop up with all numerically generated solutions, in a form resembling tables in standard textbooks on numerical methods. One can use Cut-And-Paste to copy these tables into a text editor or word processor. The applet generates a solution table every time it recalculates the solution. Old solution tables can be erased by pressing the "Clear" button of the table window.
These are entered into areas labeled as "Min. x", "Max. x", "Min. y" and "Max. y" etc. They are not used in calculations, until they are entered by either pressing the Return key, or by pressing the "Submit All" button.
The sizes of the grid in the x- and y- and other directions are entered in areas marked as "Num. of segs" . They become effective upon either hitting the Return key (one item at a time) or by pressing the "Submit All" button, which updates all input related to entering the formula for dy/dx, the ranges and the number of grid intervals.
The Applet maintains a list of initial conditions whose solutions will be plotted. You can:
All solutions displayed by the applet can be tabulated by pressing the "Show table" button in the initial condition entry group of buttons. Tables are displayed in a separate window. The table can be edited or copied into another application (e.g. text editor). This is achieved by first selecting the data to be copied (typically with a mouse) and then with the usual Control-C (Cut) and Control-V (Paste) key combination, or other system-specific Cut/Paste keys. The table data can also be printed directly from the applet by selecting "Pring" from the "File" menu. Further necessary information on printing from the applet is contained in this section.
The best general advice to avoid problems with printing (due to various bugs in major browsers and Java implementations) is to accept the certificate. The dialog to accept the certificate should pop up automatically when the page containing the applet is loaded for the first time.
The page containing the Applet can be printed with all major browsers. However, there are some browser peculiarities. The problem is especially aggravating with Microsoft Internet Explorer, because the applet window is reset to its original state (i.e, your data is erased ):- ) before printing. Thus, in order to print, manipulating the security settings of the browser is required, or downloading a certificate file, which certifies the applet's authenticity. Unfortunately, the number of various browser version combinations and strategies is too numerous to discuss in detail. The included HTML files should take care of making the choice for various Netscape and Internet Explorer versions. The good news is that for versions 6.0+ of the two major browsers the only required action to print is accepting the certificate. Other strategies are explained below.
The default security settings do not allow unsigned applets to print. In order to print from the applet in Internet Explorer 5.5 you should allow the applet Web server (i.e. the Web server from which you downloaded this applet) to print. This is done as follows:
If you simply use the browsers "Print" button to print the version of the Applet embedded into the Web page, Internet Explorer will initialize the Applet before printing, and thus any changes, initial conditions, etc. will be lost. Therefore you must use the built-in "Print" button of the Applet, or the "Print" from the "File" menu of the Applets's window if running the Applet in a separate frame. You must also accept the security certificate when the Applet first loads.
You can also print the Applet using Sun's appletviewer. Microsoft viewer JView does not allow printing.
These are typically generated by typing in an expression (see section on entering differential equations) which does not conform to the syntax rules of the Applet. The most recent error message appears in the box labeled "Last error". It will hopefully identify the problem by pointing to the column in which the first error occurs. If not, by pressing the button labelled "Show All Errors" all error messages can be examined and used to correct the problem.
Enjoy,
Marek Rychlik (rychlik@u.arizona.edu)