next up previous
Next: About this document Up: Plotting direction fields and Previous: Higher level DEtools routines:

Lower level routines: DEplot1 and DEplot2

These two commands do the same things as dfieldplot and phaseportrait, but are more general. In fact, dfieldplot and phaseportrait just call DEplot1 or DEplot2 with appropriate arguments. However, they are more specific in the following sense: DEplot1 is only for a single first order differential equation and DEplot2 is only for a system of two first order differential equations. We will consider only autonomous systems here. For further information, look at the help pages. Optional arguments that we have described earlier, like arrows, stepsize, and scene can also be used with these commands.

The DEplot1 command has two forms. The first is used to plot the direction field and a set of trajectories and the second form plots only the direction field. However, it is also possible to plot solution trajectories without the direction field. We give examples below for each behavior for our model, equation (3).

To plot a set of trajectories as well as the direction field, use a command like the following.

  > DEplot1(de1,[t,x],t=0..2,[0,1/2],[0,-1/2],[0,2]);

You can also set the range for the dependent variable, but it isn't required. Instead, Maple computes the trajectories and then sets an appropriate range for x.

To plot only the direction field, you omit the initial conditions and set a range for the dependent variable, like the following.

  > DEplot1(de1,[t,x],t=0..2,x=-2..2);

To plot only trajectories without the direction field, use the optional argument arrows=NONE. The default value of the arrows parameter is THIN, but you can set it to one of the other values given above for the phaseportrait command. Here is an example using the arrows=NONE option.

  > DEplot1(de1,[t,x],t=0..2,[0,1/2],[0,-1/2],[0,2],arrows=NONE);

The syntax for the DEplot2 command is very similar to that for DEplot1. Again there are two forms, one for plotting trajectories and the direction field and one for plotting only the direction field. Just as for DEplot1, it is possible to just plot trajectories.

To plot a set of trajectories as well as the direction field, use a command like the following.

  > DEplot2(sys1,[x,y],t=0..1,[0,0,1],[0,1,0]);

If you don't like the ranges that Maple chooses for the dependent variables, you can specify them yourself.

To plot just the direction field, leave out the initial conditions and specify ranges for the two independent variables.

  > DEplot2(sys1,[x,y],t=0..1,x=-2..2,y=-2..2);

To omit the direction field and just plot the trajectories, use the optional argument arrows=NONE. This speeds up the plotting tremendously.

  > DEplot2(sys1,[x,y],t=0..1,[0,0,1],[0,1,0],arrows=NONE);

next up previous
Next: About this document Up: Plotting direction fields and Previous: Higher level DEtools routines:

William W. Farr
Thu Oct 24 13:33:53 EDT 1996