dchange - Maple Help

PDEtools

 dchange
 perform change of variables in mathematical expressions or procedures

 Calling Sequence dchange(tr, expr) dchange(tr, expr, newvars, itr, known=..., unknown=..., params=..., simp_proc)

Parameters

 tr - set of equations corresponding to the transformation from the old variables on the left hand side of the equations to the new variables on the right hand side expr - algebraic expression or procedure (program) newvars - (optional) list containing the new variables; required if the number of new variables is not the same as the number of old variables itr - (optional) set of inverse transformation equations known=... - (optional) equation of the form $\mathrm{known}=\mathrm{args}$, where args is a function or set of functions to be transformed as known functions unknown=... - (optional) equation of the form $\mathrm{unknown}=\mathrm{args}$, where args is a function or set of functions to be transformed as unknown functions params=... - (optional) equation of the form $\mathrm{params}=\mathrm{args}$, where args is a set with names to be considered just parameters of the transformation, not variables simp_proc - (optional) simplification procedure to be applied to the result

Description

 • The dchange command realizes changes of variables in mathematical expressions (PDEs, multiple integrals, integro-differential equations, limits, and so on) and in procedures. Only the global variables of a procedure can be changed using the dchange command, not the local ones.
 • This command was meant as a unified command for changing variables in arbitrary mathematical expressions, according to a given transformation of variables. In addition, it can use any specific indication for the inverse transformation, in which case a different algorithm for changing variables in derivatives is used. This is particularly useful when the transformation involves special functions not known to the system, or the "target" involves derivatives and the transformation is not one-to-one (see the examples).
 • These are the conventions for the arguments:
 a) The first and second arguments have a fixed position. The first argument is the transformation, in the form old_var = f(new_vars) or as a set of equations with this form, and the second is the target, in the form of an algebraic expression, an equation, or a set or list of them.  The other (all optional) arguments may appear in any order after the second one.
 b) The old and new variables involved in the transformation equations must be of type name or of type function. This second version of the dchange command also accepts transformation equations for the dependent variables (functions), allowing for a direct study of the invariance groups of a given PDE. The extension of the transformation to any required differential order is automatic.
 c) The sets of transformation equations must contain only old (new) variables on the left hand side and only new (old) variables on the right hand side, as in
 {x = xi+eta, y = xi-eta}; # the transformation
 d) An indication of the new variables is required when it is not obvious, and it must then be given as a list. For example, in the transformation above, there are only two variables on the right hand sides of a set of two transformation equations; dchange assumes that the new variables are those appearing on the right hand side. If, however, these numbers are not equal, one must indicate which are the new variables:
 [xi, eta] (or) [eta, xi]
 Since in Maple $f\left(\mathrm{\xi },\mathrm{\eta }\right)\ne f\left(\mathrm{\eta },\mathrm{\xi }\right)$, the order given to the new variables in the list above may be relevant.
 e) If only one set of transformation equations is given, then it must contain the new variables on the right hand side.
 • The dchange command has two different criteria for changing variables. The first one, applied by default to "known" functions (functions with a differentiation rule known to Maple), changes the functional dependence using the explicit relation between the old and new variables. For example, if the transformation is given by
 {x = xi+eta, y = xi-eta},
 then dchange will transform known functions as follows:
 cos(x*y) -> cos( (xi+eta)*(xi-eta) )
 The second criterion, applied by default to "unknown" functions (functions whose differentiation rule is unknown to Maple), changes the functional dependence taking into account only the implicit relation between the old and new variables. For example, with the transformation above, the dchange command will transform any "unknown" function (say f) as in:
 f(x, y) -> f(xi, eta)
 • It is possible to change these defaults and force dchange to apply a different criterion to a given function, by specifying it using the 'known' or 'unknown' options.
 • When a function depends on more variables than those which are being changed, the variables not entering the process are all put to the right. For example, the transformation above would take f(x, y, z, t) -> f(xi, eta, z, t).
 • In addition, you can indicate the use of any standard or special procedure for the automatic simplification of the resulting expression. This is useful when nonobvious mathematical equivalencies must be taken into account, or just to make the resulting expression more compact. The simplification is applied not only to the final result but also to all inner intermediate results.
 • Special rules are applied to multiple integrals, since for definite ones, the mapping of the old integration domain into the new one may present additional complications. The command could fail to determine the (perhaps functional) range for the new variables defining the new integration domain. In these cases, a special warning message is displayed and only the functional dependence of the new ranges is determined.
 • Optional arguments can be given alone or in conjunction, and in any order.
 • This function is part of the PDEtools package, and so it can be used in the form dchange(..) only after executing the command with(PDEtools). However, it can always be accessed through the long form of the command by using PDEtools[dchange](..).

