1.2: Limits and Continuity

$\newcommand{\R}{\mathbb R }$ $\newcommand{\bfa}{\mathbf a}$ $\newcommand{\bfb}{\mathbf b}$ $\newcommand{\bff}{\mathbf f}$ $\newcommand{\bfu}{\mathbf u}$ $\newcommand{\bfx}{\mathbf x}$ $\newcommand{\ep}{\varepsilon}$

Limits and continuity

  1. Limits of multivariable functions
  2. Continuity
  3. Continuous functions and open sets
  4. Problems

See also Section 1.3 of the textbook.

Students should:

  1. know the definitions of limit and continuous.
  2. know basic properties of limits (Theorems 1-3), of continuity (Theorem 4), and the connection between continuity and open sets (Theorem 5).
  3. be able to use these properties to instantly recognize
  4. be able to determine, for reasonable examples, whether $\lim_{\bf x\to a}f({\bf x}) $ exists, and if so, identify the limit. (See also Homework 1).
  5. carry out proofs about limits and continuity, at the level of difficulty of the practice problems.

Limits of multivariable functions

Assume that $S\subset \R^n$, and that $\bff:S\to \R^k$ is a function. The statement $$ \lim_{\bf x\to a}{\bf f}({\bf x}) ={\bf L} $$ is defined to mean that \begin{equation}\label{lim.def} \forall \ep >0, \ \ \exists \delta>0 \quad\mbox{ such that } \left. \begin{array}{c} \bfx\in S \mbox{ and } \\ 0 < |\bfx - \bfa|<\delta \end{array}\right\} \Rightarrow |\bff(\bfx) - {\bf L}| < \ep. \end{equation} In order for the definition to make sense, we need to assume that $\bfa$ satisfies \begin{equation}\label{limitpoint} \forall \delta>0, \quad \exists \bfx\in S \quad\mbox{ such that }\quad 0 < |\bfx - \bfa|<\delta. \end{equation} For example, this always holds if $\bfa \in S^{int}$, or even if $\bfa \in \overline{(S^{int})} = $ the closure of $S^{int}$.

Definition \eqref{lim.def} is identical to the familiar definition from single-variable calculus, except that

Despite these cosmetic differences, the mathematical structure of \eqref{lim.def} is exactly the same as in the familiar case of $f:\R\to \R$. As a result, limits of functions $\bff:\R^n\to \R^k$ have very similar properties to limits of functions $f:\R\to \R$, with very similar proofs. This means that in fact you already understand most aspects of limits of multivariable functions.

For example,

Theorem 1: Limit Laws. Assume that $S\subset \R^n$ and that $\bfa$ is a point in $\R^n$ satisfying \eqref{limitpoint} (for example, an interior point of $S$). Further assume that $f,g:S\to \R$ are functions and $L,M$ are numbers such that $$ \lim_{\bfx \to \bfa}f(\bfx) = L, \qquad \lim_{\bfx \to \bfa}g(\bfx) = M. $$

Then $$ \lim_{\bfx \to \bfa}[f(\bfx)+ g(\bfx)] = L+M,\qquad\mbox{ and }\qquad \lim_{\bfx \to \bfa}[f(\bfx) g(\bfx)] = LM. $$

Theorem 2: Squeeze Theorem. Assume that $S\subset \R^n$ and that $\bfa$ is a point in $\R^n$ satisfying \eqref{limitpoint} (for example, an interior point of $S$). Further assume that $f,g,h:S\to \R$ are functions and $p>0$ and $L$ are numbers such that $$ f(\bfx)\le g(\bfx) \le h(\bfx)\mbox{ for all }\bfx\in S \mbox{ such that }|\bfx-\bfa|<p $$ and $$\lim_{\bfx \to \bfa}f(\bfx) = \lim_{\bfx\to \bfa}h(\bfx) = L. $$ Then $\lim_{\bfx\to \bfa}g(\bfx) = L$.

(a small remark) We have stated the above Theorems for real-valued functions rather than vector-valued functions, because for example with vector-valued functions it is not clear how to generalize the hypothesis $f\le g\le h$, and we have several choices of how to write a product of functions: a dot product, a product of a scalar and a vector etc, a cross-product (in 3 dimensions) etc. In every case the principle the limit of the product equals the product of the limits is true.

