\section{Limits and Continuity}
\begin{enumerate}[1.]
\item  {\it Evaluate the following limits, or prove that they do not exist. In this question, you  do not have to use the $\epsilon-\delta$  definition of limits.}
 
 \bigskip
 
 (a) $\displaystyle \lim_{(x,y)\to(0,0)} \frac{\sin(xy)}{x^2-y^2}$
 
 \bigskip
 
 Note that the function in the limit is defined where $x\neq \pm y$.
If we approach $(0,0)$ along the line $x=0$, we have 
$$\lim_{y\to 0} \frac{0}{-y^2}=\lim_{y\to 0} 0 =0.
$$
 But if $x=2y\to 0$, we have
$$\lim_{y\to 0} \frac{\sin(2y^2)}{3y^2}=\frac{2}{3}$$ 
using the limit $\lim_{t\to 0} \frac{\sin t}{t}=1$ from single-variable calculus. Therefore the limit in both variables does not exist.


\bigskip 
 
 
 
 (b) $\displaystyle \lim_{(x,y)\to(0,0)} \frac{xy^5\cos(1/y)}{x^4+y^4}$

\bigskip

The function is only defined for $y\neq 0$, so we will assume $y\neq 0$ in what follows.
Then $|\cos(1/y)|\leq 1$ and $x^4+y^4>0$, so that
\begin{align*}
0  \le \left| \frac{xy^5\cos(1/y)}{x^4 + y^4} \right| & = \frac{|x||y|^5\:|\cos(1/y)|}{x^4 + y^4}\\
& \le \frac{|x||y|^5}{x^4 + y^4}\\
& = |x||y|\,\frac{|y|^4}{x^4 + y^4}\\
& \le |x||y|.
\end{align*}
At the last step, we used that $|y|^4=y^4\leq x^4 + y^4$. As $(x,y)\to(0,0)$, we have $|x||y|\to 0$. By the squeeze theorem, our limit exists and is equal to $0$.

\bigskip

(c) $\displaystyle \lim_{(x,y)\to (0,0)} \frac{xy^2}{x^4+y^4}$

\bigskip

This limit does not exist. For example, if we let $x=y\to 0$, we get
$$
 \lim_{y\to 0} \frac{y^3}{2y^4}=  \lim_{y\to 0} \frac{1}{2y} ,
 $$
which does not exist (the one-sided limits are $\pm\infty$, depending on the sign of $y$).
 
 \bigskip
 
 
 (d) $\displaystyle \lim_{(x,y)\to(0,0)} \frac{x^2y^4}{x^2+y^6}$

\bigskip


We have
$$ 0\leq \frac{x^2y^4}{x^2+y^6}  =  \frac{x^2}{x^2+y^6}  y^4 \leq y^4.$$
Since both $0$ and $y^4$ have limit 0 at $(0,0)$, by the squeeze theorem our limit exists and is equal to 0.


\bigskip


\item {\it
Evaluate the following limits, or prove that they do not exist. In this question, you  do not have to use the $\epsilon-\delta$  definition of limits. }

\bigskip

(a) $\displaystyle \lim_{(x,y)\to(0,0)}
\frac{xy}{\sqrt{x^2+y^2}}.$


\medskip
We use polar coordinates $x=r\cos\theta,y=r\sin\theta$. Then
$$\frac{xy}{\sqrt{x^2+y^2}}
=\frac{r^2\cos\theta\sin\theta}{ r}=r\cos\theta\sin\theta.$$
Since $|\sin\theta|\leq 1$ and $|\cos\theta|\leq 1$ for all $\theta$, we have
$$
\left|\frac{xy}{\sqrt{x^2+y^2}}\right|= |r\cos\theta\sin\theta|
\leq r.
$$
As $(x,y)\to 0$, we have $r\to 0$, so that our double limit is 0 by the Squeeze Theorem.

(This could also be solved using the Squeeze Theorem without the polar coordinates, similar to several other examples here. We include a solution with polar coordinates to indicate that this is another valid approach.) 


\bigskip
(b) 
$\displaystyle{\lim_{(x,y)\to (0,0)} \frac{(x-y)^2}{x^2+y^2}}$ 

