Question: PDEtools:-Solve causes name collison

Hello all,

     When using maple's differential equation solvers (dsolve or pdsolve), solutions will often have undetermined constants (or functions) _C1, _F2(x), _F5(t,x), etc. These are automatically generated and could potentially cause name collisions. I've found that passing names as part of the solver's ranking prevents this. For instance

D[1,1](y)(t,x) + y(t,x) = 0:
pdsolve(%);

would return y(t,x) = _F1(x)*cos(t) + _F2(x)*sin(t). However, if _F1(x,z) is defined elsewhere, then passing

D[1,1](y)(t,x) + y(t,x) = 0:
pdsolve(%, {y(t,x), _F1(x,z), _F2(x,z)});

instead returns y(t,x) = _F3(x)*cos(t) + _F4(x)*sin(t), preventing a collision.

However, it seems that PDEtools:-Solve doesn't follow this same convention. Indeed, calling PDEtools:-Solve(%, {y(t,x), _F1(x,z), _F2(x,z)}) on the above system returns y(t,x) = _F1(x)*cos(t) + _F2(x)*sin(t).

In all fairness, this is only a problem since my "colliding" functions are actually different functions: they differ in their arguments. When the arguments are the same (for instance, passing {y(t,x), _F1(x), _F2(x)} to Solve) then no collision occurs.

Nevertheless, having two different functions with the same name is causing problems for my code (later invocations of Solve with both _F1(x) and _F1(x,z) causes an "found functions with same name" error).

Is there any trick to avoid this behavior?

Thanks!

Please Wait...