Multivariate Calculus
&
Ordinary Differential Equations

Lecture 21



3 Partial Derivatives and Tangent Planes

We will need to consider derivatives of functions of more than one variable. To do this, we first check how the familiar concepts of limits and continuity extend to functions of more than one variable. This material is covered in Section 14.2 of Stewart.





3.1 Limits and Continuity

3.1.1 Review of the 1-variable case

Let $f:D\to\R$ be a function with domain $D$ an open subset of $\R$. For $a\in D$ we say that the limit $\displaystyle{\lim_{x \to a} f(x)}$ exists if and only if, (i) the limit from the left exists, (ii) the limit from the right exists, and (iii) these two limits coincide, i.e., \[ \lim_{x \to a^-} f(x)=\lim_{x \to a^+} f(x). \]





3.1 Limits and Continuity

3.1.1 Review of the 1-variable case

Let $f:D\to\R$ be a function with domain $D$ an open subset of $\R$. For $a\in D$ we say that the limit $\displaystyle{\lim_{x \to a} f(x)}$ exists if and only if, (i) the limit from the left exists, (ii) the limit from the right exists, and (iii) these two limits coincide, i.e., \[ \lim_{x \to a^-} f(x)=\lim_{x \to a^+} f(x). \]

Furthermore, if the limit exists and is equal the actual value of $f$ at $a,$ i.e., if \[ \lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = f(a), \] we say that $f$ is continuous at $x=a.$



3.1 Limits and Continuity

If $f$ is continuous on all of $D$ we say that $f$ is a continuous function on $D$.



3.1 Limits and Continuity

3.1.1 Review of the 1-variable case

We can also consider the limit for points on the boundary of the domain $D$ of a function. For example, if $f:(0,2)\to\R$ is defined by $f(x)=1/x,$ then \[ \lim_{x\to 2^{-}}f(x)=\frac{1}{2} \]

but $ \ds \lim_{x\to 0^{+}} f(x) $ does not exist.



3.1 Limits and Continuity

3.1.1 Review of the 1-variable case

Another instructive example is $f:\R\backslash\{0\}\to \R$ given by $f(x)=x^2.$ The domain is now the punctured real line, i.e., $D=(-\infty,0)\cup(0,\infty),$ but \[ \lim_{x\to 0^-} f(x)=\lim_{x\to 0^+} f(x)=0. \]

In this situation we also say that $\ds\lim_{x\to 0} f(x)$ exists and in fact one can fix the hole by defining $f(0)=0,$ to extend $f$ to a continuous function on all of $\R.$



3.1 Limits and Continuity

3.1.1 Review of the 1-variable case

Important remark: Never, ever compute $\ds\lim_{x\to a}f(x)$ by blindly substituting $\,x=a\,$ in $\,f.$ For example, if \[ f(x)=\begin{cases} x^2 & \text{for $x\neq 3$} \\ \pi & \text{for $x=3$}, \end{cases} \]

then $\ds \lim_{x\to 3} f(x)$ exists and is given by $9$ which is not equal to $\pi$: the function $f$ is not continuous at $x=3$.



3.1 Limits and Continuity

3.1.1 Review of the 1-variable case

As a second example, if $f:D\to \R$ with $D=\R\backslash\{1\}$ is given by \[ f(x)=\frac{x^2-1}{x-1}, \] then $\ds \lim_{x\to 1}f(x)=2$.

Those (and there will be some) who write "This limit gives $0/0$ which does not exist" should hang their heads in shame.



3.1 Limits and Continuity

3.1.2 Multivariable limits

When $f$ is a function of more than one variable, the situation is more interesting. There are more than two ways to approach a given point of interest. Consider the function \[ f(x,y)=\frac{x^2}{x^2+y^2} \] with domain given by $\R^2\backslash\{(0,0)\}$.

To see the graph of $f$ in Matlab, type


							ezsurf('x^2/(x^2+y^2)')
						


3.1 Limits and Continuity

3.1 Limits and Continuity

3.1.2 Multivariable limits

Next we consider the limit as $(x,y)\to(0,0)$.

(i) Approaching the origin along $y=0$:



(ii) Approaching the origin along $x=0$:



Does $\displaystyle{\lim_{(x,y)\ra(0,0)}f(x,y)}$ exist?



3.1 Limits and Continuity

