# How to find the values of $m$ so $A \cap B = \emptyset$ and $A \cup B = (-3,+\infty)$?

I have two intervals $A = (-3, m^2- 2]$ and $B=[m, +\infty)$. How to find the values of $m$ so that $A \cap B = \emptyset$ and $A \cup B = (-3,+\infty)$? I tried

{a = x > -3 && x < m^2 - 2, b = x >= m} {Reduce[a || b]}


and

{a = x > -3 && x < m^2 - 2, b = x >= m}
{Reduce[a && b]}


We have $A \cap B = \emptyset$ when and only when $$\begin{cases} m^2 - 2 > -3&\\ m^2 - 2 <m. \end{cases}$$ and $A \cup B = (-3,+\infty)$ when and only when $$\begin{cases} m^2 - 2 > -3&\\ m^2 - 2 \geqslant m. \end{cases}$$ Therefore we need to solve two systems of inequalities.

-
Two systems of inequalities to be solved at the same time are just one system consisting of all the inequalities from the two systems. – celtschk Oct 20 '12 at 7:32
Because each of $A$ and $B$ is relatively closed in $A\cup B$ and $A\cup B$ is connected, the only possible solutions would be when either $A$ or $B$ is empty. (It would be interesting to find ways to get Mathematica to perform such forms of topological reasoning.) – whuber Oct 20 '12 at 17:21
Why do you wrap your commands in { }? – Sjoerd C. de Vries Oct 20 '12 at 19:25

Reduce[m^2 - 2 > -3 && m^2 - 2 < m && m^2 - 2 > -3 && m^2 - 2 >= m, m]