4
$\begingroup$

I have a constraint equation $ E(x,y) >0 $. I can plot the region satisfying this in $ (x,y) $ plane. I want to change the parameters $(x,y)$ to $ m(x,y) $ and $n(x,y)$, s.t., $m(x,y) $ and $n(x,y)$ are nonlinear in $x$ and $y$, and want plot the region in $(m,n)$ plane.

A typical example of functions $ E(x,y), m(x,y), n(x,y)$:

$ E(x,y) = 7 x^2 Sin(x y) - xy $

$ m(x,y) = (x^2 y +y^3) $

$ n(x,y) = (x^2 + (x\cdot y)^{1/2}) $

Can I do it in Mathematica? I have cooked up the above example. You may consider any convenient case to illustrate the concept.

PS: Mathematica Code

EFun[x_, y_] = 7 x^2  Sin[x y] -  x y


RegionPlot[ EFun[x, y] > 0, {x, 1 E - 4, 100}, {y, 1 E - 4, 100}, PlotPoints -> 4, MaxRecursion -> 4]


m[x_, y_] = x^2 y + y^3


n[x_, y_] = x^2 + (x*y)^(1/2)
$\endgroup$
0

1 Answer 1

4
$\begingroup$
EFun[x_, y_] = 7 x^2 Sin[x y] - x y;
m[x_, y_] = x^2 y + y^3;
n[x_, y_] = x^2 + Sqrt[x y];

Invert the relationship between $(x,y)$ and $(m,n)$: this works well for polynomial relationships,

getxy[mm_?NumericQ, nn_?NumericQ] :=
  {x,y} /. Solve[m[x,y]==mm && n[x,y]==nn && x>=0 && y>=0, {x,y}, Reals]

assemble a criterion: not sure if And or Or is required here when several solutions are found for $(x,y)$,

crit[mm_?NumericQ, nn_?NumericQ] := 
  And @@ Thread[EFun @@@ getxy[mm, nn] > 0]

make a region plot:

RegionPlot[crit[mm, nn], {mm, 0, 100}, {nn, 0, 20}]

enter image description here

Alternatively, you can try an analytic inversion:

crit[mm_, nn_] = EFun[x, y] > 0 /. 
  First[Solve[m[x, y] == mm && n[x, y] == nn, {x, y}, Reals]];

This is a bit more tricky though, as it may be difficult to ascertain in general that the first result of Solve is indeed the correct branch of the solutions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.