#### 7.30 bug in [detools,dchangevar] in maple v.4 (8.9.97)

##### 7.30.1 Georges Thomas
> with(DEtools,Dchangevar):
> de := 'diff'(sin(x)*diff(f(x),x),x)/sin(x) ;
> collect(simplify(Dchangevar({x = arccos(y), f(x)=F(y)}, de, x,y)),diff) ;



         -y*diff(F(y),y)  + (1-y^2)*diff(F(y),y$2) ;  I expected:  -2*y*diff(F(y),y)+ (1-y^2)*diff(F(y),y$2) ;



> de := diff(y(x),x$2) = y(x)*diff(y(x),x)/x ; > Dchangevar({x=exp(t),y(x)=Y(t)},de,x,t) ;  Maple answers, after some simplication:  diff(Y(t),t$2) = Y(t)*diff(Y(t),t) ;



             diff(Y(t),t\$2) = (Y(t)+1)*diff(Y(t),t) ;



It seems that Dchangevar mistakes if the order of the diﬀerential equation is >=2 and if the change of variable is not linear.

Is there a bug in Maple or in my mind?

The bug is removed in Maple V Release 5. (U. Klein)

##### 7.30.2 Edgardo S. Cheb-Terrab (9.9.97)

As an alternative, you can use PDEtools[dchange], which is able to perform non-linear changes of variables and also in PDEs. In your example,

> de := 'diff'(sin(x)*diff(f(x),x),x)/sin(x) ;
> tr := {x = arccos(y), f(x)=F(y)};

tr := {x = arccos(y), f(x) = F(y)}

> normal(dchange(tr,de));

/ 2      \                      / 2      \
|d       |  2     /d      \     |d       |
-|--- F(y)| y  - 2 |-- F(y)| y + |--- F(y)|
|  2     |        \dy     /     |  2     |
\dy      /                      \dy      /



PDEtools is a package distributed in the Share Library of Maple R4. The last version of PDEtools is found at

or

##### 7.30.3 Preben Alsholm (10.9.97)

I get the same as you do! There must be a bug in Dchangevar.

##### 7.30.4 Juergen Boehm (11.9.97)

I checked the variable transformation with a procedure of my own ( vsubs ) and could conﬁrm the supposed results of G. Thomas and also reproduce the wrong answers that Dchangevar gave :

> vsubs([y],[x=arccos(y)],[f(x)=F(y)],diff(sin(x)*diff(f(x),x),x)/sin(x));

/
|
|                      2 1/2 /d      \
|-cos(arccos(y)) (1 - y )    |-- F(y)| -
|                            \dy     /
\

//d      \                           \
||-- F(y)| y               / 2      \|
2 1/2 |\dy     /           2 1/2 |d       ||
sin(arccos(y)) (1 - y )    |----------- - (1 - y )    |--- F(y)||
|      2 1/2               |  2     ||
\(1 - y )                  \dy      //

\
|
|
|/sin(arccos(y))
|
/

> simplify(%);

/ 2      \                      / 2      \
|d       |  2     /d      \     |d       |
-|--- F(y)| y  - 2 |-- F(y)| y + |--- F(y)|
|  2     |        \dy     /     |  2     |
\dy      /                      \dy      /

> with(DEtools,Dchangevar);

[Dchangevar]

> Dchangevar({x=arccos(y),f(x)=F(y)},diff(sin(x)*diff(f(x),x),x)/sin(x),x,y);

/
|                      2 1/2 /d      \
|-cos(arccos(y)) (1 - y )    |-- F(y)|
|                            \dy     /
\

/ 2      \\
2  |d       ||
+ sin(arccos(y)) (1 - y ) |--- F(y)||/sin(arccos(y))
|  2     ||
\dy      //

> simplify(%);

/ 2      \   / 2      \
/d      \     |d       |   |d       |  2
-|-- F(y)| y + |--- F(y)| - |--- F(y)| y
\dy     /     |  2     |   |  2     |
\dy      /   \dy      /

> vsubs([t],[x=exp(t)],[y(x)=Y(t)],diff(y(x),x,x)-y(x)*diff(y(x),x)/x);

/                             / 2      \\
|         /d      \           |d       ||
exp(-t) |-exp(-t) |-- Y(t)| + exp(-t) |--- Y(t)||
|         \dt     /           |  2     ||
\                             \dt      //

/d      \
Y(t) exp(-t) |-- Y(t)|
\dt     /
- ----------------------
exp(t)

> simplify(%);

/ 2      \
/d      \             |d       |
-exp(-2 t) |-- Y(t)| + exp(-2 t) |--- Y(t)|
\dt     /             |  2     |
\dt      /

/d      \
- Y(t) |-- Y(t)| exp(-2 t)
\dt     /

> Dchangevar({x=exp(t),y(x)=Y(t)},diff(y(x),x,x)-y(x)*diff(y(x),x)/x,x,t);
>

2
d
--- Y(t)        /d      \
2        Y(t) |-- Y(t)|
dt              \dt     /
-------- - --------------
2             2
exp(t)        exp(t)



##### 7.30.5 Yuri Muzychka (12.9.97)

I have noticed the bug in DEtools a long time ago. I had sent Maple a worksheet summarizing where the bug occurs, but never received any follow up.

If I recall, what I had observed was that DEtools did not know how to apply the chain rule properly.

I discovered this while trying to get maple to perform the same set of calculations I had done on paper. Had the change of variable worked properly, I would have reduced my ODE to one which has the hypergeometric function as a solution. Otherwise, Maple could not solve it. I was trying to reproduce some work I had found in a paper I was using for my research.