Home » Teaching

# Lecture Notes

Below are the lecture notes from my course on multivariable calculus, as well as some handouts I give to students for some of the experiments in the introductory physics lab courses. Note that I update my notes each term, but this website may not link to the latest editions.

### Notes on MTH3015: Calculus III

$\newcommand{\vect}{{\mathbf{#1}} }$ $\newcommand{\D}{{{\mathcal D}} }$ $\newcommand{\C}{{{\mathcal C}} }$ $\newcommand{\R}{{\mathbb{R}} }$ $\newcommand{\Rtwo}{{\mathbb{R}^2} }$ $\newcommand{\Rthree}{{\mathbb{R}^3} }$ $\newcommand{\V}{{\mathbb{V}} }$ $\newcommand{\nhat}{{\vect{\hat{n}}} }$ $\newcommand{\vi}{{\vect{i}} }$ $\newcommand{\vj}{{\vect{j}} }$ $\newcommand{\vk}{{\vect{k}} }$ $\newcommand{\f}{{\vect{f}} }$ $\newcommand{\g}{{\vect{g}} }$ $\newcommand{\vz}{{\vect{0}} }$ $\DeclareMathOperator{\sgn}{sgn}$ $\DeclareMathOperator{\dist}{dist}$

Week 4: Functions of Several Variables; Limits and Continuity

Sujeet Akula

Functions of Several Variables (introduction)

This week, we will discover functions of the form $f:\D\to\R$, where $\D\subseteq\R^m$, and $m=2,3$. This differs from vector functions, because they map a single real number to a 2D or 3D vector, while here, 2 or 3 real numbers is mapped to a single real number. As a summary, we can in general have mappings of $f:\R^m\to\R^k$. The scalar functions from Calculus I and II deal with functions where $m=1$ and $k=1$. Vector functions have $m=1$ but $k=2,3$. Again, here, we discuss 'functions of several variables' which means we set $k=1$, but $m=2,3$. As an example, we begin by considering \begin{equation} g(x,y) = \sqrt{1-x^2-y^2} . \end{equation} Here, clearly, $g:\D\to\R$, where $\D$ is a subset of $\Rtwo$, which is written as $\D\subseteq\Rtwo$. What is the natural domain of $g$? Considering that the argument of the square-root for a real-valued function must be non-negative, we can say then that \begin{equation} \D = \left\{(x,y) : x^2 + y^2 \le 1\right\} , \end{equation} which is just the unit disk centered at the origin. As another example, say we have the following formula for $h:\D\to\R$, where this time, $\D\subseteq\Rthree$ ($h$ is a function of 3 variables): \begin{equation} h(x,y,z) = (x^4-z^2)^3 - 3y^2z + 7 . \end{equation} In this case, $h$ is naturally defined for every choice of $x$, $y$, and $z$, so $\D=\Rthree$. Functions of several variables can be difficult to visualize. Typically, one uses computer plotting software like Mathematica, MATLAB, or Maple. Additionally, Google recently introduced an online plotting tool built-in to its search form, though it is not very advanced. I recommend the use of WolframAlpha (see my notes) for quickly plotting these functions.

Limits

This section will be a very formal treatment of limits and continuity. For more of an applied treatment, or for more examples, you are strongly encouraged to use the textbook. We begin this study, by first introducing some very useful notation.

Notation: The distance $d$

For two points $u$ and $v$ in $m$-dimensional space (points in $\R^m$), let $u=(x_1,x_2,\dots,x_m)$ and $v=(y_1,y_2,\dots,y_m)$. We define their (Euclidean) distance as \begin{equation} d(u,v) := \left(\sum_{j=1}^m(x_j-y_j)^2\right)^{1/2} . \end{equation} If $m=1$, i.e. $u$ and $v$ just lie on some number line, then $u=x_1$ and $v=y_1$ so \begin{equation} d(u,v) = \sqrt{(x_1-y_1)^2} = |x_1-y_1| . \end{equation} If $m=2$, i.e. $u$ and $v$ are two points in some plane, then $u=(x_1,x_2)$ and $v=(y_1,y_2)$ so \begin{equation} d(u,v) = d((x_1,x_2),(y_1,y_2)) = \sqrt{(x_1-y_1)^2 + (x_2-y_2)^2} . \end{equation} And, of course, if $m=3$, then $u$ and $v$ are two points in 3D space, and we would write that $u=(x_1,x_2,x_3)$ and that $v=(y_1,y_2,y_3)$ so that their distance is given by \begin{equation} d(u,v) = d((x_1,x_2,x_3),(y_1,y_2,y_3)) = \sqrt{(x_1-y_1)^2 + (x_2-y_2)^2 + (x_3-y_3)^2} . \end{equation} It should be apparent that our definition of the distance, which is called the Euclidean distance obeys the following properties:

• $d$ is always non-negative.
• $d(u,v) = 0$ if and only if $u=v$.
• $d(u,v) = d(v,u)$ .
• $d(u,w) \le d(u,v) + d(v,w)$ (triangle inequality).

In fact, a non-Euclidean space can be considered where a different function that follows these properties is given, and such a space is called a metric space, an area of advanced mathematical study.

Notation: The neighborhood (ball) $B$

Using the distance defined in the previous section, we will define another useful notation, $B$. Given a point in $\R^m$ ($m$-dimensional space) and a radius, $B$ will represent a neighborhood of points around the given point that are within the radius. Clearly, the 'B' stands for 'ball' but in fact only in 3D would it actually be a ball (sphere). In 1D, it would just be an open interval; in 2D, it would be an open disk; in 3D, it would be an open sphere. Beyond that, it would be considered an open 'hyper-sphere', but luckily we will not study spaces with more than three dimensions. Let $r>0$ and $u_0 \in \R^m$. Consider the set of all points $u\in\R^m$ whose distance from $u_0$ is strictly less than $r$. This is a 'ball' centered at $u_0$ with radius $r$. We denote this set by $B(u_0,r)$: \begin{equation} B(u_0,r) := \left\{u : d(u,u_0) < r \right\} . \end{equation} If $m=1$ let $u_0 = r_0$, then $B(u_0,r)$ is just the open interval $(r_0-r,r_0+r)$, so \begin{equation} B(u_0,r) = \left\{x : |x-r_0| < r \right\} . \end{equation} If $m=2$ let $u_0=(x_0,y_0)$ then $B(u_0,r)$ is an open disk \begin{equation} B(u_0,r) = \left\{(x,y) : (x-x_0)^2 + (y-y_0)^2 < r^2 \right\} . \end{equation} And finally, if $m=3$ let $u_0=(x_0,y_0,z_0)$ then $B(u_0,r)$ is an open sphere \begin{equation} B(u_0,r) = \left\{(x,y) : (x-x_0)^2 + (y-y_0)^2 + (z-z_0)^2 < r^2 \right\} . \end{equation}

Sequences in $\R^m$

We must develop the idea of sequences, since we will define limits in terms of sequences. Many textbooks define limits in terms of 'paths,' this is really the same idea, but a sequence is the formal expression of a 'path.' First recall that a sequence is an ordered set of points. Sequences are denoted just like sets, except that the order of the elements in a sequence matters. For example, the sets \begin{equation} \{a,b,c\} = \{a,c,b\} = \{c,b,a\} \end{equation} are all equivalent. However, the sequences \begin{equation} \{a,b,c\} \ne \{a,c,b\} \ne \{c,b,a\} \end{equation} are not the same (unless $a=b=c$). Sequences are more commonly denoted by elements that have subscripts that indicate their place in the sequence. For example, \begin{equation} \left\{u_n\right\}_{n=1}^\infty = \{u_1, u_2, u_3, \dots\} \end{equation} is an infinite sequence.

Definition Let $\{u_n\}$ be a sequence in $\R^m$, and let $u\in\R^m$. We say that the sequence $\{u_n\}$ converges to the point $u$ if \begin{equation} \lim\limits_{n\to\infty} d(u_n,u) = 0 , \end{equation} or equivalently, if for every $\epsilon>0$ there exists an integer $N$ such that $u_n$ is inside $B(u,\epsilon)$ for every $n\ge N$. In this case, we call $u$ the limit of the sequence $\{u_n\}$. We use the notation \begin{equation} u_n\to u \text{ as } n\to\infty \text{ or } \lim\limits_{n\to\infty} u_n = u . \end{equation} This definition basically means that for a specified value of $\epsilon$, there will be a number $N$ which represents a place in the sequence, where every element in the sequence after the $N^\mathrm{th}$ place will be within a radius $\epsilon$ of the limiting value, $u$. (It is very important to try to get used to this sort of language, because this is how calculus is expressed.)

Theorem Let $\{u_n\} = \{(x_n,y_n)\}$ be a sequence in $\Rtwo$, and let $(x,y)$ be a point in $\Rtwo$. Then, $\{(x_n,y_n)\}$ converges to $(x,y)$ if and only if $\{x_n\}$ converges to $x$ and $\{y_n\}$ converges to $y$. Similarly, if $\{u_n\} = \{(x_n,y_n, z_n)\}$ is a sequence in $\Rthree$, and $(x,y,z)$ is a point in $\Rthree$, $\{u_n\}$ converges to $(x,y,z)$ if and only if $\{x_n\}$ converges to $x$, $\{y_n\}$ converges to $y$, and $\{z_n\}$ converges to $z$. This theorem is crucial because it means that the convergence of a sequence in $\Rtwo$ or $\Rthree$ can be broken up into 2 convergence problems in $\R$ for $\Rtwo$ or three convergence problems in $\R$ for $\Rthree$. Here is a list of some important converging sequences and their limits:

• $\lim\limits_{n\to\infty} \dfrac{1}{n^p} = 0$, if $p>0$ .
• $\lim\limits_{n\to\infty} a^n = 0$, if $|a|<0$ .
• $\lim\limits_{n\to\infty} n^{\frac{1}{n}} = 1$ .
• $\lim\limits_{n\to\infty} a^{\frac{1}{n}} = 0$ if $a>0$ .
• $\lim\limits_{n\to\infty} \left(1+\dfrac{1}{n}\right)^n = e$ .

Supposing that as $n\to\infty$, $x_n\to L_1$ and $y_n\to L_2$ then the following properties hold:

• $\lim\limits_{n\to\infty} (x_n+y_n) = L_1 + L_2$
• $\lim\limits_{n\to\infty} (x_ny_n) = L_1L_2$
• $\lim\limits_{n\to\infty} \dfrac{x_n}{y_n} = \dfrac{L_1}{L_2}$

Example What is the limit of the sequence $\{u_n\} = \left\{\left(\left(1+\dfrac{1}{n}\right)^n, n^{1/n}\right)\right\} ?$ By the theorem given above, we can evaluate the limits individually. Since as $n\to\infty$, $\left(1+\dfrac{1}{n}\right)^n \to e$ and $n^{1/n} \to 1$, we can say that $\lim\limits_{n\to\infty} \{u_n\} = (e,1) .$

Limit of a Function

We are now ready to define the limit of a function of several variables.

Definition Let $f:\D\to\R$ be a function where $\D\subseteq\R^m$. Let the point $u_0\in\R^m$. A real number $L$ is called the limit of $f$ as $u\to u_0$ if, for every $\epsilon>0$, there exists $\delta>0$ such that if $u$ is in $B(u_0,\delta)$ and in $\D$ and $u\ne u_0$ implies that $|f(u) -L|<\epsilon$. We write that \begin{equation} \lim\limits_{u\to u_0} f(u) = L . \end{equation} This definition says $L$ is the limit of $f$ at $u_0$, if for a given $\epsilon$, you can specify a $\delta$ which serves as the radius of a neighborhood around the point $u_0$, where every point inside this neighborhood is mapped by $f$ to a number that is less than $\epsilon$ away from $L$. This is a crucial definition, and it is very important that you carefully read and re-read it until you understand what is meant here.

Example Prove that $\lim\limits_{(x,y)\to(0,0)} \frac{5x^2y}{x^2 + y^2} = 0 .$ Remember that the definition of a limit of a function requires us to find a $\delta$ for every value of $\epsilon$ that meets the conditions presented in the definition. So, you must begin by supposing that the limit is correct, and then deriving an expression for $\delta$ in terms of any choice of $\epsilon>0$ that satisfies the inequality from the definition of a limit. \begin{align} |f(u) - L| &= |f(u) - 0| \\ &= \left|\frac{5x^2y}{x^2 + y^2}\right| \\ &= 5|y|\frac{x^2}{x^2 + y^2} \\ &\le 5|y| \text{ because $\frac{x^2}{x^2 + y^2}\le 1$} \\ &\le 5\sqrt{x^2+y^2} \text{ because $|y|\le\sqrt{x^2+y^2}$} . \end{align}Now, if $u\in B(u_0,\delta)$, where $u_0=(0,0)$ and $u=(x,y)$, then $\sqrt{x^2+y^2} < \delta$, so\begin{align} |f(u) - L| &< 5\delta \\ \therefore \delta &= \epsilon/5 . \end{align}This means that for any $\epsilon>0$, we can choose $\delta=\epsilon/5$ which will satisfy the definition of the limit given above.\begin{align} \end{align} The definition of a limit of a function is very useful in proving that a conjecture of the limit of a function is indeed the limit of the function. In order to disprove a limit, we use the theorem to follow. It is also very useful for proving very simple limits.

Theorem Let $f:\D\to\R$ be a function where $\D\subseteq\R^m$. Let the point $u_0\in\R^m$. Let $L$ be a real number. Then \begin{equation} \lim\limits_{u\to u_0} f(u) = L \end{equation} if and only if, for every sequence $\{u_n\}_{n=1}^\infty$ in $\D$ with $\{u_n\}\to u_0$, $f(u_n)$ converges to $L$ as $n\to\infty$.

Example Prove that $\lim\limits_{(x,y)\to(1,2)} x^3+4xy = 9 .$ We will prove this limit using the theorem given above instead of the definition of the limit, since $f(1,2)$ is not indeterminate. The theorem states that $f\to L$ as $u\to u_0$, if for every $\{u_n\}\to u_0$, $f(u_n)\to L$. However, the theorem from the previous section states that $u_n=(x_n,y_n) \to u_0=(1,2)$ if $x_n\to1$ and $y_n\to2$. $f(u_n) = x_n^3+4x_ny_n = (1)^3+4(1)(2) = 9 .$

Example Prove that the following limit does not exist: $\lim\limits_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} .$ The sequence $u_n = (1/n,0)$ converges to $u_0=(0,0)$. And, we see that in this case $L_1 = f(u_n) = \frac{(1/n)^2 -0}{(1/n)^2 + 0} = 1 .$ However, the sequence $u_n = (0,1/n)$ also converges to $u_0$, and in this case we see that $L_2 = f(u_n) = \frac{0-(1/n)^2}{0+(1/n)^2} = -1 .$ Because the theorem requires that every sequence converging to $u_0$ give the same limit but we see that since $L_1 \ne L_2$, it is clear then that this limit does not exist.

Example Prove that the following limit does not exist: $\lim\limits_{(x,y)\to(0,0)} \left(\frac{x^2-y^2}{x^2+y^2}\right)^2 .$ As in the last example, $u_0=(0,0)$. And we again see that $(1/n,0)\to u_0$ which gives $f(1/n,0) = \left(\frac{(1/n)^2-0}{(1/n)^2+0}\right)^2 = 1 = L_1 .$ Now let's check the sequence $(0,1/n)\to u_0$ which gives $f(0,1/n) = \left(\frac{0-(1/n)^2}{0+(1/n)^2}\right)^2 = (-1)^2 = 1 = L_2 .$ So this time $L_1 = L_2$. Let's keep investigating. What about a sequence where $x_n=y_n$ as in $u_n=(1/n,1/n)\to u_0$. This gives $f(1/n,1/n) = \left(\frac{(1/n)^2-(1/n)^2}{(1/n)^2+(1/n)^2}\right)^2 = \left(\frac{(1/n)^2-(1/n)^2}{2(1/n)^2}\right)^2 = \left(\frac{1-1}{2}\right)^2 = 0 = L_3 .$ Thus we see that thought $L_1=L_2$, $L_3\ne L_1$ and $L_3\ne L_2$ so the limit does not exist.

Continuity of a Function

Having developed the theory behind the limit of a function of several variables, we are now equipped to define the continuity of a function of several variables, beginning with the definition.

Definition Let $f:\D\to\R$, where $\D\subseteq\R^m$, and let $u_0$ be a point in $\D$. We say that $f$ is continuous at $u_0$ if \begin{equation} \lim\limits_{u\to u_0} f(u) = f(u_0) . \end{equation} It also follows that $f$ is continuous on $\D$ if it is continuous at every point in $\D$.

Theorem Let $f:\D\to\R$ be a function defined on $\D\subseteq\R^m$, and let $u_0$ be a point in $\D$. Then, the following three statements are equivalent:

• $f$ is continuous at $u_0$;
• for every $\epsilon>0$ there exists $\delta>0$ such that $u\in\D \text{ and } u\in B(u_0,\delta) \text{ implies } |f(u)-f(u_0)|<\epsilon ;$
• for every sequence $\{u_n\}$ in $\D$ which converges to $u_0$, $f(u_n)$ converges to $f(u_0)$.

In the definition of the continuity of a function at a point, we simply require that the limit of the function to the point exists and is equal to the value of the function at that point. The theorem reformulates the definition in terms of theorems developed in the previous sections. It combines the definition of a limit, and the theorem expressing limits in terms of limits of sequences where the value of the limit is now taken to be the value of the function at the point.