DEtools - Maple Programming Help

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

DEtools

 phaseportrait
 plot solutions to a system of DEs

 Calling Sequence phaseportrait(deqns, vars, trange, inits, options)

Parameters

 deqns - list or set of first order ordinary differential equations, or a single differential equation of any order vars - dependent variable, or list or set of dependent variables trange - range of the independent variable inits - set or list of lists; initial conditions for solution curves options - (optional) equations of the form keyword=value

Description

 • Given a list (or set) of initial conditions (see below), and a system of first order differential equations or a single higher order differential equation, phaseportrait plots solution curves, by numerical methods. Note: This 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.
 • A system of two first order differential equations also produces a direction field plot, provided the system is determined to be autonomous. In addition, a single first order differential equation also produces a direction field (as it can always be mapped to a system of two first order autonomous differential equations). For systems not meeting these criteria, no direction field is produced (only solution curves are possible in such instances). There can be ONLY one independent variable.
 • All of the properties and options available in phaseportrait are also found in DEplot. For more information, see DEplot.
 • inits should be specified as

$\left[\left[x\left(\mathrm{t0}\right)=\mathrm{x0},y\left(\mathrm{t0}\right)=\mathrm{y0}\right],\left[x\left(\mathrm{t1}\right)=\mathrm{x1},y\left(\mathrm{t1}\right)=\mathrm{y1}\right],...\right]$

 where the above is a list (or set) of lists, each sublist specifying one group of initial conditions.

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$
 > $\mathrm{phaseportrait}\left(\mathrm{cos}\left(x\right)\mathrm{diff}\left(y\left(x\right),\mathrm{}\left(x,3\right)\right)-\mathrm{diff}\left(y\left(x\right),\mathrm{}\left(x,2\right)\right)+\mathrm{\pi }\mathrm{diff}\left(y\left(x\right),x\right)=y\left(x\right)-x,y\left(x\right),x=-2.5..1.4,\left[\left[y\left(0\right)=1,\mathrm{D}\left(y\right)\left(0\right)=2,{\mathrm{D}}^{\left(2\right)}\left(y\right)\left(0\right)=1\right]\right],y=-4..5,\mathrm{stepsize}=0.05\right)$
 > $\mathrm{phaseportrait}\left(\left[\mathrm{D}\left(x\right)\left(t\right)=y\left(t\right)-z\left(t\right),\mathrm{D}\left(y\right)\left(t\right)=z\left(t\right)-x\left(t\right),\mathrm{D}\left(z\right)\left(t\right)=x\left(t\right)-y\left(t\right)\cdot 2\right],\left[x\left(t\right),y\left(t\right),z\left(t\right)\right],t=-2..2,\left[\left[x\left(0\right)=1,y\left(0\right)=0,z\left(0\right)=2\right]\right],\mathrm{stepsize}=0.05,\mathrm{scene}=\left[z\left(t\right),x\left(t\right)\right],\mathrm{linecolour}=\mathrm{sin}\left(\frac{t\mathrm{\pi }}{2}\right),\mathrm{method}=\mathrm{classical}\left[\mathrm{foreuler}\right]\right)$
 > $\mathrm{phaseportrait}\left(\mathrm{D}\left(y\right)\left(x\right)=-y\left(x\right)-{x}^{2},y\left(x\right),x=-1..2.5,\left[\left[y\left(0\right)=0\right],\left[y\left(0\right)=1\right],\left[y\left(0\right)=-1\right]\right],\mathrm{title}=\mathrm{Asymptotic solution},\mathrm{colour}=\mathrm{magenta},\mathrm{linecolor}=\left[\mathrm{gold},\mathrm{yellow},\mathrm{wheat}\right]\right)$