The proofs of these theorems are exactly like the proofs for functions of a single variable. To persuade yourself of this, consult the MAT137 videos Proof of the Limit Law for sums of functions, or Proof of the Squeeze Theorem. You will see that the proofs given there apply with no change to functions of several variables. You may also find that reviewing these proofs is a helpful reminder of basic concepts.

As with functions of a single variable, the Squeeze Theorem has a useful corollary.

Corollary 1. Assume that $S\subset \R^n$ and that $\bfa$ is a point in $\R^n$ satisfying \eqref{limitpoint}. Further assume that $g,h:S\to \R$ are functions such that $$ |g(\bfx)|\le h(\bfx) \quad \mbox{ for all }\bfx \in S, \qquad \lim_{\bfx\to \bfa}h(\bfx) = 0. $$ Then $\lim_{\bfx\to \bfa}g(\bfx) = 0$.

Proof. The hypotheses imply that $-h(\bfx)\le g(\bfx)\le h(\bfx)$ for all $\bfx$ and that $\lim_{\bfx\to \bfa}-h(\bfx) = \lim_{\bfx\to \bfa}h(\bfx)= 0$, so the conclusion follows directly from the Squeeze Theorem (with $-h(\bfx)$ playing the role of $f(\bfx)$). $\quad \Box$

When using this corollary in proofs, it is common to write by the Squeeze Theorem... rather than by the Corollary of the Squeeze Theorem....

We can use the Limit Laws and Squeeze Theorem to prove the following useful theorem. It tells us that if we have a good understanding of limits of scalar functions, we can immediately transfer this knowledge to vector-valued functions. For this reason, and because the notation is simpler, we will often focus on scalar functions.

Theorem 3. Assume that $S\subset \R^n$ and that $\bfa$ is a point in $\R^n$ satisfying \eqref{limitpoint}. If ${\bf f} = (f_1,\ldots, f_k)$ is a vector-valued function $S\to \R^k$, then $$ \lim_{\bfx\to \bfa}{\bf f({\bfx}) = L} \qquad\mbox{ if and only if }\qquad \lim_{\bfx\to \bfa} f_j({\bfx}) = L_j\ \ \ \mbox{ for }j=1,\ldots, k. $$ where $(L_1,\ldots, L_k)$ are the components of ${\bf L}$.

Proof.

First note that the definition \eqref{lim.def} of limit implies that \begin{equation}\label{restate} \lim_{\bfx\to\bfa}\bff(\bfx) = {\bf L} \qquad\iff \qquad \lim_{\bfx\to\bfa}|\bff(\bfx) -{\bf L}| = 0. \end{equation} (Write out the details if you are unsure.) Next, for every $j = 1,\ldots, k$, $$ |f_j(\bfx) - L_j| \le \left( |f_1(\bfx) - L_1|^2 +\cdots + |f_k(\bfx) - L_k|^2\right)^{1/2} = |\bff(\bfx)-{\bf L}|. $$ Thus by \eqref{restate} and the Squeeze Theorem, \begin{align} \lim_{\bfx\to \bfa} \bff(\bfx) = {\bf L} \quad \Rightarrow \quad \lim_{\bfx\to \bfa} |\bff(\bfx) - {\bf L}|=0 &\quad \Rightarrow \quad \lim_{\bfx\to \bfa} |f_j(\bfx) - L_j|=0 \nonumber \\ &\quad \Rightarrow \quad \lim_{\bfx\to \bfa} f_j(\bfx) = L_j.\nonumber \end{align} Similarly, $$ |\bff(\bfx) - {\bf L}| \le\Big( |f_1(\bfx) - L_1| + \cdots + |f_k(\bfx) - L_k| \Big) $$ as can be seen by squaring both sides. Using this, the implication $$ \lim_{\bfx\to \bfa} f_j(\bfx) = L_j\ \ \ \mbox{ for }j=1,\ldots, k \quad\Rightarrow \quad \lim_{\bfx\to \bfa} \bff(\bfx) = {\bf L} $$ can be checked using the Limit Laws and the Squeeze Theorem, very much as above. $\qquad \Box$

