Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using built-in transformations does not work #6

Open
divenex opened this issue Mar 16, 2021 · 1 comment
Open

Using built-in transformations does not work #6

divenex opened this issue Mar 16, 2021 · 1 comment

Comments

@divenex
Copy link

divenex commented Mar 16, 2021

The simple examples provided on StackOverflow using built-in transformations do not work (in Mathematica 12.2).

DChange[D[f[x, y], x, x] + D[f[x, y], y, y] == 0, 
     "Cartesian" -> "Polar", {x, y}, {r, th}, f[x, y]]

Generate a series of error messages starting with

Solve::nsmet: This system cannot be solved with the methods available to Solve.

DChange::ambTrans: Transformation rule is ambiguous. The first of found solutions is used:

    r==Sqrt[x^2+y^2]
    th==ArcTan[x,y]

Please add appropriate assumptions if this solution does not meet your expectations.
...
@cklausme
Copy link

cklausme commented Mar 28, 2021

I ran into the same problem this morning, so I spent some time trying to figure out what's wrong. Here's some info that @kubaPod might find useful in fixing this:

The problem seems to stem from a change in v12.2 in how Solve handles Assumptions.

Specifically, the automatic assumptions x \[Element] Reals && y \[Element] Reals that arise from CoordinateChartData[{"Cartesian", 2}, "CoordinateRangeAssumptions", {x, y}] in the CoordinateTransformData version of DChange causes the oldVarsRules = Solve[transformations, oldVars]; in the main version of DChange to fail in 12.2.

You'll probably have a better idea how to fix this, but I tried replacing

MapThread[CoordinateChartData[{#, dim}, "CoordinateRangeAssumptions", #2] &, {List @@ coordinates, {oldVars, newVars}}]

with

CoordinateChartData[{(List @@ coordinates)[[2]], dim}, "CoordinateRangeAssumptions", newVars]

and it seemed to work without breaking any of the other examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants