DEplot3d - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DEtools

  

DEplot3d

  

plot the 3-D solutions to a system of DEs

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

DEplot3d(deqns, vars, trange, inits, options)

DEplot3d(deqns, vars, trange, inits, xrange, yrange, zrange, options)

DEplot3d(deqns, vars, trange, xrange, yrange, zrange, options)

Parameters

deqns

-

list or set of ordinary differential equations

vars

-

list or set of dependent variables

trange

-

range of the independent variable

inits

-

set or lists of lists; initial conditions for solution curves

xrange

-

range of the first dependent variable

yrange

-

range of the second dependent variable

zrange

-

range of the third dependent variable

options

-

(optional) equations of the form keyword=value

Description

• 

Given a system of differential equations and a list of initial conditions, specified by inits, DEplot3d produces a three-dimensional representation of the solution curves of the system. There can be only one independent variable.

• 

Direction fields, as found in DEplot, can also be plotted for autonomous systems with at most 3 first-order dependent variables, or non-autonomous systems with at most 2 first-order dependent variables, by specifying the arrows option.

• 

The default method of integration is method=rkf45. Other methods can be specified in the optional equations. Note that because numerical methods are used to generate plots, the output is subject to the characteristics of the numerical method in use. In particular, unusual output may occur when dealing with asymptotes of solution curves. This also means that the initial conditions of the problem must be given in standard form, that is, the function values and all derivatives up to one less than the differential order of the differential equation at the same point.

• 

Three of the dependent variables are plotted, or the independent variable and two dependent variables (for a 2-system). Other views can be specified using the scene option.

• 

By default, plots are produced with boxed axes.

• 

The inits parameter must take the form of

xt0=x0,yt0=y0,zt0=z0,...,xt1=x1,yt1=y1,zt1=z1,...,...

  

inits is a list (or set) of lists, each sublist specifying one group of initial conditions (for one solution curve).

• 

The xrange, yrange and zrange parameters must be specified as follows.

xt=x1..x2,  yt=y1..y2, zt=z1..z2  or

  x=x1..x2,    y=y1..y2,   z=z1..z2

  

By default, integration along a solution curve stops one mesh point after the specified range is exceeded. This may be overridden by the obsrange option.

• 

The optional equations, options, consist of the following, as well as a restricted set of plot3d and dsolve[numeric] options.

'animatefield'

'animatecurves'

'animate'

'arrows'

'color'

'dirfield'

'iterations'

'linecolor'

'numframes'

'obsrange'

'scene'

'size'

'stepsize'

• 

animatecurves = true or false (default=false)

  

animatecurves creates an animation of the evolving solution curve from the specified initial value(s) with respect to time. The default number of animation frames is 25, which can be changed with the numframes option. dsolve[numeric] is used to compute the solution curves for all specified initial values at different times. Note that if numpoints is provided, and the number of intervals (numpoints1) does not divide evenly by the number of frame intervals (numframes1), then a warning is produced, and numpoints is modified to be numpoints1numframes1numframes1+1.

• 

animatefield = true or false (default = false)

  

animatefield creates an animation of the direction field with respect to time (that is, the arrows describing the direction field move as a solution with respect to time). The default number of animation frames is 25, which can be changed with the numframes option. dsolve[numeric,rkf45] is used to compute the trajectory of each arrow.

• 

animate = true or false (default = false)

  

animate is a shortcut that can be used to specify that both animatefield (if applicable) and animatecurves (if applicable) be used.

• 

arrows = arrowtype

  

arrowtype consists of 'cheap', 'hex', 'hybrid', or 'none'

  

The arrowtype indicates the type of arrow to be used in a direction field. The default is 'none', which suppresses the calculation and display of any direction fields.

• 

color, colour = arrowcolor

  

arrowcolor can take many forms: 1) a plot[color] name; 2) COLOR('HUE', realcons); 3) COLOR('RGB', realcons, realcons, realcons); 4) the literal 'magnitude'; 5) magnitude[plot[color] name, plot[color] name]; 6) an expression in three variables; 7) a procedure in three variables; 8) a three-element list of expressions in three variables; or 9) a three-element list of procedures in three variables.

  

In case 4), the color of the arrows is determined by the magnitude of the field, where blue is used for the lowest magnitude, and red is used for the highest. Case 5) is identical to case 4), but the low and high magnitude colors are specified as the indices of magnitude (for example, magnitude is equivalent to magnitude[blue,red]). In cases 6) and 7), coordinates of the arrows in the plane are passed to the expression or procedure.  The resulting values are then normalized on the range [0,1] and used as 'HUE' values. In cases 8) and 9), the resulting values are normalized on [0,1] and used as RGB values. Note that 6) and 8) must contain expressions of the plotted variables. This form of color handling is useful in differentiating features of the direction field.

  

The default arrow color is red.

• 

dirfield = [posint,posint,posint], posint, or [[float,float,float],[float,float,float],...]

  

If [posint,posint,posint] is used, it specifies a grid on which to place the arrows. If posint is used, it specifies the number of randomly positioned arrows to use for the direction field. If [[float,float,float],[float,float,float],...] is used, each sublist describes a point at which an arrow is to be drawn.

