I want to get and plot the domain of the following function with mathematica : $$Arccos(xy)$$
Any idea ?
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]
Plot3D[f[x, y], {x, -5, 5}, {y, -5, 5},
ViewPoint -> {0, 0, Infinity},
AxesLabel -> Automatic]
ContourPlot[x*y, {x, -5, 5}, {y, -5, 5},
Contours -> {-1, 1},
ContourShading -> {White, LightBlue},
FrameLabel -> Automatic]
DensityPlot[f[x, y], {x, -5, 5}, {y, -5, 5},
FrameLabel -> Automatic]
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) *)
FunctionDomain
as inFunctionDomain[ArcCos[x*y], {x, y}, Reals]
$\endgroup$