2
$\begingroup$

I have a function f[t,x,y]= x^2 y^2 t^(-2) Exp[(y/t)]^-1 and I want a data list of the variables x vs. y that satisfy f[t,x,y]>1, so that I can draw a boundary line that distinguishes between those two regions (f[t,x,y]>1 and f[t,x,y]<1). The first variable t can be chosen arbitrarily. How shall I proceed?

$\endgroup$

3 Answers 3

3
$\begingroup$
Clear[f, t];
f[t_, x_, y_] = x^2 y^2 t^(-2) Exp[(y/t)]^-1;
t = 1;
ContourPlot[f[t, x, y], {x, -5, 5}, {y, -5, 5}, Contours -> {1}, 
 ContourStyle -> {AbsoluteThickness[2], Red}, 
 ContourShading -> {LightGreen, LightBlue}, PlotPoints -> 50, 
 MaxRecursion -> 2, PlotRange -> All, PlotLegends -> Automatic]

enter image description here

$\endgroup$
3
$\begingroup$

As t can be chosen arbitrarily, we set it simply to one. Then the function simplifies to:

f[x_, y_] = x^2 y^2  Exp[(y)]^-1

The boundary between f>1 and f<1 can be obtained by:

ContourPlot[f[x, y] == 1, {x, -1, 1}, {y, -5, 0}]

output of contourplot: a function with a downward pointing cusp

Or using RegionPlot:

RegionPlot[
  {f[x, y] < 1, f[x, y] == 1, f[x, y] > 1},
  {x, -1, 1}, {y, -5, 0}, MaxRecursion -> 7
]

![similar plot, but colorized

$\endgroup$
5
  • $\begingroup$ If I have to vary t then how should I do it? $\endgroup$
    – Not_Today
    Jul 13, 2022 at 4:35
  • $\begingroup$ Simply introduce t again as a parameter. $\endgroup$ Jul 13, 2022 at 7:53
  • $\begingroup$ But a function with three variables in either ContourPlot or RegionPlot do't work. $\endgroup$
    – Not_Today
    Jul 13, 2022 at 8:33
  • $\begingroup$ I said "as parameter", not as argument. To plot t must have a numerical value that you can insert in the definition of f. $\endgroup$ Jul 13, 2022 at 8:35
  • $\begingroup$ I tried to generate random numbers for each vairables and then solved the function. Then I used ListContourPlot with RegionFunction -> Function[{x, y, z}, z > 1]. I does look a bit somthing I wanted earlier. $\endgroup$
    – Not_Today
    Jul 13, 2022 at 8:36
0
$\begingroup$
With[
{
     reg=ImplicitRegion[x^2 y^2 t^(-2) Exp[(y/t)]^-1<1,{x,y,t}]
}
,RegionPlot3D[reg]
]

enter image description here

$\endgroup$

Your Answer

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

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