
Calling Sequence


DEplot[interactive]()
DEplot[interactive](filename)


Parameters


filename



(optional); string, name of the file which contains systems of differential equations and their properties





Description


•

The DEplot[interactive] command launches a graphical interface for plotting direction fields and solution curves of ODE systems. It can generate either static 2D plots or animations.

•

If no filename is given in the call to DEplot[interactive], a default set of systems will be provided. See examples,DEplotSystems for a detailed description of the systems in the default set.

•

This interactive interface can read/write systems of differential equations from/to a text file database, and produce a plot or animation of the direction field and specified solution curves for the chosen system. Aside from plotting, the user can change the values of parameters, and initial values in the system, as well as some of the standard options in the DEtools[DEplot] command.

•

Text file databases of systems and DEplot options can be manually created (with a text editor), then opened from within DEplot[interactive], using the Read systems button. The user can then select any compatible file. To write the data for the current systems to a test file, use the Save systems button. Note that the Save systems button is also useful to provide a sample file which can be used as a starting point for creating a personalized systems file. Note also that any changes made to the options for a plot are not saved when Save systems is pressed; to retain these changes, one must make them in the text file.

•

An example of a text file with three systems is given by:

LotkaVolterra model

sys = [diff(x(t),t)=a*x(t)d*x(t)*y(t),diff(y(t),t)=b*y(t)+c*x(t)*y(t)]

par = [a = 1, d = 1, b = 0.3, c = 0.3]

ini = [[1, 0.5, 0.5], [0,1.2,1.1]]

domain = [t = 0..10, x = 0..3, y = 0..3]

opt = [arrows = smalltwo, dirfield = 400]

Kermack McKendric epidemic model

sys = [diff(x(t),t)=beta*x(t)*y(t),diff(y(t),t)=beta*y(t)*x(t)G*y(t)]

par = [beta = 2, G = 1]

ini = [[0, 0.995, 0.005]]

domain = [t = 0..10, x = 0..1.2, y = 0..0.8]

opt = [arrows = small, dirfield = 400]

Damped harmonic oscillator

sys = [diff(x(t),t) = y(t), diff(y(t),t) = mu*y(t)omega^2 * x(t)]

par = [mu = 0.1, omega = 1.0]

ini = [[0,1.2,0], [0,0,1.2]]

domain = [t = 0..12, x = 1.5..1.5, y = 1.5..1.5]

opt = [arrows = medium, dirfield = 400]




Each system/option set has 6 lines. The first is a unique text key (the name of the system), and the following lines, in order, are the differential equations, the system parameter values, initial conditions for curves that are to be drawn, the viewing range and independent variable range for drawing the curves, and finally the options to be used for the DEplot.

•

Note that the DEplot command is part of the DEtools package, so you can launch the interactive tool by first loading the DEtools package using with, or by specifying the long form DEtools[DEplot][interactive].



Examples


>

$\mathrm{with}\left(\mathrm{DEtools}\,\mathrm{DEplot}\right)\:$

>

${\mathrm{DEplot}}_{\mathrm{interactive}}\left(\right)$