\medskip
This limit does not exist.
If we approach $(0,0)$ along the line $x=y$, we get
${\lim_{x\to 0} 0=0}$.  But if we let $y=0$, we get
${\lim_{x\to 0} \frac{x^2}{x^2}=1}$.

\bigskip

(c) 
$\displaystyle{\lim_{(x,y)\to (0,0)} \frac{x^3}{|x|+|y|}}$

\bigskip

Using that $|x|+|y|\geq |x|$, we write
$$
 0\leq \left| \frac{x^3}{|x|+|y|} \right| \leq  \left| \frac{x^3}{|x|} \right|  =x^2.
$$
Since $x^2\to 0$ as $(x,y)\to (0,0)$, our limit is 0 by the squeeze theorem.
 

\bigskip


(d) $\displaystyle \lim_{(x,y)\to(0,0)}
\frac{x+y}{\sqrt{x^2+y^2}}.$

\bigskip

When $y=0$ and $x\neq 0$, we have 
$$
\frac{x+y}{\sqrt{x^2+y^2}}= \frac{x}{\sqrt{x^2}}=\frac{x}{|x|},
$$
which is $1$ for $x>0$ and $-1$ for $x<0$. Therefore the one-sided limits as $y=0$ and $x\to 0$ are different (1 when $x\to 0$ through positive values, and $-1$ when $x\to 0$ through negative values). This means that the double limit does not exist.




\bigskip



(e) $\displaystyle{\lim_{(x,y)\to (0,0)} \frac{\sin^2 x\sin^2 y}{x^2+y^2}}$ 

\bigskip

We will use the inequality $|\sin x|\leq |x|$ from single-variable calculus. For $(x,y)\neq(0,0)$, we have
$$
\left|\frac{\sin^2 x\sin^2 y}{x^2+y^2}\right|
=\frac{\sin^2 x\sin^2 y}{x^2+y^2}
\leq\frac{x^2y^2}{x^2+y^2}\leq y^2,
$$
where at the last step we used that $x^2\leq x^2+y^2$. Since $y^2\to 0$ as $(x,y)\to 0$, our double limit is 0 by the Squeeze Theorem.











\bigskip

\item Prove using  the $\epsilon-\delta$ definition that 
$\displaystyle \lim_{(x,y)\to(0,0)} \frac{x^3y^3}{(x^2+y^2)^2}=0$. (Given $\epsilon>0$, find $\delta>0$ such that...)


\bigskip
We will first prove that 
\begin{equation}\label{2-2-sol-e1}
\left| \frac{x^3y^3}{(x^2+y^2)^2} \right|  \leq  \frac{1}{2} (x^2+y^2)\hbox{ for all }(x,y)\neq(0,0).
\end{equation}
Since 
$(x^2+y^2)^2= x^4 + 2x^2y^2 + y^4\geq 2x^2y^2$, we have
\begin{align*}
\left| \frac{x^3y^3}{(x^2+y^2)^2} \right|  
&= \frac{x^2y^2}{(x^2+y^2)^2}|xy| 
\leq  \frac{1}{2} |xy|\\
&\leq  \frac{1}{2} \sqrt{x^2+y^2} \,\sqrt{x^2+y^2}\\
& =  \frac{1}{2} (x^2+y^2). 
\end{align*}


Now we can complete the proof. Given 
$\varepsilon>0$, we let  $\delta=\sqrt{2\varepsilon}>0$. For any $(x,y)$ such that $0<\sqrt{x^2+y^2}<\delta$, we have by (\ref{2-2-sol-e1})
\begin{align*}
\left| \frac{x^3y^3}{(x^2+y^2)^2} \right| & \le  \frac{1}{2} (x^2+y^2)\\
& <  \frac{1}{2} \delta^2 
=  \varepsilon,
\end{align*}
as required.


\bigskip

\item {\it Prove using the $\epsilon-\delta$ definition that }
$$\displaystyle \lim_{(x,y)\to(0,0)} \frac{x^3y}{x^2+y^4}=0.$$