Examples

1. Maple can reduce a PDE to a quadrature:

 > $\mathrm{with}\left(\mathrm{PDEtools}\right):$
 > $\mathrm{PDE}≔\mathrm{diff}\left(f\left(x,y\right),x\right)+g\left(x,y\right)+\mathrm{diff}\left(f\left(x,y\right),y\right)=0$
 ${\mathrm{PDE}}{≔}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}\right){+}{g}{}\left({x}{,}{y}\right){+}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}\right){=}{0}$ (1)
 > $\mathrm{tr}≔\left\{x=r+s,y=r-s\right\}:$
 > $\mathrm{dchange}\left(\mathrm{tr},\mathrm{PDE}\right)$
 $\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({r}{,}{s}\right){+}{g}{}\left({r}{,}{s}\right){=}{0}$ (2)

Tell Maple you are looking at g as a "known" function:

 > $\mathrm{dchange}\left(\mathrm{tr},\mathrm{PDE},\mathrm{known}=g\right)$
 $\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({r}{,}{s}\right){+}{g}{}\left({r}{+}{s}{,}{r}{-}{s}\right){=}{0}$ (3)

2. The next example demonstrates the reduction of the number of independent variables inside a differential operator:

 > $L≔f→x\left(\frac{\partial }{\partial y}f\right)-y\left(\frac{\partial }{\partial x}f\right)$
 ${L}{≔}{f}{→}{x}{}\left(\frac{{\partial }}{{\partial }{y}}{}{f}\right){-}{y}{}\left(\frac{{\partial }}{{\partial }{x}}{}{f}\right)$ (4)
 > $\mathrm{tr}≔\left\{x=s{r}^{\frac{1}{2}},y=s{\left(1-r\right)}^{\frac{1}{2}}\right\}$
 ${\mathrm{tr}}{≔}\left\{{x}{=}{s}{}\sqrt{{r}}{,}{y}{=}{s}{}\sqrt{{1}{-}{r}}\right\}$ (5)

