
Calling Sequence


PDEplot(PDE, inits, srange, options)


Parameters


PDE



first order PDE containing one indeterminate function of n unknowns

inits



list of n+1 expressions or equations specifying the parametric form of an (n1)dimensional manifold in n+1 dimensions; initial data

srange



range or ranges of the parameters for the initial data

options



(optional) equations, described below





Description


•

Arguments of PDEplot other than the PDE, the initial data, and the range thereof can be given in any order. They should be specified as equations of the form option = value. The following options are supported:

'animate'

'basechar'

'color'

'ic_assumptions'

'initcolor'

'iterations'

'method'

'numchar'

'numsteps'

'obsrange'

'scene'

'stepsize'

'u'

'xi'




The dsolve[numeric] options are available, as well as all of the plot3d options except grid, gridstyle, and numpoints.

•

animate = true, false, only


The solution in general is an ndimensional hypersurface in (n+1)space. As this can be hard to visualize for n > 2, the solution can be animated, by setting animate=true. The resulting animation shows a sequence of manifolds which together map out the solution surface. Each of these manifolds can be viewed as a possible initial condition that would give rise to the obtained solution surface; indeed, the given initial condition surface is one of these manifolds (usually the middle one of the sequence, unless the option $\mathrm{numsteps}$ has been used).


Setting animate=false will simply display the solution hypersurface, with the initial condition highlighted in black.


If animate=only is given, the entire solution surface will never be displayed; instead, the initial condition surface will be animated alone. The object that is mapped out by the sequence of initial condition manifolds as they progress through the animation can easily be imagined as the solution. Apart from reducing the time and data involved in the animation, this option would also be useful in conjunction with setting basechar=true, as described below. The default is animate=true for n = 2, and animate=only for n > 2.


The number of frames in the animation is the number of integration steps performed. To decrease the number of frames without changing the accuracy, decrease the number of integration steps, and increase the number of iterations. See $\mathrm{numsteps}$, iterations.

•

basechar = true, false, only


The basechar option indicates whether the base characteristic curves (the evolution of the points of the initial conditions, projected onto the xy plane) should be plotted. If basechar is set to 'true', then base characteristics will be plotted; setting basechar to 'false' will suppress base characteristic plotting; setting basechar to 'only' will plot the base characteristics and the initial data curve, but will not plot the solution surface. The setting basechar = only cannot be chosen unless the animate option is set to 'false'. The default setting for basechar is 'false'.

•

color, colour = s_color


Setting color provides a method of color handling for the resulting solution surface. It can take a variety of forms: 1) as a ${\mathrm{plot}}_{\mathrm{color}}$ name; 2) as $\mathrm{COLOR}\left(\'\mathrm{HUE}\'\,\mathrm{realcons}\right)$; 3) as $\mathrm{COLOR}\left(\'\mathrm{RGB}\'\,\mathrm{realcons}\,\mathrm{realcons}\,\mathrm{realcons}\right)$; 4) as an expression in two variables; 5) as a procedure in two variables; 6) as a threeelement list of expressions in two variables; and 7) as a threeelement list of procedures in two variables.


In the case of 4) and 5), mesh coordinates (in the plane) are passed to the expression or procedure, and the resulting values are normalized on the range [0,1] and used as $\'\mathrm{HUE}\'$ values. In the case of 6) and 7), the resulting values are normalized on [0,1] and used as $\mathrm{RGB}$ values. Note that 4) and 6) must contain expressions of the two independent variables. This form of color handling can be useful to differentiate various features across the solution surface.


At present this option is only available for PDEs involving an unknown function of two independent variables (that is, n=2). Default surface color is handled by the Maple plotting code.

•

ic_assumptions = [eqn1,eqn2,...]


For nonlinear equations, the initial conditions of the first order derivatives of the indeterminate function can usually be determined only up to a set of possibilities, each of which defines a different solution hypersurface. As a result, some assumptions must be given regarding the values of the derivatives on the initial condition manifold as functions of its parameters. These can be given as equalities or inequalities involving any of the first order derivatives of the indeterminate function, the function itself, any of its unknowns, and the parameters. Assumptions must be sufficient to differentiate between the possible solutions. If they are insufficient, an error message will display all the possibilities for the initial conditions of the derivatives, one of which should be chosen and included in the $\mathrm{ic\_assumptions}$ option. See the examples below.

•

initcolor, initcolour = i_color


Setting initcolor provides color handling for the initial data, inits. It can take one of five forms: 1) as a ${\mathrm{plot}}_{\mathrm{color}}$ name; 2) as $\mathrm{COLOR}\left(\'\mathrm{HUE}\'\,\mathrm{realcons}\right)$; 3) as $\mathrm{COLOR}\left(\'\mathrm{RGB}\'\,\mathrm{realcons}\,\mathrm{realcons}\,\mathrm{realcons}\right)$; 4) as an expression of the initial data parameter; 5) as a procedure with one argument.


In the case of 4) and 5), values are normalized on [0,1] and applied as $\'\mathrm{HUE}\'$ values. (See color below.)


