\problemdata
{S00 ps1}
{proof}
{logic}

\begin{problem} Suppose $x$ is a real number.  Prove \textbf{by cases} that there is a
real $y$ such that $\frac{y+1}{y-2}=x$ if and only if $x \ne 1$.

\solution{
We consider the cases $x \neq 1$ and $x = 1$ separately. 
\begin{description}

\item[Case 1 ($x \not = 1$): ]
We need to prove that there exists $y \in \mathbb{R}$ such that
$\frac{y+1}{y-2}=x$.  In particular, consider $y = \frac{2x+1}{x-1}$ (derived
by algebraic manipulation), which is a well-defined real number because $x \neq
1$.  Then:  
\[\frac{y+1}{y-2} 
        = \frac{\frac{2x+1}{x-1}+1}{\;\frac{2x+1}{x-1}-2\;} 
        = \frac{\frac{2x+1 + (x-1)}{x-1}}{\;\frac{2x+1-2(x-1)}{x-1}\;}
        = \frac{\frac{3x}{x-1}}{\;\frac{2x+1-2x+2}{x-1}\;}
        = \frac{3x}{3}
        = x
\]
Therefore, by existential generalization, $\exists y \in \mathbb{R}$ such that
$\frac{y+1}{y-2} = x.$

\item[Case 2 ($x = 1$): ]
We need to prove that no $y \in \mathbb{R}$ exists 
such that $\frac{y+1}{y-2}=x$. 
Suppose, for contradiction, that such a $y$ did exist.  Then:
\begin{align*}
\frac{y+1}{y-2} = x 
        &\Longleftrightarrow \;\; \frac{y+1}{y-2} = 1 
                & \text{(because $x = 1$)} \\
        &\:\Longrightarrow \;\; y+1 = y-2 
                & \text{(multiply both sides by $y-2$)} \\
        &\Longleftrightarrow \;\; 1 = -2 
                & \text{(subtract $y$ from both sides)} \\
        &\Longleftrightarrow \;\; \text{false.}
\end{align*}
Therefore our supposition is wrong, 
and there is no $y$ such that $\frac{y+1}{y-2}=x$. 

\end{description}
}
\end{problem}