The transformation tr reduces the number of differentiation variables:

 > $\mathrm{L\text{'}}=\mathrm{dchange}\left(\mathrm{tr},L,\mathrm{simplify}\right)$
 ${\mathrm{L\text{'}}}{=}\left({f}{→}{-}{2}{}\sqrt{{r}}{}\sqrt{{1}{-}{r}}{}\left(\frac{{\partial }}{{\partial }{r}}{}{f}\right)\right)$ (6)

This example demonstrates the use of the differential operator d/dy alone:

 > $d\left[y\right]≔f→\frac{\partial }{\partial y}f$
 ${{d}}_{{y}}{≔}{f}{→}\frac{{\partial }}{{\partial }{y}}{}{f}$ (7)
 > $\mathrm{dchange}\left(\mathrm{tr},d\left[y\right],\mathrm{normal}\right)$
 ${f}{→}{-}\frac{\sqrt{{1}{-}{r}}{}\left({2}{}\left(\frac{{\partial }}{{\partial }{r}}{}{f}\right){}{r}{-}\left(\frac{{\partial }}{{\partial }{s}}{}{f}\right){}{s}\right)}{{s}}$ (8)

3. Confirm that the ordinary differential equation, $\mathrm{ODE}$,

 > $\mathrm{macro}\left(\mathrm{ys}=\mathrm{y*},\mathrm{xs}=\mathrm{x*}\right)$
 ${\mathrm{ys}}{,}{\mathrm{xs}}$ (9)
 > $\mathrm{ODE}≔\frac{-y\left(x\right)+x\mathrm{diff}\left(y\left(x\right),x\right)}{x+y\left(x\right)\mathrm{diff}\left(y\left(x\right),x\right)}=H\left(\mathrm{sqrt}\left({x}^{2}+{y\left(x\right)}^{2}\right)\right)$
 ${\mathrm{ODE}}{≔}\frac{{-}{y}{}\left({x}\right){+}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{x}{+}{y}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{=}{H}{}\left(\sqrt{{{x}}^{{2}}{+}{{y}{}\left({x}\right)}^{{2}}}\right)$ (10)

is invariant (the most general invariant first ODE) under the one-parameter rotation group of transformations

 > $\mathrm{tr}≔\left\{x=\mathrm{ys}\left(\mathrm{xs}\right)\mathrm{sin}\left(\mathrm{\alpha }\right)+\mathrm{xs}\mathrm{cos}\left(\mathrm{\alpha }\right),y\left(x\right)=\mathrm{cos}\left(\mathrm{\alpha }\right)\mathrm{ys}\left(\mathrm{xs}\right)-\mathrm{sin}\left(\mathrm{\alpha }\right)\mathrm{xs}\right\}:$
 > $\mathrm{itr}≔\mathrm{simplify}\left(\mathrm{solve}\left(\mathrm{tr},\left\{\mathrm{xs},\mathrm{ys}\left(\mathrm{xs}\right)\right\}\right),\mathrm{trig}\right)$
 ${\mathrm{itr}}{≔}\left\{{\mathrm{x*}}{=}{\mathrm{cos}}{}\left({\mathrm{\alpha }}\right){}{x}{-}{\mathrm{sin}}{}\left({\mathrm{\alpha }}\right){}{y}{}\left({x}\right){,}{\mathrm{y*}}{}\left({\mathrm{x*}}\right){=}{y}{}\left({x}\right){}{\mathrm{cos}}{}\left({\mathrm{\alpha }}\right){+}{\mathrm{sin}}{}\left({\mathrm{\alpha }}\right){}{x}\right\}$ (11)

The result of changing variables does not change the form of $\mathrm{ODE}$:

 > $\mathrm{go}≔\mathrm{dchange}\left(\mathrm{tr},\mathrm{ODE},\left[\mathrm{ys}\left(\mathrm{xs}\right),\mathrm{xs}\right],u↦\mathrm{simplify}\left(u,\mathrm{trig}\right)\right)$
 ${\mathrm{go}}{≔}\frac{\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{x*}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y*}}{}\left({\mathrm{x*}}\right)\right){}{\mathrm{x*}}{-}{\mathrm{y*}}{}\left({\mathrm{x*}}\right)}{{\mathrm{y*}}{}\left({\mathrm{x*}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{x*}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y*}}{}\left({\mathrm{x*}}\right)\right){+}{\mathrm{x*}}}{=}{H}{}\left(\sqrt{{{\mathrm{y*}}{}\left({\mathrm{x*}}\right)}^{{2}}{+}{{\mathrm{x*}}}^{{2}}}\right)$ (12)
 > $\mathrm{back}≔\mathrm{dchange}\left(\mathrm{itr},\mathrm{go},\left[x,y\left(x\right)\right],u↦\mathrm{simplify}\left(u,\mathrm{trig}\right)\right)$
 ${\mathrm{back}}{≔}\frac{{-}{y}{}\left({x}\right){+}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{x}{+}{y}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{=}{H}{}\left(\sqrt{{{x}}^{{2}}{+}{{y}{}\left({x}\right)}^{{2}}}\right)$ (13)

4. Maple can have a change of variables in integro-differential expressions:

 > $\mathrm{II}≔\mathrm{Int}\left(\mathrm{Int}\left(\mathrm{diff}\left(f\left(x,y\right),x\right)h\left({\left({x}^{2}+{y}^{2}\right)}^{\frac{1}{2}}\right),x=0..1\right),y=0..1\right)$
 ${\mathrm{II}}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{Int}}{}\left({\mathrm{Int}}{}\left(\left({\mathrm{diff}}{}\left({f}{}\left({x}{,}{y}\right){,}{x}\right)\right){}{h}{}\left(\sqrt{{{x}}^{{2}}{+}{{y}}^{{2}}}\right){,}{x}{=}{0}{..}{1}\right){,}{y}{=}{0}{..}{1}\right)\right]\right)$ (14)
 > $\mathrm{tr}≔\left\{x=s{r}^{\frac{1}{2}},y=s{\left(1-r\right)}^{\frac{1}{2}}\right\}:$
 > $\mathrm{dchange}\left(\mathrm{tr},\mathrm{II},\mathrm{simplify}\right)$
 ${-}\frac{\left({{\int }}_{{\mathrm{_α}}}^{{\mathrm{_β}}}\frac{{h}{}\left({s}\right){}\left|{s}\right|{}\left({{\int }}_{{{\mathrm{_l}}}_{{r}}{}\left({s}\right)}^{{{\mathrm{_u}}}_{{r}}{}\left({s}\right)}\frac{\sqrt{{r}}{}\left({2}{}\left(\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({r}{,}{s}\right)\right){}{r}{-}\left(\frac{{\partial }}{{\partial }{s}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({r}{,}{s}\right)\right){}{s}{-}{2}{}\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({r}{,}{s}\right)\right)}{\sqrt{\left|{r}\right|}{}\sqrt{\left|{-}{1}{+}{r}\right|}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{r}\right)}{{s}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{s}\right)}{{2}}$ (15)

5. Here the change of variables introduces elliptic integrals.

 > $\mathrm{PDE}≔\mathrm{sqrt}\left(1-{\mathrm{sin}\left(s\right)}^{2}{k}^{2}\right)\mathrm{diff}\left(f\left(u,v,r,s\right),s\right)=G\left(u,v,r,s\right)$
 ${\mathrm{PDE}}{≔}\sqrt{{1}{-}{{\mathrm{sin}}{}\left({s}\right)}^{{2}}{}{{k}}^{{2}}}{}\left(\frac{{\partial }}{{\partial }{s}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({u}{,}{v}{,}{r}{,}{s}\right)\right){=}{G}{}\left({u}{,}{v}{,}{r}{,}{s}\right)$ (16)

Below, w represents the elliptic integral of the first kind. The change of variables eliminates s and introduces w:

 > $\mathrm{itr}≔\left\{w=\mathrm{Int}\left(\frac{1}{\mathrm{sqrt}\left(1-{\mathrm{sin}\left(r\right)}^{2}{k}^{2}\right)},r=0..s\right)\right\}$
 ${\mathrm{itr}}{≔}\left\{{w}{=}{{\int }}_{{0}}^{{s}}\frac{{1}}{\sqrt{{1}{-}{{\mathrm{sin}}{}\left({r}\right)}^{{2}}{}{{k}}^{{2}}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{r}\right\}$ (17)

s is the amplitude of w:

 > $\mathrm{tr}≔\left\{s=\mathrm{am}\left(w\right)\right\}:$

Since the system does not know about 'am' (here the amplitude of the elliptic integral), the use of only tr leads to

 > $\mathrm{dchange}\left(\mathrm{tr},\mathrm{PDE},\left[w\right]\right)$
 $\frac{\sqrt{{1}{-}{{\mathrm{sin}}{}\left({\mathrm{am}}{}\left({w}\right)\right)}^{{2}}{}{{k}}^{{2}}}{}\left(\frac{{\partial }}{{\partial }{w}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({w}{,}{u}{,}{v}{,}{r}\right)\right)}{\frac{{ⅆ}}{{ⅆ}{w}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{am}}{}\left({w}\right)}{=}{G}{}\left({w}{,}{u}{,}{v}{,}{r}\right)$ (18)

whereas the additional indication of the inverse transformation, itr, significantly improves this result:

 > $\mathrm{dchange}\left(\mathrm{tr},\mathrm{PDE},\mathrm{itr},\mathrm{simplify}\right)$
 $\frac{{\partial }}{{\partial }{w}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({w}{,}{u}{,}{v}{,}{r}\right){=}{G}{}\left({w}{,}{u}{,}{v}{,}{r}\right)$ (19)