# Simplifying with restrictions on the whole expression

Suppose, for the sake of keeping things as simple as possible, that I have the following equation that I wish to simplify in Mathematica:

$$y = x x$$

But suppose further that I also have a restriction, not directly on $$x$$, but on what values $$y$$ can have. More specifically, let's suppose $$y \leq 9$$.

What Mathematica expression, if any, will allow me to simplify the above expression for $$y$$ and get an output that not only simplifies, but also gives me the range of values that $$x$$ can take to satisfy my restriction on $$y$$?

So, just to be clear, the function or script I am looking for will output something like the following when dealing with the above:

y = $$x^2$$ and $$-3\leq x\leq3$$

• Can you give an example of a simple right hand side $xx$? – bill s Nov 17 '18 at 10:27
• I literally mean x time x. That is just to provide the most basic case.If I see the procedure, I can most likely work on more difficult problems. – user120911 Nov 17 '18 at 11:16
• There is nothing to simplify in this your example. Maybe it is much too simple? Could you give a more complex one where some simplification can be done? – Alexei Boulbitch Nov 17 '18 at 15:53

You can use FunctionDomain:
FunctionDomain[{x^2, x^2<=9}, x]

Reduce[y == x x && y <= 9, y, Reals]