Examples

Although the abstract theory of limits for multivariable functions is very similar to that for functions of a single variable, interesting examples show ways in which notion of limit is more subtle in the multivariable case.

Example 1. Define $f:\R^2\setminus \{(0,0)\}\to \R$ by $$ f(x,y) = \frac {xy}{x^2+y^2}. $$

For any real number $m$ it is easy to check that $f(x,mx) = \frac m{1+m^2}$ for all $x\ne 0$. Thus \begin{equation}\label{line} \lim_{x\to 0} f(x,mx) = \frac m{1+m^2}. \end{equation} This says, informally, that if we approach the origin along any straight line, the limit of $f$ exists; but the limit depends on the slope of the line! For example, it equals $1/2$ if $m=1$ and $0$ if $m=0$.

This implies that $\lim_{(x,y)\to (0,0)} f(x,y)$ does not exist, since \begin{equation}\label{fact} \mbox { if }\lim_{(x,y)\to (0,0)}f(x,y) = L, \qquad\mbox{ then }\lim_{x\to 0}f(x,mx)=L \end{equation} for every $m$. (See below). This would imply that $\frac m{1+m^2} = L$ for every $m$, and hence that $1/2= 0$, which is false. So the limit cannot exist.

The proof of \eqref{fact} is a good exercise. (In fact, questions like this, but a little harder, have been known to appear on MAT237 Term Tests!) But if you prefer to read it, see below.

Proof of \eqref{fact}: Our goal is to show that \begin{equation}\label{facta} \forall \ep >0, \exists\delta>0 \mbox{ such that } 0<|x|< \delta \Rightarrow |f(x,mx) - L|<\ep \end{equation} Our assumption is that $\lim_{(x,y)\to (0,0)}f(x,y) = L$. This implies that \begin{equation} \label{ffact} \forall \ep>0, \exists \delta_1>0 \mbox{ such that } 0< |(x,y) - (0,0)|<\delta_1 \ \Rightarrow |f(x,y)-L|<\ep. \end{equation}

Setting $y=mx$, we observe that $$ |(x,mx) - (0,0)| = |(x, mx)| = \cdots = |x|(1+m^2)^{1/2}. $$ Thus, if $|x|< \delta_1(1+m^2)^{-1/2}$, then $|(x,mx) - (0,0)|<\delta_1$. Putting these together, it follows that for any $\ep>0$, if we choose $\delta_1$ as in \eqref{ffact} and define $\delta = \delta_1(1+m^2)^{-1/2}$, then $$ 0<|x|<\delta \qquad \Rightarrow \qquad |f(x,mx)-L|<\ep. $$ This proves \eqref{fact}.

Example 2. Define $f:\R^2\setminus \{(0,0)\}\to \R$ by $$ f(x,y) = \frac {x^2y}{x^4+y^2}. $$

For any real number $m$, $$ \lim_{x\to 0} f(x,mx) = \lim_{x\to 0}\frac{mx^3}{x^4+m^2 x^2} = 0 $$ by first-year calculus. Despite this, the limit $\lim_{(x,y)\to (0,0)}f(x,y)$ does not exist! Indeed, one can easily check that $$ \lim_{x\to 0} f(x,mx^2) = \frac m {1+m^2}, $$ so that we see different limits as we approach the origin along different parabolas $y=mx^2$. Then we can conclude that the limit does not exist by arguing as above. This is a good exercise.