At present this option is only available for PDEs involving an unknown function of two independent variables (that is, n=2). Default coloring is handled internally by the Maple plotting code.


The iterations option indicates the number of points calculated for every point that is stored and plotted. This is useful in gaining a higher accuracy without storing and plotting a large number of mesh points. This option is only applicable to the internal (RungeKutta integration) method. The default is 1.


The method option can be set to internal, or to one of the methods specified in dsolve[numeric]. The default is to use the internal, RungeKutta, method as this will produce a noticeable speed improvement. It is recommended that dsolve or numeric methods only be used for PDEs requiring high accuracy, or whose characteristics exhibit stiffness.

•

numchar = integer,[integer,integer,...],[t1=integer,t2=integer,...]


The solution hypersurface is composed of a set of characteristic curves, each of which passes through a distinct point on the initial condition manifold. The number of such points (evenly spaced with respect to each parameter) along each of the ranges of the initial data parameters is indicated by $\mathrm{numchar}$. If a list of equations is given, it must be of type [t1=integer,t2=integer,...], where t1, t2,... are the parameters. The ordering of the parameters is the same as in the parameter range definition (see above). For example, with $n\=3$ (that is, when the initial manifold is a twodimensional surface in fourspace), and with numchar = [10,5], the solution surface would be a set of characteristic curves passing through each point of a 10x5 grid representing the initial surface. The default is 20 for n=2, and approximately 40^(1/(n1)) in each direction otherwise. The minimum is 4.

•

numsteps = [integer, integer], integer


The numsteps option indicates the number of points plotted along each characteristic curve, in each direction. If only a single integer is given, the characteristic curve is only integrated in the one direction specified by the sign of numsteps. The default is [10,10].


When obsrange is set to true, integration along a characteristic curve of the surface stops one mesh point after it has passed outside one of the specified ranges. This can be useful in the plotting of functions with asymptotic behavior, or to reduce the number of mesh points that are calculated internally. If false, the whole solution surface will be calculated, but only that portion which falls within the range is displayed. This is useful in case the solution surface goes outside the boundaries of the range at one point and then returns further on. The default value of obsrange is true.

•

scene = [xaxis,yaxis,zaxis]


The scene option indicates the variables that are to be plotted, and on which axes. Note that one or more of the dependent variables, the independent variables, or the parameter can be selected to be plotted, in any order. The default scene is the first two independent variables on the x and y axes and the dependent variable on the z axis.


The stepsize option specifies the distance along each characteristic curve between calculated points. The default stepsize, 0.25, is also the maximum.

•

xi = xi_min..xi_max, u or u(x1,...,xn) = u_min..u_max.


Ranges can be specified for those variables which are to be plotted (indicated using the scene option described previously). In general, the range determines the extent of the plot (the plot range) for the given variable.


The default plot range for a variable, say x2, for which a range is not given, is determined by using the maximum and minimum value of that variable (x2) over all the points on the surface which are within the ranges (x1_range, x3_range, u_range) that are given with this option. If no ranges are given, the entire solution surface is shown.



Examples


>

$\mathrm{with}\left(\mathrm{PDEtools}\right)\:$

>

$\mathrm{pde2}\u2254{\left(\frac{\partial}{\partial x}u\left(x\,y\right)\right)}^{\frac{\partial}{\partial x}u\left(x\,y\right)}\=y$

${\mathrm{pde2}}{\u2254}{\left(\frac{{\partial}}{{\partial}{x}}{}{u}{}\left({x}{\,}{y}\right)\right)}^{\frac{{\partial}}{{\partial}{x}}{}{u}{}\left({x}{\,}{y}\right)}{\=}{y}$
 (1) 
>

$\mathrm{PDEplot}\left(\mathrm{pde2}\,\left[\mathrm{cos}\left(t\right)\,\mathrm{sin}\left(t\right)\,{\ⅇ}^{t}\right]\,\frac{\mathrm{\π}}{4}..\frac{3\mathrm{\π}}{4}\,\mathrm{animate}\=\mathrm{false}\right)$

>

$\mathrm{pde3}\u2254\frac{\partial}{\partial x}u\left(x\,y\,z\,w\right)\+\left(\frac{\partial}{\partial w}u\left(x\,y\,z\,w\right)\right)\left(\frac{\partial}{\partial y}u\left(x\,y\,z\,w\right)\right)$

${\mathrm{pde3}}{\u2254}\frac{{\partial}}{{\partial}{x}}{}{u}{}\left({x}{\,}{y}{\,}{z}{\,}{w}\right){\+}\left(\frac{{\partial}}{{\partial}{w}}{}{u}{}\left({x}{\,}{y}{\,}{z}{\,}{w}\right)\right){}\left(\frac{{\partial}}{{\partial}{y}}{}{u}{}\left({x}{\,}{y}{\,}{z}{\,}{w}\right)\right)$
 (2) 