3.1.2 Multivariable limits

In general, for the limit $\displaystyle{ \lim_{(x,y) \to (a,b)} f(x,y)}$ to exist, it is necessary that every path in $D$ approaching $(a,b)$ (the point $(a,b)$ itself may or may not be in $D$) gives the same limiting value. This gives us the following method for finding if a limit does not exist.

Test for showing no limit exists

If $\begin{cases} f(x,y)\to L_1 & \text{as $(x,y) \to (a,b)$ along the path $C_1\in D$} \\[2mm] f(x,y)\to L_2 & \text{as $(x,y) \to (a,b)$ along the path $C_2\in D$} \end{cases}$

such that $L_1\neq L_2,$ then the limit $\ds{\lim_{(x,y) \to (a,b)}f(x,y)}$ does not exist.



3.1 Limits and Continuity

Test for showing no limit exists

If $\begin{cases} f(x,y)\to L_1 & \text{as $(x,y) \to (a,b)$ along the path $C_1\in D$} \\[2mm] f(x,y)\to L_2 & \text{as $(x,y) \to (a,b)$ along the path $C_2\in D$} \end{cases}$

such that $L_1\neq L_2,$ then the limit $\ds{\lim_{(x,y) \to (a,b)}f(x,y)}$ does not exist.

Important remark: The above notation is somewhat deficient and perhaps one should write \[ \displaystyle{\lim_{(x,y) \rightarrow_D (a,b)}f(x,y)} \] to indicate that only paths in $D$ terminating in $(a,b)$ (which itself may or may not be in $D$) are considered. For example, if $f(x,y)=x^2+y^2$ with $D=\{(x,y):~x^2+y^2\lt 1\}$ then $\lim_{(x,y)\to (1,0)} f(x,y)$ exists and is $1$.



3.1 Limits and Continuity

Important remark: The above notation is somewhat deficient and perhaps one should write \[ \displaystyle{\lim_{(x,y) \rightarrow_D (a,b)}f(x,y)} \] to indicate that only paths in $D$ terminating in $(a,b)$ (which itself may or may not be in $D$) are considered. For example, if $f(x,y)=x^2+y^2$ with $D=\{(x,y):~x^2+y^2\lt 1\}$ then $\lim_{(x,y)\to (1,0)} f(x,y)$ exists and is $1$.

However, if \[ f(x,y)=\begin{cases} x^2+y^2 & \text{for $D=\{(x,y):~x^2+y^2\lt1\}$} \\ 0 & \text{for $D=\{(x,y):~x^2+y^2\gt1\}$} \end{cases} \] then $\lim_{(x,y)\to (1,0)} f(x,y)$ does not exist.


3.1 Limits and Continuity

Let $D=\R\backslash\{(0,0)\}$ and $f:D\to \R$ be given by $\displaystyle f(x,y)=\frac{x^2-y^2}{x^2+y^2}. $ Show that $\lim_{(x,y)\to (0,0)} f(x,y)$ does not exist.









3.1 Limits and Continuity

With the same $D$ as above but now $\displaystyle f(x,y)=\frac{xy}{x^2+y^2}, $ show that $\lim_{(x,y)\to (0,0)} f(x,y)$ does not exist.









3.1 Limits and Continuity

3.1.2 Multivariable limits

Important remark: There are infinitely many paths terminating in a given point, say $(a,b),$ in $\R^2,$ raising the question if one can ever prove that $\lim_{(x,y)\to (a,b)}f(x,y)$ does exist. The good news is that there are methods that can deal with infinitely many paths simultaneously. The good news is that there are methods that can deal with infinitely many paths simultaneously. The bad news is that these methods (typically $\epsilon$-$\delta$ proofs) are not part of this course.





3.1 Limits and Continuity

3.1.2 Multivariable limits

Important remark: There are infinitely many paths terminating in a given point, say $(a,b),$ in $\R^2,$ raising the question if one can ever prove that $\lim_{(x,y)\to (a,b)}f(x,y)$ does exist. The good news is that there are methods that can deal with infinitely many paths simultaneously. The good news is that there are methods that can deal with infinitely many paths simultaneously. The bad news is that these methods (typically $\epsilon$-$\delta$ proofs) are not part of this course.

See Stewart Sec 14.2, Example 4 for a rigorous $\epsilon$-$\delta$ proof that

