DEtools - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : DEtools : DEtools/dfieldplot

DEtools

 dfieldplot
 plot direction field to a system of DEs

 Calling Sequence dfieldplot(deqns, vars, trange, xrange, yrange, options)

Parameters

 deqns - list or set of first order ordinary differential equations vars - list or set of dependent variables trange - range of the independent variable xrange - range of the first dependent variable yrange - range of the second dependent variable options - (optional) equations of the form keyword=value

Description

 • Given either a system of two first order autonomous differential equations, or a single first order differential equation, dfieldplot produces a direction field plot. There can be only one independent variable.
 • For plotting solution curves, see DEplot or phaseportrait.
 • The direction field presented consists of a grid of arrows tangential to solution curves. For each grid point, the arrow centered at ($x,y$) will have slope $\frac{\mathrm{dy}}{\mathrm{dx}}$. For system of two first order autonomous differential equations this slope is computed using $\left(\frac{\mathrm{dy}}{\mathrm{dt}}\right)$/$\left(\frac{\mathrm{dx}}{\mathrm{dt}}\right)$, where these two derivatives are specified in the first argument to dfieldplot. Note: A system is determined to be autonomous when all terms and factors, other than the differential, are free of the independent variable. For more information, see DEtools[autonomous]. For the single first order differential equation, the slope is simply $\frac{\mathrm{dy}}{\mathrm{dx}}$.
 • Optional equations for dfieldplot are in the DEplot help page.
 • The xrange and yrange parameters must be specified as follows.

 $x\left(t\right)={x}_{1}..{x}_{2}$,  $y\left(t\right)={y}_{1}..{y}_{2}$  or $x={x}_{1}..{x}_{2}$,     $y={y}_{1}..{y}_{2}$

 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.

Examples

To execute this section, open this help page as a worksheet and then execute the worksheet.

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

Example of a single non-autonomous first order differential equation:

 > $\mathrm{dfieldplot}\left(\frac{ⅆ}{ⅆx}y\left(x\right)=\frac{1\left(-x-{\left({x}^{2}+4y\left(x\right)\right)}^{\frac{1}{2}}\right)}{2},y\left(x\right),x=-3..3,y=-3..2,\mathrm{title}=\mathrm{Restricted domain},\mathrm{color}=\frac{1\left(-x-\left({x}^{2}+4y\right)\right)}{2}\right)$ Example of a system of two autonomous first order differential equations. This is the command to create the plot from the Plotting Guide.

 > $\mathrm{dfieldplot}\left(\left[\frac{ⅆ}{ⅆt}x\left(t\right)=x\left(t\right)\left(1-y\left(t\right)\right),\frac{ⅆ}{ⅆt}y\left(t\right)=0.3y\left(t\right)\left(x\left(t\right)-1\right)\right],\left[x\left(t\right),y\left(t\right)\right],t=-2..2,x=-1..2,y=-1..2,\mathrm{arrows}=\mathrm{SLIM},\mathrm{color}=\mathrm{black},\mathrm{dirfield}=\left[10,10\right]\right)$ 