Example 3. Define $f:\R^2\setminus \{(0,0)\}\to \R$ by $$ f(x,y) = \frac {|x|^{4/3}|y|^{8/7}}{x^2+y^2}. $$ Does $\lim_{(x,y)\to (0,0)} f(x,y)$ exist? If so, what is it? One way to answer this is to write $$ f(x,y) = f_1(x,y) \, f_2(x,y), \quad f_1(x,y) = \frac {|xy|}{x^2+y^2}, \quad f_2(x,y) := |x|^{1/3}|y|^{1/7} $$ Claim 1: $f_1(x,y)\le 1/2$ for all $(x,y)\ne (0,0)$.
Proof. Note that $$ 0\le (|x| - |y|)^2 = (x^2+y^2) - 2 |xy|. $$ It follows that $2|xy|\le x^2+y^2$. If we divide both sides of this by $2(x^2+y^2)$, which we can do if $(x,y)\ne (0,0)$, it says that $f_1(x,y)\le 1/2$, proving Claim 1.
Using Claim 1, we see that \begin{equation}\label{f1f2} 0 \le f(x,y) = f_1(x,y)\, f_2(x,y) \le \frac 12 f_2(x,y)\quad\mbox{ for all }(x,y)\ne(0,0). \end{equation} Also, basic properties of continuous fuctions imply that $f_2$ is continuous, and we can see that $f_2(0,0)= 0$. Thus $\lim_{(x,y)\to (0,0)} f_2(x,y) = 0$. So the Squeeze Theorem and \eqref{f1f2} imply that $\lim_{(x,y)\to(0,0)} f(x,y) = 0$.

Example 4. Define $f:\R^2\setminus \{(0,0)\}\to \R$ by $$ f(x,y) = \frac {x^{11}y}{x^{23}+y^2}. $$

Here you can check that, similar to Example 2, $\lim_{t\to 0} f(ta, tb) = 0$ for every nonzero $(a,b)\in \R^2$. However, $$ f(t^2, t^{23}) = \frac {t^{22}t^{23}}{t^{46} + t^{46}} = \frac 12 t^{-1} $$ which diverges as $t\to 0^+$. This explains why $\lim_{(x,y)\to (0,0)}f(x,y)$ cannot exist. If we wish to give a proof, we can do so by arguing somewhat as in Example 1 above. You can fill in the details yourself if you wish.

Continuity

If $S\subset \R^n$, then a function ${\bf f}:S\to \R^k$ is continuous at $\bfa\in S$ if,

\begin{equation}\label{cont.def} \forall \ep >0, \ \ \exists \delta>0 \mbox{ such that } \left. \begin{array}{c} \bfx\in S \mbox{ and } \\ |\bfx - \bfa|<\delta \end{array}\right\} \Rightarrow |\bff(\bfx) - \bff(\bfa)| < \ep. \end{equation}

If $\bf f$ is continuous at every point in $S$, then we say simply that $\bf f$ is continuous.

Remarks

  1. Note that, as with limits, the mathematical structure of definition \eqref{cont.def} is exactly the same as in the familiar case of functions of a single variable. This means that you already understand most aspects of continuous functions of several variables, as we will see in more detail below.

  2. If $\bfa$ is a point where it makes sense to talk about $\lim_{\bfx\to \bfa}\bff(\bfx)$ (that is, if the technical assumption \eqref{limitpoint} holds) then by comparing the definitions \eqref{lim.def} and \eqref{cont.def}, we see that ${\bf f}:S\to \R^k$ is continuous at $\bfa\in S$ if and only if $\lim_{\bfx\to \bfa, \bfx\in S} \bf f(x) = f(a)$.

  3. Students should commit definition \eqref{cont.def} to memory. Because you have already done this for (essentially) the same definition in MAT137, this should be easy.

Basic properties of continuity

We will generally write statements below for functions whose domain is $\R^n$, but all of them can be adapted in a straightforward way to functions whose domain is a subset $S$.

First we summarize some basic facts about continuity. Many are familiar (in simpler forms) from single-variable calculus.

Theorem 4: basic properties of continuity Assume that $S\subset \R^n$ and that $\bfa\in S$.

  1. If ${\bf f}:S\to \R^k$ is a vector-valued function with components $(f_1,\ldots, f_k)$, then $\bf f$ is continuous at $\bfa$ if and only if every component function $f_j$ is continuous at $\bfa$.
  2. If $\bff, {\bf g}:S\to \R^k$ are continuous at $\bfa$, then the sum $\bff + {\bf g}$ is continuous at $\bfa$.
  3. If $f,g :S\to \R$ are continuous at $\bfa$, then the product $fg$ is continuous at $\bfa$.
    If in addition $g(\bfa)\ne 0$, then the quotient $f/g$ is continuous at $\bfa$.
  4. A composition of continuous functions is continuous. That is, assume that $S\subset \R^n$ and $T\subset \R^k$, and that $\bff:S\to \R^k$ and ${\bf g}:T\to \R^{\ell}$ are functions such that ${\bf g}\circ \bff$ is well-defined. (Thus, the image of $\bff$ is a subset of $T$.) If $\bff$ is continuous at $\bfa$ and ${\bf g}$ is continous at $\bff(\bfa)$, then ${\bf g}\circ \bff$ is continuous at $\bfa$.
  5. The elementary functions of a single variable (trigonometric functions and their inverses, polynomials, exponential and log) are continuous on their domains.

