\section{Sets and Coordinates}

\begin{enumerate}[1.]


\item {\it 
Decide whether each of the sets below is open, closed, or neither.}

\begin{enumerate}
\item $\{(x,y)\in{\mathbb R}^2:\ 0\leq x<1,\ 0\leq y<2\}$ -- neither

\item $\{(x,y)\in{\mathbb R}^2:\ x+y<2\}$ -- open

\item $\{(x,y)\in{\mathbb R}^2:\ 0<\sqrt{x^2+y^2}\leq 3\}$ -- neither open nor closed
\item $\{(x,y,z)\in{\mathbb R}^3:\ |x|\geq 6\}$ -- closed
\end{enumerate}


\bigskip

\item  {\it The following conditions describe sets in $\rr^3$. 
Are these sets open, closed, or neither? 
Specify the boundary of each set.}

\medskip

\begin{enumerate}

\item $x^2+y^2+z^2\geq 16$: The boundary is the sphere $x^2+y^2+z^2=16$. Since this sphere is included in $S$, the set is closed.
\medskip

\item $x^2+y^2\geq 4$, $z\geq 0$: This is the set above the plane $z=0$ and on the outside of the cylinder $x^2+y^2=4$, with
boundary included. The boundary is the union of the cylindrical surface $\{(x,y,z):\  x^2+y^2=4$, $z\geq 0\}$, and the set $x^2+y^2\geq 4$ in the plane $z=0$. This set is closed.


\medskip


\item $0<x<1$, $0<y<1$, $z=1$. This is the unit square in the plane $z=1$, without the edges. The boundary is the 
closed square $\{(x,y,z):\ 0\leq x\leq 1$, $0\leq y\leq 1$, $z=1\}$. This set is neither closed nor open.
\medskip


\item $0<\sqrt{x^2+y^2}\leq 3$:
The set is neither open nor closed. The
boundary consists of the cylinder $\sqrt{x^2+y^2}= 3$ (included in the set) and the line $x=y=0$ in $\rr^3$ (not included in it).

\medskip

\item $ x\geq 0, \ x^2+y^2+z^2\geq 4$:
The set is closed. 
The
boundary consists of the half-sphere $x\geq 0, \ x^2+y^2+z^2=4$, and
the set $x= 0, \ y^2+z^2\geq 4$.

\medskip




\item $x> 0, \ 0\leq y\leq 4$:
The set is neither open nor closed. 
The boundary is
$$
\{(x,y,z)\in{\mathbb R}^3:\ x>0,\ y=0 \}\cup \{(x,y,z)\in{\mathbb R}^3:\ x>0.\ y=4 \}$$
$$\cup \{(x,y,z)\in{\mathbb R}^3:\ x=0,\ 0\leq y\leq 4\}.
$$




\end{enumerate}



\bigskip



\item {\it 
Prove directly from the definition that the set $S=\{(x,y,z)\in\rr^3:\  x^2+y^2< 4\}$ is an open set
in $\rr^3$. (Given a point $P=(x,y,z)\in S$, find a neigbourhood of $P$ which is contained in $S$.)}


\smallskip

Let $P=(x,y,z)\in S$. By the definition of $S$, we have $x^2+y^2<4$, so that if we choose $\varepsilon=2-\sqrt{x^2+y^2}$
then $\varepsilon>0$. We claim that $B_\varepsilon(P)\subset S$. To see this, let $Q=(a,b,c)\in B_\varepsilon(P)$. Let $P',Q'$ be the projections of $P,Q$ onto the $xy$-plane, respectively. That is, let $P'=(x,y,0)$ and $Q'=(a,b,0)$. Then $|PQ|<\varepsilon$ by construction and thus
\begin{align*}
|P'Q'| & = \sqrt{(x-a)^2 + (y-b)^2}\\
& \le \sqrt{(x-a)^2 + (y-b)^2 + (z-c)^2}\\
& = |PQ|\\
& < \varepsilon.
\end{align*}
By the triangle inequality, $|OQ'| \le |OP'| + |P'Q'|$, where $O=(0,0,0)$ denotes the origin. This yields 
\begin{align*}
\sqrt{a^2 + b^2} & \le \sqrt{x^2 + y^2} + |P'Q'|\\
& < \sqrt{x^2 + y^2} + \varepsilon\\
& = 2.
\end{align*}
This is equivalent to $a^2 + b^2 < 4$, which shows that $Q\in S$, as required.

\bigskip


\item{\it 
Let $S'=\{(x,y,z)\in\rr^3:\ x^2+y^2<4 ,\ z\geq 0\}$. Is $S'$ an open set in $\rr^3$? Is it closed? Prove your answers (again, using points and neighbourhoods).}

\smallskip

