0
$\begingroup$

I want to get and plot the domain of the following function with mathematica : $$Arccos(xy)$$

Any idea ?

$\endgroup$
2
  • 3
    $\begingroup$ You might want to look at FunctionDomain as in FunctionDomain[ArcCos[x*y], {x, y}, Reals] $\endgroup$
    – Nasser
    Sep 5 '21 at 22:14
  • $\begingroup$ how solve the inequality $-1<=xy<=1$. I know that the domain is between the two hyperbole (1/x and -1/x) but I dont understand how we find this $\endgroup$
    – ZchGarinch
    Sep 5 '21 at 22:28
3
$\begingroup$
Clear["Global`*"]

f[x_, y_] = ArcCos[x*y];

fd = FunctionDomain[f[x, y], {x, y}, Reals]

(* -1 <= x y <= 1 *)

RegionPlot[fd, {x, -5, 5}, {y, -5, 5},
 PlotPoints -> 50,
 MaxRecursion -> 5,
 FrameLabel -> Automatic]

enter image description here

Plot3D[f[x, y], {x, -5, 5}, {y, -5, 5},
 ViewPoint -> {0, 0, Infinity},
 AxesLabel -> Automatic]

enter image description here

ContourPlot[x*y, {x, -5, 5}, {y, -5, 5},
 Contours -> {-1, 1},
 ContourShading -> {White, LightBlue},
 FrameLabel -> Automatic]

enter image description here

DensityPlot[f[x, y], {x, -5, 5}, {y, -5, 5},
 FrameLabel -> Automatic]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you for your help. Great answer ! $\endgroup$
    – ZchGarinch
    Sep 6 '21 at 8:39
0
$\begingroup$

Reduce also does the job.

Clear["Global`*"]

f[x_, y_] = ArcCos[x*y];

red = Reduce[f[x, y] \[Element] Reals, {x, y}, Reals]

RegionPlot[red, {x, -5, 5}, {y, -5, 5}, PlotPoints -> 50, 
    MaxRecursion -> 5, FrameLabel -> Automatic]

(*   (x < 0 && 1/x <= y <= -(1/x)) || 
      x == 0 || 
     (x > 0 && -(1/x) <= y <= 1/x)   *)
$\endgroup$

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