\bigskip
Given $\epsilon>0$, we need to find $\delta>0$ such that if $0<\sqrt{x^2+y^2}<\delta$ then
$$
\left| \frac{x^3y}{x^2+y^4} \right| <\epsilon.
$$
We have
$$ 0\leq \left| \frac{x^2y^2}{x^2+y^4} \right| = \left| \frac{x^2}{x^2+y^4} \right| |x|\,|y| \leq 
\sqrt{x^2+y^2} \,\sqrt{x^2+y^2}\leq x^2+y^2.$$
Therefore, let $\delta=\sqrt{\epsilon}>0$. If $0<\sqrt{x^2+y^2}<\delta=\sqrt{\epsilon}$, then by the above
we have
$$
0\leq \left| \frac{x^3y}{x^2+y^4} \right| \leq x^2+y^2 < \delta^2=\epsilon,
$$
so the $\epsilon-\delta$ condition is satisfied.

\bigskip


\item {\it 
Give an $\epsilon-\delta$ proof that $\displaystyle \lim_{(x,y)\to (0,0)} \frac{x^2+4y^2}{|x|+|y|}=0.$ 
(Hint: you might find it useful to consider three cases: when $x,y \neq 0$, when $x = 0$, and when $y = 0$.)}

\bigskip



We have to prove the following: for every $\epsilon>0$, there is a $\delta>0$ such that
if $0<\sqrt{x^2+y^2}<\delta$, then 
$$
\left| \frac{x^2+4y^2}{|x|+|y|} \right| <\epsilon.
$$
Let $\delta=\epsilon/5$.
Let $(x,y)$ be a point with $0<\sqrt{x^2+y^2}<\delta$. 
Then $|x|\leq \sqrt{x^2+y^2}<\delta $ and $|y|\leq \sqrt{x^2+y^2}<\delta$.
We consider three cases:

\medskip

\begin{itemize}
\item If $x,y\neq 0$,
we have
\begin{align*}
\left| \frac{x^2+4y^2}{|x|+|y|} \right| 
&\leq \left| \frac{x^2}{|x|+|y|} \right| + \left| \frac{4y^2}{|x|+|y|} \right|
\leq \left| \frac{x^2}{|x|} \right| + \left| \frac{4y^2}{|y|} \right|
\\
&= {|x|} + 4|y| < \frac{\epsilon}{5}+\frac{4\epsilon}{5}=\epsilon.
\end{align*}
\item If $x=0$, then 
$$\left| \frac{x^2+4y^2}{|x|+|y|} \right| = \frac{4y^2}{|y|}=4|y|< \frac{4\epsilon}{5}<\epsilon.
$$
\item Similarly, if $y=0$, then
$$\left| \frac{x^2}{|x|} \right| = \frac{x^2}{|x|}=|x|< \frac{\epsilon}{5}<\epsilon.
$$
\end{itemize}

Hence $\delta=\epsilon/5$ works in all cases.


\bigskip


\item {\it  (10 marks)
Prove {using the $\epsilon-\delta$ definition} that 
$\lim_{(x,y)\to(0,0)} \frac{2xy^3}{x^2+y^2}=0$. (Given $\epsilon>0$, find $\delta>0$ such that...)}

\bigskip
Let $f(x,y)=\frac{2xy^3}{x^2+y^2}$.
Let $\epsilon>0$. We need to find $\delta>0$ such that if $0<\sqrt{x^2+y^2}<\delta$, then 
$|f(x,y)|<\epsilon$. We first simplify the problem: using that $y^2\leq x^2+y^2$, we can estimate
for $(x,y)\neq (0,0)$,
$$
|f(x,y)|= |2xy| \,\frac{y^2}{x^2+y^2}\leq |2xy|.
$$

Let $\delta=\sqrt{\epsilon/2}$. Then $\delta>0$. Let $(x,y)$ satisfy $0<\sqrt{x^2+y^2}<\delta$, then
$|x|\leq \sqrt{x^2+y^2}<\delta$ and $|y|\leq \sqrt{x^2+y^2}<\delta$, so that
$$
|f(x,y)|\leq |2xy|< 2 \delta^2 = 2(\epsilon/2)=\epsilon
$$
and the $\epsilon-\delta$ condition is satisfied.










