# Solving for $x$ in terms of $y$

For some reason, I'm having a hard time solving for $x$ in this equation: $$x^2=y,-2\lt x \lt 3.$$ I could use some help. Thanks.

-

Without the constraint $-2 < x <3$, the solution to $x^2 = y$ is given by $x = \sqrt{y} \text{ or } - \sqrt{y}$ whenever $y \geq 0$. The constraint $-2 < x <3$ demands that $\sqrt{y} \in [0,3)$ and $-\sqrt{y} \in (-2,0]$. Hence, this translates into $y \in [0,9)$ and $y \in [0,4)$ respectively.

Hence, we now need to split this into cases.

First we need $y \geq 0$. Else there are no solutions. Hence, we assume $y \geq 0$.

Next, if $y < 4$, then $x = \sqrt{y}$ or $x = -\sqrt{y}$. Note that since $y <4$, we have that $\pm \sqrt{y} \in (-2,3)$.

Next, if $4 \leq y < 9$, then $x = \sqrt{y}$. This is so since $-\sqrt{y} < -2$ whenever $4 \leq y < 9$. But $\sqrt{y} \in [2,3) \subset (-2,3)$, since $4 \leq y < 9$.

If $y \geq 9$, then $\sqrt{y} \geq 3$ and $-\sqrt{y} \leq -3$. Hence, no solution.

Hence, to summarize $$x = \begin{cases} \text{No solution} & \text{ if }y<0\\ \sqrt{y} \text{ or } -\sqrt{y}& \text{ if }0 \leq y < 4\\ \sqrt{y} & \text{ if }4 \leq y < 9\\ \text{No solution} & \text{ if } y \geq 9 \end{cases}$$

-
thanks. a couple of questions. how do you know to suppose $y\lt 4$ and how does that imply that $x=\pm \sqrt{y}$. A similar question for $4\le y \lt 9$. – count Jun 4 '12 at 16:59
@count I have added some motivation at the beginning of the post. – user17762 Jun 4 '12 at 17:37
Thanks. the motivation certainly helped! :) – count Jun 4 '12 at 18:07

First thing one notices in such cases is that when $y=x^2$ means $y$ cannot be negative. So we'll keep in mind that $y \geq 0$.

Since $-2 <x< 3$ then we have $4<x^2<9$ and $4<y<9$. In this case, $y=x^2$ and $x= \pm \sqrt y$ conclusively.

But what will happen When $0 \leq y <4$ or $y \geq 9$?

$0 \leq y <4 \implies 0 \leq x^2 <4 \implies -2<x<2$ which is a subset of $-3<x<2$ therefore $x= \pm \sqrt y$.

$y \geq 9\implies x^2 \geq 9 \implies x \geq 3$ and since it has no intersection with $-3<x<2$, there is no solution.

Finally,

$$x=\pm \sqrt y, 0 \leq y <9$$

-