>

$\mathrm{assumption}\u2254\frac{\partial}{\partial x}u\left(x\,y\,z\,w\right)\=\frac{1\left(s8{s}^{2}rt\+{\left({s}^{2}\+16r{s}^{3}\+2ts\+{t}^{2}\right)}^{\frac{1}{2}}\right)s}{2\left(8{s}^{3}{r}^{2}\+2srt\right)}$

${\mathrm{assumption}}{\u2254}\frac{{\partial}}{{\partial}{x}}{}{u}{}\left({x}{\,}{y}{\,}{z}{\,}{w}\right){\=}{}\frac{{1}}{{2}}{}\frac{\left({}{s}{}{8}{}{{s}}^{{2}}{}{r}{}{t}{\+}\sqrt{{16}{}{r}{}{{s}}^{{3}}{\+}{{s}}^{{2}}{\+}{2}{}{s}{}{t}{\+}{{t}}^{{2}}}\right){}{s}}{{8}{}{{r}}^{{2}}{}{{s}}^{{3}}{\+}{2}{}{r}{}{s}{}{t}}$
 (3) 
>

$\mathrm{PDEplot}\left(\mathrm{pde3}\,\left[t\+{r}^{2}\,{s}^{2}\+r\,st\,s\,r\right]\,\left[t\=6..2\,s\=1..0.5\,r\=6..2\right]\,\mathrm{ic\_assumptions}\=\left[\mathrm{assumption}\right]\,\mathrm{scene}\=\left[u\,w\,z\right]\right)$

>

$\mathrm{pde4}\u2254\left(\frac{\partial}{\partial u}z\left(u\,v\,w\right)\right)u\mathrm{cos}\left(v\right)\left(\frac{\partial}{\partial v}z\left(u\,v\,w\right)\right)w\+\frac{\partial}{\partial w}z\left(u\,v\,w\right)\=wv\sqrt[3]{u}\mathrm{sin}\left(u\+v\right)$

${\mathrm{pde4}}{\u2254}\left(\frac{{\partial}}{{\partial}{u}}{}{z}{}\left({u}{\,}{v}{\,}{w}\right)\right){}{u}{}{\mathrm{cos}}{}\left({v}\right){}\left(\frac{{\partial}}{{\partial}{v}}{}{z}{}\left({u}{\,}{v}{\,}{w}\right)\right){}{w}{\+}\frac{{\partial}}{{\partial}{w}}{}{z}{}\left({u}{\,}{v}{\,}{w}\right){\=}{}{w}{}{v}{}\sqrt[{3}]{{u}}{\+}{\mathrm{sin}}{}\left({u}{}{v}\right)$
 (4) 
>

$\mathrm{PDEplot}\left(\mathrm{pde4}\,\left[t\,\mathrm{sin}\left(t\right)\,s\,\frac{t}{2}\right]\,t\=2\mathrm{\π}..3\mathrm{\π}\,s\=\mathrm{\π}..\mathrm{\π}\,\mathrm{iterations}\=2\,\mathrm{numchar}\=\left[10\,10\right]\,\mathrm{stepsize}\=0.05\,\mathrm{numsteps}\=\left[5\,5\right]\right)$

>

$\mathrm{pde5}\u2254\left({y}^{2}\+{z\left(x\,y\right)}^{2}\+{x}^{2}\right)\left(\frac{\partial}{\partial x}z\left(x\,y\right)\right)2xy\left(\frac{\partial}{\partial y}z\left(x\,y\right)\right)2z\left(x\,y\right)x\=0$

${\mathrm{pde5}}{\u2254}\left({{y}}^{{2}}{\+}{{z}{}\left({x}{\,}{y}\right)}^{{2}}{\+}{{x}}^{{2}}\right){}\left(\frac{{\partial}}{{\partial}{x}}{}{z}{}\left({x}{\,}{y}\right)\right){}{2}{}{x}{}{y}{}\left(\frac{{\partial}}{{\partial}{y}}{}{z}{}\left({x}{\,}{y}\right)\right){}{2}{}{z}{}\left({x}{\,}{y}\right){}{x}{\=}{0}$
 (5) 
>

$\mathrm{PDEplot}\left(\mathrm{pde5}\,z\left(x\,y\right)\,\left[t\,t\,\frac{\mathrm{sin}\left(\frac{\mathrm{\π}t}{0.1}\right)}{10}\right]\,t\=0..0.1\,\mathrm{numchar}\=40\,\mathrm{orientation}\=\left[163\,56\right]\,\mathrm{basechar}\=\mathrm{true}\,\mathrm{numsteps}\=\left[20\,20\right]\,\mathrm{stepsize}\=0.15\,\mathrm{initcolor}\=\mathrm{cos}\left(t\right)t\,\mathrm{animate}\=\mathrm{false}\,\mathrm{style}\=\mathrm{surfacecontour}\right)$

For more examples, see PDEtools[PDEplot].