\bigskip

\item {\it
Assume that the following is true for some function
$f(x,y)$, defined for all $x$ and $y$: for every $\epsilon>0$ there is a $\delta>0$ such that
for some $(x,y)$ such that $0<\sqrt{(x-a)^2+(y-b)^2}<\delta$ 
we have $|f(x,y)-L|<\epsilon$  (make sure to read
this carefully!). Does this imply that $\lim_{(x,y)\to (a,b)}f(x,y)=L$? If yes, prove it. If not, give an example of a function
$f(x,y)$ that satisfies the above condition but does not have a limit at $(a,b)$.

}


\medskip

It does not.  The condition in the definition of the limit is 
``$\underline{\hbox{for all}}$ $(x,y)\dots$'' not 
``$\underline{\hbox{for some}}$ $(x,y)$".  For example, let 
$$
f(x,y) = \begin{cases} \frac{(x-y)^2}{x^2+y^2}& \hbox{ if } (x,y)\neq (0,0),
\\
0 & \hbox{ if } (x,y)= (0,0).
\end{cases}
$$
Then $f(x,y)$ does not have a limit at $(0,0)$, as proved in 2(b).  But if $(a,b)=(0,0)$ and $L=0$,
then the statement in the problem is true: for every 
$\epsilon>0$ there is a $\delta>0$ such that
$|f(x,y)|<\epsilon$ for {\it some} $(x,y)$ such that $0<\sqrt{x^2+y^2}<\delta$.
For example, we could take $x=y=\delta/2$. Then $\sqrt{x^2+y^2}=\delta/\sqrt{2}<\delta$ and 
$|f(\delta/2,\delta/2)|=0<\epsilon$.


\bigskip


\item {\it 
Prove {using the $\epsilon-\delta$ definition} that  if $f(x,y)$ is a function such that 
$$
\lim_{x\to 0} f(x,0)=4, \ \ \lim_{y\to 0}f(0,y)=1,
$$
then the double limit $\lim_{(x,y)\to (0,0)} f(x,y)$ does not exist. (You need to prove that the ``for every $\epsilon>0$ there exists $\delta>0$...'' statement {\bf cannot} be true for a function as above.)}


\bigskip

We will prove this by contradiction. Suppose that $\lim_{(x,y)\to (0,0)} f(x,y)=L$ for some number $L$. 
By the triangle inequality,
$$
|4-L|+|L-1|\geq |4-1|=3
$$
so that at least one of $|4-L|$ and $|L-1|$ is $\geq 3/2$. We will consider the case when $|L-4|\geq 3/2$; the case $|L-1|\geq 3/2$ is similar.

We will prove that the $\epsilon-\delta$ condition fails for $\epsilon=1/2$. 
If $\lim_{(x,y)\to (0,0)} f(x,y)=L$, then the $\epsilon-\delta$ condition with $\epsilon=1/2$ tells us this: there exists a $\delta>0$ such that for all $(x,y)$ with $0<\sqrt{x^2+y^2}<\delta$ we have $|f(x,y)-L|<1/2$. In particular, if we use the points on the $x$-axis, we get that
\begin{align*}
&|f(x,0)-L|<1/2 \hbox{ for all }|x|<\delta.
\end{align*}

But also, we have $\lim_{x\to 0} f(x,0)=4$. Applying the $\epsilon-\delta$ condition with $\epsilon=1/2$ to that limit, we get the following: there exists $\delta_1>0$ such that if $0<|x|<\delta_1$, then $|f(x,0)-4|< 1/2$.
Take $\delta'=\min(\delta,\delta_1)$, then for all $x$ with $0<|x|<\delta'$ we have both $|f(x,0)-L|<1/2$ and $|f(x,0)-4|< 1/2$. Therefore
$$
|L-4|=|(L-f(x,0))+(f(x,0)-4)|\leq |L-f(x,0)|+|f(x,0)-4|<\frac{1}{2}+\frac{1}{2}=1,
$$
contradicting our assumption that $|L-4|\geq 3/2$. The case $|L-1|\geq 3/2$ is similar, but we would use the limit along the $y$-axis instead.








\end{enumerate}