Change coordinate systems for substitutions

Still being a newbie to Maple, I am stuck on this one. I am trying to create a general system of changing my equations in an [x,y] coordinate system to a [u,v] system.
As a specific example: I have two substitution equations, u=2x-3y and v=-x+y. I have four equations: x=0, x=-3, y=x, y=x+1. I have tried MapToBasis with both static and procedure statements and I am not having any luck. The equations do not completely change to [u,v]. Here is one example:

> proc (u, v) u = 2*x-3*y end proc;
> proc (u, v) v = -x+y end proc;
> with*VectorCalculus;
> SetCoordinates('cartesian', [u, v]);
> proc (x, y) x = -3 end proc;
> proc (x, y) y = x+1 end proc;
> MapToBasis(x, y, [u, v]);
MapToBasis(-3, y, [-6 - 3 y, 3 + y])
> u[1];
(-6 - 3 y)[1]
> proc (x, y) x = 0 end proc;
> proc (x, y) y = x end proc;
> MapToBasis(x, y, [u, v]);
MapToBasis(-3, y, [-6 - 3 y, 3 + y])
> u[1];
(-6 - 3 y)[1]

As you can see, u is still in terms of y and not v.

Any suggestions would be appreciated.

Thanks.

one approach

Possibly you want to do the following:

uv2xy := {u=2*x-3*y, v=-x+y}:
eqs_xy := [x=0, x=-3, y=x, y=x+1];
# solve for transformation equations
xy2uv := solve(uv2xy, {x,y}):
# transform equations
eqs_uv := eval(eqs_xy, xy2uv);
# collect u and v
map(eq -> collect((lhs-rhs)(eq), [u,v])=0, eqs_uv);
              [-u - 3 v = 0, -u - 3 v + 3 = 0, v = 0, v - 1 = 0]

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}