$S'$ is not an open set. For example, $P=(0,0,0)$ belongs to $S'$, but has no neighbourhood contained in $S'$. To check that last part, let $B_r(P)$ be any neighbourhood of $P$ in $\rr^3$. Then $B_r(P)$ contains the point $Q=(0,0,-r/2)$, but $Q\not\in S'$ since the $z$-coordinate of $Q$ is negative.

$S'$ is not a closed set, either. For this we must show that its complement $(S')^c$ is not open. Let $\tilde{P}=(2,0,0)$. Then $\tilde{P}\in(S')^c$, but there is no neighbourhood of $\tilde{P}$ contained in $(S')^c$. To see this, let $B_r(\tilde{P})$ be any neighbourhood of $\tilde{P}$ in $\rr^3$. Then $B_r(\tilde{P})$ contains the point $\tilde{Q}=(2-\frac{\min(r,4)}{2},0,0)$, but $\tilde{Q}\notin (S')^c$ since $\tilde{Q}\in S'$.
%

\bigskip


\item {\it 
Prove directly from the definition that the set $S=\{(x,y)\in\rr^2:\  x+y>0\}$ is an open set
in $\rr^2$. (Given a point $P=(x,y)\in S$, find an $r>0$ such that the neigbourhood $B_r(P)$ is contained in $S$.)
}

\smallskip

Let $P=(x,y)\in S$, and choose $r=(x+y)/2$. By the definition of $S$, we have $x+y>0$, so that $r>0$. We claim that $B_r(P)\subset S$. To see this, let $Q=(x',y')\in B_r(P)$. Then 
$$
|PQ|=\sqrt{(x-x')^2 + (y-y')^2}<r,
$$
so that
$$
|x'-x|\leq |PQ|<r=\frac{x+y}{2},\ \ |y'-y|\leq |PQ|<r=\frac{x+y}{2}.
$$
In particular, $x'-x> -\frac{x+y}{2}$ and $y'-y>-\frac{x+y}{2}$, so that
\begin{align*}
x'+y' & = (x+y) + (x'-x) + (y'-y)\\
&> (x+y) - \frac{x+y}{2} - \frac{x+y}{2}
\\
&=0.
\end{align*}
Therefore $Q\in S$. Since $Q\in B_r(P)$ was arbitrary, we have $B_r(P)\subset S$, as claimed.

\bigskip



\item {\it
Let $S'=\{(x,y)\in\rr^2:\ x+y>0 ,\ x-y\leq 0\}$. Is $S'$ an open set in $\rr^2$?  Prove your answer (again, using points and neighbourhoods).
}

\begin{figure}[H]
\centering
\includegraphics[width=.5\textwidth]{11fig1prob.png}
\caption{The region $S'$ as well as a few points of $S'$ (in blue) with associated neighbourhoods. The red $X$ is reminding you that the boundary is \textit{not} included in the set!}
\end{figure}


\smallskip

$S'$ is not an open set. For example, $P=(1,1)$ belongs to $S'$ since $1+1=2>0$ and $1-1=0$. However, $P$ has no neighbourhood contained in $S'$. To check that last part, let $B_r(P)$ be any neighbourhood of $P$ in $\rr^2$. Then $B_r(P)$ contains the point $Q=(1,1-r/2)$, but $Q\not\in S'$ since $1-(1-r/2)= r/2 >0$.


\bigskip



\item {\it 
Let $S=\{(x,y)\in\rr^2:\ |x|\leq 1,\ |y|<1\}$. Prove directly from the definition (again, using points and neighbourhoods) that $S$ is {\bf not} a closed set in $\rr^2$.}


\smallskip



To prove that $S$ is not closed, we need to prove that its complement $S^c$ is not open. 
We have
$$S^c=\{(x,y)\in\rr^2:\ |x|> 1\hbox{ or }\ |y|\geq 1\}.$$
Let $P=(0,1)$. Then $P\in S^c$. We need to prove that the open set condition for $S^c$ fails at $P$; in other words, that there is no neighbourhood of $P$ contained in $(S')^c$. To see this, let $B_r({P})$ be any neighbourhood of ${P}$ in $\rr^2$. Then $B_r({P})$ contains the point $Q=(0,1-\frac{r}{2})$, but ${Q}\notin S^c$ since ${Q}\in S$.




\bigskip

\item{ {\it Prove from the definition that the set $S:= \{(x,y) : x^2 + 4y^2 < 1 \}$ is open in $\mathbb{R}^2$.  As above, this means: for each point $P \in S$, find an $r > 0$ such that $B_r (P) \subset S$.}

\begin{figure}[H]
\centering
\includegraphics[width=.6\textwidth]{11fig2prob.png}
\caption{The region $S$ is an ellipse.   Included in the picture are a few points of $S$ (in blue) with associated neighbourhoods. The red $X$ is reminding you that the boundary is \textit{not} included in the set!}
\end{figure}

\medskip

The set $S$ is the region enclosed by an ellipse with centre at the origin.  The ellipse $S$ has major axis in the horizontal direction with length $1$; its minor axis is vertical with length $1/2$.  Notice for any $P = (x,y) \in S$, we necessarily have $1 - x^2 - 4y^2 > 0$.

Now, suppose $P = (x,y) \in S$ is given to us.  Let $r = c(1 - x^2 - 4y^2)$ where $0 < c < 1$ is some small constant.  Then $r > 0$. Moreover, if $Q = (u,v) \in B_r (P)$, we know that $|PQ| < r$.  In particular, $|u - x| \leq |PQ| < r$ and $|v - y| \leq |PQ| < r$. By the triangle inequality, this gives,
\begin{equation}\label{prob: 11-6-1}
|u| \leq |x| + |u - x| < |x| + r \quad \quad \textrm{and} \quad \quad |v| \leq |y| + |v-y| < |y| + r.
\end{equation}
We now need to show that $Q \in B_r (P)$ also satisfies $Q \in S$. Since $Q$ was an arbitrary element of $B_r (P)$, this would imply that $B_r (P) \subset S$.  Since $P \in S$ was also arbitrary, this would show that $S$ is open.

Now, $Q = (u,v)$ is an element of $S$ if and only if $u^2 + 4v^2 < 1$.  We will need some intermediate inequalities to show that this is, in fact, true.  Notice that by \eqref{prob: 11-6-1}
\begin{align*}
u^2 + 4v^2 & \leq (|x| + r)^2 + 4 (|y| + r)^2 \\[1ex]
	& = |x|^2 + 2 |x| r + r^2 + 4|y|^2 + 8|y|r + 4r^2 \\[1ex]
(\textrm{using that } |x|, |y| \leq 1 \textrm{ for } (x,y) \in S) 	& \leq |x|^2 + 2r + r^2 + 4 |y|^2 + 8r + 4r^2 \\[1ex]
	& = |x|^2 + 4 |y|^2 + 10 r + 5 r^2
\end{align*}
Now, we examine $r = c (1 - x^2 - 4y^2)$. Notice, since $c < 1$, we must have $r < 1$. So, in particular: $r^2 = r (r) < 1 \cdot r = 1$.  Let's continue our inequalities
\begin{align*}
u^2 + 4v^2 & \leq |x|^2 + 4 |y|^2 + 10 r + 5 r^2 \\[1ex]
\quad & \leq x^2 + 4 y^2 + 15 r.
\end{align*}
Now substitute the definition of $r$, to obtain
\begin{align*}
u^2 + 4v^2 & \leq x^2 + 4 y^2 + 15c(1 - x^2 - 4y^2) \\[1ex]
\quad & = 1 - (1 - x^2 - 4 y^2) + 5c(1 - x^2 - 4y^2) \\[1ex]
\quad & = 1 - (1 - 15c)\underbrace{(1 - x^2 - 4y^2)}_{> 0}.
\end{align*}
In particular, if we choose $c < 1/15$, then
$$
1 - (1 - 15c)\underbrace{(1 - x^2 - 4y^2)}_{> 0} < 1 - (1 - 15 \cdot \frac{1}{15})(1 - x^2 - 4y^2) = 1.
$$
So, with this choice of $r = c(1 - x^2 - 4 y^2)$, we see that $Q = (x,y) \in S$. This concludes the proof that $S$ is open.
}



\item{
{\it 
Let $S\subset\rr^2$ be an open set. 
Prove directly from the definition that the set 
$$S'=\{(x,y)\in\rr^2:\  (2x,2y)\in S\}$$
is also an open set. (We know that $S$ is open. This means that, given a point $P=(x,y)\in S$, there is an $r>0$ such that the neigbourhood $B_r(P)$ is contained in $S$. You have to prove that the same condition is satisfied for all $P'\in S'$, possibly with a different value of $r$.)}

\smallskip


Let $P'=(x,y)\in S'$. Then $P=(2x,2y)\in S$. Since $S$ is open, there is $r>0$ such that $B_r(P)\subset S$. Let $r'=r/2>0$. We claim that $B_{r'}(P')\subset S'$. Since $P'\in S'$ was arbitrary, this will prove that $S'$ is open.

We now need to prove that $B_{r'}(P')\subset S'$. Let $Q'=(x',y')\in B_{r'}(P')$, and let $Q=(2x',2y')$. Then
$$
|P'Q'|=\sqrt{(x-x')^2+(y-y')^2}<r'=r/2,
$$
so that 
$$
|PQ|=\sqrt{(2x-2x')^2+(2y-2y')^2}=2|P'Q'|<r.
$$
This means that $Q\in B_r(P)$, so that $Q\in S$. But then $Q'\in S'$. This shows that any point $Q'\in B_{r'}(P')$ is in $S'$, proving the claim.


}











\end{enumerate}
