I'm very concerned. As far as I know, the output should be:

$x < 0\ ||\ x> 0$

$y < 0\ ||\ y> 0$

the code

  • $\begingroup$ Welcome to Mathematica S.E. To start: 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, since the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) consider accepting the answer, if any, that solves your problem, by clicking checkmark sign, 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bmf
    Feb 24, 2023 at 9:15

1 Answer 1


Observe that




So, when you write

FunctionDomain[g[x], x, Reals]

it is really writing

FunctionDomain[x, x, Reals]

On way to bypass, is to Hold like so:

FunctionDomain[Hold[x^2/x], x, Reals]
FunctionRange[Hold[x^2/x], x, y, Reals]
  • $\begingroup$ I see, thanks a lot! But is there a way to pass a variable or a function that contains the expression and get the correct result? $\endgroup$ Feb 24, 2023 at 10:29
  • $\begingroup$ @AndreyLeshchev-Romanenko I guess you could do something like: g[x_] := x^2/x // Hold and then FunctionDomain[g[x], x, Reals] but I am not sure how satisfactory that is for your purposes $\endgroup$
    – bmf
    Feb 24, 2023 at 10:35
  • $\begingroup$ yeah, that's exactly what I need for now. Thank you! $\endgroup$ Feb 24, 2023 at 10:36
  • $\begingroup$ @AndreyLeshchev-Romanenko glad I was able to help :-) $\endgroup$
    – bmf
    Feb 24, 2023 at 10:37

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.