# How to find the domain of an arbitrary function?

I got stuck here:

fuu[x]:= 1/x +2x^2
Reduce[Exists[{x},fuu[x]],Reals]


of course it doesn't work like this. How can i check if there will be divided by zero or if i will get a radical of a negative number? when i don't know how the function will look like? How do i ask if a function is a factorial, radical? Unfortunately i am not able to use Mathematica 10 and the following way does not work in Mathematica 9, which i am using.

FunctionDomain[x + x/(x (x^2 - 1)), x]
(* Out: x < -1 || -1 < x < 1 || x > 1 *)

FunctionRange[x/(x (x^2 - 1)), x, y]
(* Out: y <= -1 || y > 0 *)


## 1 Answer

One way to find the domain could be

Reduce[Exists[{y}, Element[x, Reals] && y == 1/x + 2 x^2, Element[y, Reals]]]


x < 0 || x > 0

Reduce[Exists[{y}, Element[x, Reals] && y == 1 x + x/(x (x^2 - 1)), Element[y, Reals]]]


x < -1 || -1 < x < 1 || x > 1

• That helped a lot. :D Thanks. :3 Jun 1, 2015 at 16:21
• it's not working for (x^2 + 4 x + 4)/(x^2 - 4) Jun 13, 2015 at 22:00
• @sudo_math it gives x < 2 || x > 2 which is correct, isn't it? Jun 14, 2015 at 11:01
• No its (x^2 + 4 x + 4)/(x-2)(x+2) so gaps should be -2 and 2 Jun 15, 2015 at 14:51