Proof.

  1. This is a direct consequence of Theorem 3 above.
  2. This is a direct consequence of the Limit Law for sums in Theorem 1.
  3. The continuity of the product follows directly from the Limit Law for products in Theorem 1. For the quotient, for a nonzero real number $x$, let $h(x)=1/x$. Then $f(x)/g(x) = f(x) h(g(x))$. We know (see point (5) below) that $h$ is continuous on its domain, so it follows from point (4) below that $h\circ g$ is continuous wherever $g\ne 0$. Now the conclusion follows from the case of products.
  4. Try to prove this yourself. (Hint: the argument is exactly like the proof for functions of a single variable, familiar from MAT137. You can also easily look it up if you want, but it's better to do it yourself.)
  5. We assume that this is known from MAT137.

How to recognize (many) continuous functions

From Theorem 4, we see that any multivariable function is continuous, as long as

Using this, we are able to instantly recognize many functions as continuous. For example,

For $\arcsin(xyz)$ to make sense, we need $-1\le xyz \le 1$.

And for $\sqrt{\arcsin(xyz)}$ to make sense, we need $\arcsin(xyz)\ge 0$, or in other words, $xyz \ge 0$. (Note, in this class we are only interested in real-valued functions, so we will not take square roots of negative numbers.)

So we can see that $f$ is continuous on $\{(x,y,z)\in \R^3 : 0\le xyz\le 1\}$.

Remark. Suppose that you are writing a proof, and you want to use reasoning like that given above. How should you write it?
For this class, we recommend writing something like By basic properties of continuity, we can see that the function $f(x,y) = \log(x-3y+2)$ is continuous on the set $\{(x,y)\in \R^2 : x-3y+2>0\}$. Statements like this will be accepted (as long as the set is identified correctly).

Continuous functions and open sets

There is an intimate connection between continuity and open/closed sets, summarized in the following theorem.

Theorem 5 Assume that $\bff$ is a function $\R^n\to \R^k$. Then the following are equivalent:

  1. $\bff$ is continuous.
  2. For every open set $U\subset \R^k$, the set $ \{ \bfx\in \R^n : \bff(\bfx)\in U\} $ is open.
  3. For every closed set $K\subset \R^k$, the set $ \{ \bfx\in \R^n : \bff(\bfx)\in K\} $ is closed.

Proof.

How to recognize (many) closed and open sets

For us, the most important consequence of the theorem is $(1)\Rightarrow (2),(3)$, since this allows us to instantly recognize many sets as open or closed.

Examples. Consider the sets

These sets all have the form $$ S_j = \{ \bfx \in \R^3 : f(\bfx)\in T_j\},\quad\mbox{ for }f(x,y,z) = \arctan(z^3 e^{x \sin y})\ \ \ $$

where

Since we instantly recognize $f$ as continuous (see above), we conclude that $$ S_1 \mbox{ is open}, \ \ S_2, S_3 \mbox{ are closed}. $$

The general principle is: if any set is defined using continuous functions (possibly more than one of them) and strict inequalities (ie, $<$ or $>$) then we instantly recognize it as open.

And if any set is defined using continuous functions and non-strict inequalities (ie, $\le$ or $\ge$) or equality, then we instantly recognize it as closed.

(Recall that we are already able to instantly see that many functions are continuous.)

Problems

Basic skills

Determine whether the following limits exist. Explain your answer

After completing Homework 1, for some of these problems you can see very easily if the limit exists or not. Nonetheless, for the problems, please explain your answer, rather than simply using what you know (or will know) from Homework 1.

What do we mean by explain? In this class, Explain your answer means that you are not being necessarily asked for a full mathematical proof, but you are being asked to communicate how you know your answer is correct. For example, for a limit that does not exist, a typical explanation might be something like This limit does not exist, because $\lim_{x\to 0^+} f(x^a, x^b) = c$, whereas $\lim_{x\to 0^+} f(x^a, 2x^b) = d$. For a limit that does exist, an explanation might involve using the squeeze theorem.

Of course, when you are asked to explain something, you are welcme to give a complete proof, and sometimes a complete proof is the best explanation.

  1. $\lim_{(x,y)\to (0,0)} \frac{x^2y^3}{x^2+y^4}$.

  2. $\lim_{(x,y)\to (0,0)} \frac{|x|^{\pi}|y|^{e}}{x^6+y^6}$.

  3. $\lim_{(x,y)\to (0,0)} \frac{xy }{x^4+y^4}$.

  4. $\lim_{(x,y)\to (0,0)} \frac{x^3y^3 }{x^4+y^4}$.

  5. $\lim_{(x,y)\to (0,0)} \frac{xy + x^3y^3 }{x^4+y^4}$.

  6. $\lim_{(x,y)\to (0,0)} \frac{ x^2+7xy^2 - 12 x^3y +4x^{11} - \frac 37 xy^{27} +y^2}{x^2+y^2 }$.

  7. $\lim_{(x,y)\to (0,0)} \frac {\sin^2( x\sqrt{|y|} )}{x^2+y^2}$.

  8. in $n$-dimensonal Euclidean space, $\lim_{\bfx \to {\bf 0}} \frac{x_1}{|\bfx|}$.

Recognizing continuous functions and open/closed sets Students should certainly be able to use basic properties of continuity to answer questions like the ones below. We are unlikely to ask questions like these often, since they are too easy. But students might have to argue in this way as one step in the solution of a more complicated problem.






Less basic

  1. Let $f(x,y) := \frac {y^3 - x^8y}{x^6+y^2}$ for $(x,y)\ne (0,0)$. Does $\lim_{(x,y)\to (0,0)} \frac{ f(x,y) - y}{ \sqrt{x^2+y^2}}$ exist? Explain your answer.
    Note that this involves the same kind of reasoning as in some of the Basic Skills questions above. But it is considerably more complicated than most of them.

  2. Suppose that $f,g$ are functions $\R^n\to \R$.

  3. Prove that if $f:\R^n\to \R$ is continuous, then $\{\bfx\in \R^n : f(\bfx)>0\}$ is open.
    (This is a special case of part of Theorem 5, but it is good practice to try to prove it from scratch, without using the theorem or consulting its proof.)

  4. Given $f:S\to \R$, in order for the definition of limit of $f$ at $\bfa$ to make sense, we needed to assume that $\bfa$ satisfies $$ \forall \delta>0, \quad \exists \bfx\in S \quad\mbox{ such that }\quad 0 < |\bfx - \bfa|<\delta. $$ For the following sets, find all points $\bfa\in S$ where this condition holds, and all points where it does not.

  5. Define $f:\R\to \R$ by $$ f(x) = \begin{cases}x&\mbox{ if }x\in {\mathbb Q} \\ 0&\mbox{ if not}. \end{cases} $$ At which points, if any, is $f$ continuous? Prove that your answer is correct.

  6. Find a function $f:\R\to \R$ that is continuous at $x=-1$ and $x=1$ and discontinuous everywhere else.

  7. Find a function $f:\R\to \R$ that is discontinuous at $x=-1$ and $x=1$ and continuous everywhere else.

  8. Assume that $\bff:\R^n\to \R^k$ and ${\bf g}:\R^k\to \R^{\ell}$ are functions, and that $\bfa\in \R^n$ is a point such that $\bff$ is continuous at $\bfa$ and ${\bf g}$ is continous at $\bff(\bfa)$.
    Prove that ${\bf g}\circ \bff$ is continuous at $\bfa$.

    This was stated in Theorem 4, but the proof was left as an exercise. This is the exercise.

$\Leftarrow$  $\Uparrow$  $\Rightarrow$