• 

iterations = integer

  

iterations indicates the number of steps to be taken, of size stepsize, between stored points. This is useful in gaining a higher accuracy of plotted points by a small stepsize, without storing and plotting a large number of points.

• 

linecolor, linecolour = color_info

  

color_info may take one of five forms: 1) a plot[color] name; 2) COLOR('HUE', realcons); 3) COLOR('RGB', realcons, realcons, realcons); 4) an expression of the independent variable; or 5) a procedure of the independent variable.

  

In the case of 4) and 5), values of the independent variable are passed to the expression or procedure. The resulting values are then normalized on 0,1 and applied as 'HUE' values. This color handling is useful in displaying how the solution curve varies with the independent variable.

  

In addition, forms 1) to 5) can be combined into a list, one element for each of the solution curves considered. Each list element is then applied to a corresponding solution curve.

  

Default coloring is handled internally by the Maple plotting routines.

• 

numframes = posint

  

numframes specifies the number of frames used for animations, using any of the animate, animatefield, or animatecurves options.

• 

obsrange = true or false

  

obsrange indicates whether the integrator should stop once the solution curve has passed outside the specified range. It also specifies that any arrows that pass completely outside the viewing area should be removed (for an arrow-based animation). This is useful in the plotting of functions with asymptotic behavior. The default is true.

• 

scene = [name, name, name]

  

scene specifies the plot to be viewed. For example, scene = [x, y, z] indicates that the plot of x versus y versus z is to be plotted, with t implicit, while scene = [t, y, z] plots t versus y versus z (t explicit). This option can also be used to change the order in which to plot the variables. If vars is entered as a set, there is no default ordering; if entered as a list, the given ordering is used.

• 

size = float or magnitude

  

When size=magnitude, the size of the arrows is proportional to the magnitude of the direction field. When size is specified as a positive floating-point value, then this value is used to modify the size of all arrows in the direction field. The default value is size=1.0.

• 

stepsize = realcons

  

stepsize specifies the distance between mesh points to be used in generating the graph. For trange=a..b, the default stepsize value is ba20. If the stepsize specified is too large, the default is used.

• 

Note that the solution curves are plotted with a default line thickness of 3, but this can be changed with the thickness plot option.

• 

There are many other optional equations, as supplied in plot3d and dsolve[numeric]. For more information, see plot3d[options] and the individual dsolve[numeric] help files.

Examples

withDEtools:

DEplot3ddiffyx,x=yxzx,diffzx,x=zx2yx,yx,zx,x=0..3,y0=1.638,z0=2.31,y=0..2,z=4..4,scene=x,zx,yx,linecolor=COLORHUE,0.5

DEplot3ddiffxt,t=sint,diffyt,t=cost,xt,yt,t=2π..0,y0=0,x0=1,scene=t,xt,yt,stepsize=0.1,linecolor=cost

DEplot3dDxt=yt,Dyt=xtyt,xt,yt,t=0..10,x0=0,y0=1,x0=0,y0=0.5,scene=t,xt,yt,stepsize=0.1,title=`Damped oscillations`,linecolor=tsqrtt

DEplot3ddiffxt,t=yt,diffyt,t=sinxt,xt,yt,t=0..10,x0=0,y0=0.5,x0=0,y0=1,x0=0,y0=1.8,x0=2π,y0=1,x0=2π,y0=0.5,x0=2π,y0=2.1,x0=2π,y0=2.1,stepsize=0.2,title=`Pendulum Vibrations`,orientation=0,90,linecolor=sintt

DEplot3dDwt=xtwtzt,Dxt=yt+zt,Dyt=xtyt+wt,Dzt=xt+ytzt,wt,xt,yt,zt,t=0..10,x0=1,y0=0,z0=2,w0=3,x0=0,z0=0.25,y0=0.5,w0=0.165,scene=xt,zt,wt,stepsize=0.1,orientation=139,106

Example with an animated direction field

r0.7sqrtxt2+yt2+zt2:

LimCycdiffxt,t=sinrxt+yt,diffyt,t=sinrytzt,diffzt,t=sinrzt+xt:

DEplot3dLimCyc,xt,yt,zt,t=0..10,x0=50,y0=20,z0=25,x0=20,y0=10,z0=15,x0=15,y0=5,z0=5,dirfield=50,numpoints=300,color=blue,red,axes=box,arrows=hybrid,animatefield=true,numframes=75,orientation=60,55,obsrange=false

The command to create the plot from the Plotting Guide is

DEplot3ddiffxt,t=yt,diffyt,t=sinxtyt10,xt,yt,t=9..9,stepsize=0.1,x0=1,y0=1,linecolor=t,axes=NONE

Compatibility

• 

The zrange parameter was introduced in Maple 15.

• 

The animatecurves, animatefield, animate, arrows, color, dirfield, numframes and size options were introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

DEplot

DEtools

dsolve[classical]

dsolve[dverk78]

dsolve[gear]

dsolve[lsode]

dsolve[numeric]

dsolve[rkf45]

plot3d

plot3d[options]

plots[odeplot]