
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


>

phaseportrait(cos(x)*diff(y(x),x$3)diff(y(x),x$2)+Pi*diff(y(x),x)=y(x)x,y(x),x=2.5..1.4,[[y(0)=1,D(y)(0)=2,(D@@2)(y)(0)=1]],y=4..5,stepsize=.05);

>

phaseportrait([D(x)(t)=y(t)z(t),D(y)(t)=z(t)x(t),D(z)(t)=x(t)y(t)*2], [x(t),y(t),z(t)],t=2..2,[[x(0)=1,y(0)=0,z(0)=2]],stepsize=.05, scene=[z(t),x(t)],linecolour=sin(t*Pi/2),method=classical[foreuler]);

>

phaseportrait(D(y)(x)=y(x)x^2,y(x),x=1..2.5,[[y(0)=0],[y(0)=1],[y(0)=1]],title=`Asymptotic solution`,colour=magenta,linecolor=[gold,yellow,wheat]);