$\ds \lim_{(x,y)\to (0,0)} f(x,y)=0, $

where

$\ds f(x,y)=\frac{3x^2y}{(x^2+y^2)}$

and $D=\R^2\backslash\{(0,0)\}$.





3.1 Limits and Continuity

3.1.2 Multivariable limits

Example: Give a non-rigorous proof that the above limit is indeed correct by writing $x=r\cos\theta$ and $y=r\sin\theta$.

We have

$\qquad f\left(r \cos \theta, r\sin \theta\right) = \dfrac{3(r\cos \theta)^2(r\sin \theta)}{(r\cos \theta)^2+(r\sin \theta)^2}$

$\qquad \;\qquad \qquad \qquad = \dfrac{3r^3\cos^2 \theta\sin \theta}{r^2}$ $=3r\cos^2 \theta\sin \theta$

Note that

$ -1\leq $ $ \cos^2 \theta\sin \theta$ $\leq 1$

$ -3r\leq $ $ 3r\cos^2 \theta\sin \theta$ $\leq 3r$



3.1 Limits and Continuity

3.1.2 Multivariable limits

Example: Give a non-rigorous proof that the above limit is indeed correct by writing $x=r\cos\theta$ and $y=r\sin\theta$.

By the squeeze theorem

$ 0 =$ $ \ds \lim_{r\to 0} -3r\leq $ $\ds \lim_{r\to 0} 3r\cos^2 \theta\sin \theta$ $\ds \leq\lim_{r\to 0} 3r$ $ =0 $

Hence $\,\ds \lim_{(x,y)\to (0,0)}\frac{3x^2y}{(x^2+y^2)} $ $=\ds \lim_{r\to 0} 3r\cos^2 \theta\sin \theta$ $=0.$

With this fact we can define $f$ in all $\R^2$ as

$\ds f(x,y)= \left\{ \begin{array}{cr} \dfrac{3x^2y}{(x^2+y^2)}, & (x,y)\neq 0\\ 0, & (x,y)=0 \end{array} \right. .$



3.1 Limits and Continuity

3.1.3 Multivariable continuity

Definition. Let $f:D\to\R$ be a function with domain $D,$ an open subset of $\R^2.$ Let $(a,b)\in D.$ Then $f(x,y)$ is continuous at $(a,b)$ if \[ \lim_{(x,y) \to (a,b)}f(x,y)=f(a,b), \]

i.e., the limit $(x,y)\to (a,b)$ of $f(x,y)$ exists and is equal to $f(a,b).$

If a function is continuous on all of $D$ we say simply that it is continuous on $D.$ Most of the functions we will consider are continuous. For example, polynomials in $x$ and $y$ are continuous on $\R^2.$ As a rule of thumb, if a function with domain $D$ is defined by a single expression it will be continuous on $D.$



3.1 Limits and Continuity

3.1.3 Multivariable continuity

Example: Returning to the first example, where $\displaystyle f(x,y) =\frac{x^2 - y^2}{x^2 + y^2}$ and $D=\R^2\backslash\{(0,0)\},$ is $f(x,y)$ a continuous function?

Here

$f(x,y )=\dfrac{P(x,y)}{Q(x,y)}$

with $P(x,y) = x^2-y^2$ and $Q(x,y) = x^2+y^2.$

Note that $Q(x,y) \neq 0.$ The point $(0,0) \notin D. $ Thus $f$ is continuous for all $(x,y)\in D.$



3.1 Limits and Continuity

3.1.3 Multivariable continuity

Example: If we edit the above example by instead defining $f$ on all of $\R^2$ by taking $f(0,0)=0,$ then is $f$ a continuous function?

No, all of a sudden $f$ would no longer be a continuous function: $f$ would be continuous on all of $D$ except for the point $(0,0)$. That is

$$\ds f(x,y)= \left\{ \begin{array}{cr} \dfrac{x^2 - y^2}{x^2 + y^2}, & (x,y)\neq 0\\ 0, & (x,y)=0 \end{array} \right. $$

is not continuous, since $$\lim_{(x,y)\to (0,0)}\dfrac{x^2 - y^2}{x^2 + y^2} = \text{does not exist!}$$




3.1 Limits and Continuity

3.1.4 Main points


  • You should be able to show when a limit does not exist.
  • You should understand continuity of multivariate functions.





Credits