PDEplot - Maple Help

PDEtools

 PDEplot
 plot the solution to a first order linear or nonlinear partial differential equation

 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 $\left(n-1\right)$-dimensional manifold in $n+1$ dimensions; initial data srange - the range or ranges of the parameters for the initial data options - (optional) equations, described in PDEplot_options

Description

 • The PDEplot command produces the plot of the solution for a first order, linear or nonlinear partial differential equation (PDE), for given initial conditions.
 • Given initial data consisting of equations of a manifold in $\left(n+1\right)$-space depending on $n-1$ parameters (for $n=2$, this is a curve) through which the required integral hypersurface must pass, the method of characteristics is used to generate the solution, resulting in a system of coupled first order ODEs to which numerical methods can be applied. The default is to use an internal Runge-Kutta fourth order (fixed step size) method. Other dsolve/numeric methods can be chosen by way of the method optional equation. Note, however, that use of these external methods tends to slow considerably the creation of plots.
 • The first argument, PDE, can be any first order partial differential equation. PDEs involving piecewise functions are handled using hardware arithmetic (evalhf) as of Maple V Release 4. All arguments after the first can be given in any order.
 • The inits parameter is a list of $n+1$ elements specifying the parametric form of a curve in $\left(n+1\right)$-space through which the required integral surface must pass. The elements should depend on $n-1$ parameters. Using s and t as the parameters with $n=3$, for example, the elements of the list must be expressions such as $\left[\mathrm{f1}\left(s,t\right),\mathrm{f2}\left(s,t\right),\mathrm{f3}\left(s,t\right),\mathrm{f4}\left(s,t\right)\right]$, or equations of the form $\left[\mathrm{x2}=\mathrm{f1}\left(s,t\right),u=\mathrm{f2}\left(s,t\right),\mathrm{x1}=\mathrm{f3}\left(s,t\right),\mathrm{x3}=\mathrm{f4}\left(s,t\right)\right]$, where the $f\left(s,t\right)$ are explicit expressions of s and t that can be evaluated numerically. The two possible inputs are equivalent but if equations are given the order of the elements is irrelevant.
 • The srange parameter is a list of ranges for the parameters used in the initial data. It should be given as $[\mathrm{s1}=\mathrm{a1}\mathrm{..}\mathrm{b1},\mathrm{s2}=\mathrm{a2}\mathrm{..}\mathrm{b2},...]$.
 • If $n=2$, by default the solution surface is displayed as an opaque, colored membrane, with the initial conditions highlighted in black. For $2, by default a sequence of surfaces is shown in animation which together map out the required solution hypersurface. For more information, see plots[animate].
 • Remaining arguments are interpreted as options which are specified as equations of the form option = value. In particular, the style option allows one to plot the points as points only, or to interpolate them using line mode. See plot3d,option for more information.
 • This function is part of the PDEtools package, and so it can be used in the form PDEplot(..) only after executing the command with(PDEtools). However, it can always be accessed through the long form of the command by using PDEtools[PDEplot](..).

Examples

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

We are given a nonlinear partial differential equation in two independent variables (pde1).

 > $\mathrm{pde1}≔\mathrm{diff}\left(u\left(x,y\right),x\right)\mathrm{diff}\left(u\left(x,y\right),y\right)-xy+u\left(x,y\right)=0$
 ${\mathrm{pde1}}{≔}\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{y}\right)\right){}\left(\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{y}\right)\right){-}{x}{}{y}{+}{u}{}\left({x}{,}{y}\right){=}{0}$ (1)

Using the unit circle in the x-y plane as an initial curve, we can explore the integral surface of the partial differential equation using PDEplot.

 > $\mathrm{PDEplot}\left(\mathrm{pde1},\left[\mathrm{cos}\left(t\right),\mathrm{sin}\left(t\right),0\right],t=-\mathrm{\pi }..\mathrm{\pi },\mathrm{ic_assumptions}=\left[\mathrm{diff}\left(u\left(x,y\right),x\right)=-\mathrm{cos}\left(t\right)\right]\right)$

Because of the nonlinearity of the PDE, there are actually two possible solutions, depending on the values of the derivatives on the initial curve. These values are given using the option ic_assumptions.

 > $\mathrm{PDEplot}\left(\mathrm{pde1},\left[\mathrm{cos}\left(t\right),\mathrm{sin}\left(t\right),0\right],t=-\mathrm{\pi }..\mathrm{\pi },\mathrm{ic_assumptions}=\left[\mathrm{diff}\left(u\left(x,y\right),x\right)=\mathrm{cos}\left(t\right)\right]\right)$

Another example.

 > $\mathrm{pde2}≔\left({y}^{2}+{z\left(x,y\right)}^{2}+{x}^{2}\right)\mathrm{diff}\left(z\left(x,y\right),x\right)-2xy\mathrm{diff}\left(z\left(x,y\right),y\right)-2z\left(x,y\right)x=0$
 ${\mathrm{pde2}}{≔}\left({{y}}^{{2}}{+}{{z}{}\left({x}{,}{y}\right)}^{{2}}{+}{{x}}^{{2}}\right){}\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({x}{,}{y}\right)\right){-}{2}{}{x}{}{y}{}\left(\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({x}{,}{y}\right)\right){-}{2}{}{z}{}\left({x}{,}{y}\right){}{x}{=}{0}$ (2)
 > $\mathrm{PDEplot}\left(\mathrm{pde2},z\left(x,y\right),\left[t,t,\frac{\mathrm{sin}\left(\frac{\mathrm{\pi }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{style}=\mathrm{surfacecontour}\right)$

The commands to create the plot from the Plotting Guide are

 > $\mathrm{pde3}≔\mathrm{sin}\left(\mathrm{diff}\left(u\left(x,y,z\right),y\right)\right)=u\left(x,y,z\right)$
 ${\mathrm{pde3}}{≔}{\mathrm{sin}}{}\left(\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{y}{,}{z}\right)\right){=}{u}{}\left({x}{,}{y}{,}{z}\right)$ (3)
 > $\mathrm{ics}≔\left[\mathrm{cos}\left(t\right)\mathrm{sin}\left(s\right),\mathrm{cos}\left(s\right)\mathrm{cos}\left(t\right),\mathrm{cos}\left(t\right),\mathrm{sin}\left(t\right)\right],\left[t=0..\mathrm{\pi },s=0..\mathrm{\pi }\right]$
 ${\mathrm{ics}}{≔}\left[{\mathrm{cos}}{}\left({t}\right){}{\mathrm{sin}}{}\left({s}\right){,}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){,}{\mathrm{cos}}{}\left({t}\right){,}{\mathrm{sin}}{}\left({t}\right)\right]{,}\left[{t}{=}{0}{..}{\mathrm{\pi }}{,}{s}{=}{0}{..}{\mathrm{\pi }}\right]$ (4)
 > $\mathrm{PDEplot}\left(\mathrm{pde3},\mathrm{ics},\mathrm{numsteps}=\left[-5,6\right],\mathrm{stepsize}=0.1,\mathrm{axes}=\mathrm{none},\mathrm{style}=\mathrm{surface},\mathrm{numchar}=\left[16,16\right],\mathrm{orientation}=\left[225,66\right],\mathrm{lightmodel}='\mathrm{light2}'\right)$

More examples are available on the PDEplot_options page.