← M408M Week 10: Functions of Several Variables, Limits & Continuity
M408M · Week 10 Stewart §14.1–14.2

Functions of Several Variables, Limits & Continuity

Outline

  1. 1Domain and range of $f(x,y)$
  2. 2Graphs and level curves
  3. 3Limits: showing a limit does not exist with two paths
  4. 4Limits: proving a limit exists with the Squeeze Theorem
  5. 5Continuity and piecewise functions
  6. 6Exercises
§14.1 · Functions of two variables

Functions of two variables: domain and range

A function $f$ of two variables assigns to each point $(x,y)$ in a set $D$ exactly one number $f(x,y)$, for example the temperature $T(x,y)$ at longitude $x$ and latitude $y$.

Domain $D$
All $(x,y)$ where the formula is defined.
Range
All values $f(x,y)$ takes: a set of real numbers.

Finding the domain

Part of the formulaRequirement
Square root $\sqrt{u}$$u\ge 0$
Fraction $p/q$$q\ne 0$
Logarithm $\ln u$$u>0$

Example: $f(x,y)=\dfrac{\sqrt{x+y+1}}{x-1}$

  1. Square root: $x+y+1\ge 0$, the half-plane on or above the line $y=-x-1$.
  2. Fraction: $x\ne 1$, so remove the vertical line $x=1$.
  3. Value at a point of $D$: $\;f(3,2)=\sqrt{6}/2\approx 1.225$.

Click the plane to move the test point

§14.1 · Graphs

The graph of $f(x,y)$ is a surface

Plot the height $z=f(x,y)$ above each point $(x,y)$ of the domain.

$$\text{graph of }f=\{(x,y,z)\mid z=f(x,y),\ (x,y)\in D\}$$

Each point of $D$ has one height, so a vertical line meets the graph at most once.

Examples

FunctionGraph
$f(x,y)=6-3x-2y$Plane through $(2,0,0)$, $(0,3,0)$, $(0,0,6)$
$g(x,y)=\sqrt{9-x^2-y^2}$Upper hemisphere of radius $3$
$h(x,y)=4x^2+y^2$Elliptic paraboloid

Sketching with traces: $h(x,y)=4x^2+y^2$

Cut with the planeTrace
$x=0$Parabola $z=y^2$
$y=0$Parabola $z=4x^2$
$z=k>0$Ellipse $4x^2+y^2=k$

Drag to rotate · double-click to reset

§14.1 · Level curves

Level curves and contour maps

A level curve is the set of points in the $xy$-plane where $f$ has a fixed value $k$.

$$\text{level curve at height }k:\qquad f(x,y)=k$$
From the graph
The trace of the surface in the plane $z=k$, moved down to the $xy$-plane.
Contour map
Level curves for equally spaced $k$, like the elevation lines on a topographic map.
Spacing
Close curves: $f$ changes quickly (steep). Far apart: $f$ changes slowly.

Example: $h(x,y)=4x^2+y^2+1$

Setting $h(x,y)=k$ gives $4x^2+y^2=k-1$.

Height $k$Level curve
$k>1$Ellipse $4x^2+y^2=k-1$
$k=1$The single point $(0,0)$
$k<1$No points

Left: drag to rotate · Right: contour map in the $xy$-plane

§14.2 · Limits

The limit of $f(x,y)$ as $(x,y)\to(a,b)$

$f(x,y)$ must approach the same number $L$ no matter how $(x,y)$ approaches $(a,b)$.

Definition

$$\lim_{(x,y)\to(a,b)}f(x,y)=L$$

means: $f(x,y)$ is as close to $L$ as we like for all $(x,y)\ne(a,b)$ close enough to $(a,b)$.

Precisely: for every $\varepsilon>0$ there is a $\delta>0$ such that $0<\sqrt{(x-a)^2+(y-b)^2}<\delta$ implies $|f(x,y)-L|<\varepsilon$.

The definition uses only the distance to $(a,b)$, not the direction. In one variable there are two directions (left and right); in the plane there are infinitely many paths.

Two-path test: the limit does not exist

If $f(x,y)\to L_1$ along a path $C_1$ and $f(x,y)\to L_2$ along a path $C_2$, with $L_1\ne L_2$, then $\displaystyle\lim_{(x,y)\to(a,b)}f(x,y)$ does not exist.
Common paths into $(0,0)$Substitute
$x$-axis / $y$-axis$y=0$ / $x=0$
Lines$y=mx$
Parabolas$y=mx^2$ or $x=my^2$
Matching paths are not a proof. Getting the same value along many paths does not prove the limit exists. To prove it, use the Squeeze Theorem or continuity.
§14.2 · Limits along paths

Two paths with different limits

Does $\displaystyle\lim_{(x,y)\to(0,0)}\frac{xy}{x^2+y^2}$ exist?

  1. $x$-axis ($y=0$): $\;f(x,0)=\dfrac{0}{x^2}=0$, so $f\to 0$.
  2. $y$-axis ($x=0$): $\;f(0,y)=\dfrac{0}{y^2}=0$, so $f\to 0$. The same value does not prove anything yet.
  3. Line $y=x$: $\;f(x,x)=\dfrac{x^2}{2x^2}=\dfrac12$, so $f\to\dfrac12$.
$$0\ne\tfrac12\implies\lim_{(x,y)\to(0,0)}\frac{xy}{x^2+y^2}\ \text{does not exist}$$

All lines at once: $y=mx$

$$f(x,mx)=\frac{mx^2}{x^2+m^2x^2}=\frac{m}{1+m^2}$$

The value depends on the slope $m$: each line through the origin has its own constant height. In the figure, the surface has a different height along each ray, so it has no single height at $(0,0)$.

Drag to rotate · double-click to reset

§14.2 · Limits along curves

Every line can give the same value, and the limit can still fail

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

  1. Lines $y=mx$: $\;f(x,mx)=\dfrac{m^2x^3}{x^2+m^4x^4}=\dfrac{m^2x}{1+m^4x^2}\to 0$.
  2. $y$-axis ($x=0$): $\;f(0,y)=0\to 0$. Every line through the origin gives $0$.
  3. Parabola $x=y^2$: $\;f(y^2,y)=\dfrac{y^4}{y^4+y^4}=\dfrac12\to\dfrac12$.
$$0\ne\tfrac12\implies\text{the limit does not exist}$$

How to choose the curve

Pick a path that makes the terms of the denominator the same size. Here $x^2$ and $y^4$ are equal when $x=y^2$.

$$x=cy^2:\quad f(cy^2,y)=\frac{cy^4}{c^2y^4+y^4}=\frac{c}{c^2+1}$$

The same idea works for other powers: for $x^4$ and $y^2$ in the denominator, try $y=cx^2$.

Drag to rotate · double-click to reset

§14.2 · Squeeze Theorem

Proving a limit exists: the Squeeze Theorem

Trap $f$ between two functions that have the same limit $L$. The value of $L$ can be any number.

$$g\le f\le h\ \text{ near }(a,b)\ \text{ and }\ g,h\to L\implies f\to L$$
Common setup
Show $|f-L|\le B$ with $B\to 0$. This is the case $g=L-B$, $h=L+B$.
Useful bounds
$0\le\dfrac{x^2}{x^2+y^2}\le 1,\quad |x|\le\sqrt{x^2+y^2},\quad |y|\le\sqrt{x^2+y^2}$

Example 1: $L=0$

$$\lim_{(x,y)\to(0,0)}\frac{3x^2y}{x^2+y^2}$$
  1. Bound: the fraction $\dfrac{x^2}{x^2+y^2}\le 1$, so
    $$|f-0|=3|y|\cdot\frac{x^2}{x^2+y^2}\le 3|y|$$
  2. Squeeze: both bounds $\pm3|y|\to 0$.
$$\text{limit}=0$$

Example 2: $L=1$

$$\lim_{(x,y)\to(0,0)}\frac{x^2\cos y+y^2}{x^2+y^2}$$
  1. Bound: $\cos y\le 1$ gives $x^2\cos y\le x^2$ and $y^2\cos y\le y^2$, so
    $$\cos y\le\frac{x^2\cos y+y^2}{x^2+y^2}\le 1$$
  2. Squeeze: both bounds $\cos y,\,1\to 1$.
$$\text{limit}=1$$

Drag to rotate · double-click to reset

§14.2 · Continuity

Continuity

$f$ is continuous at $(a,b)$ when the limit equals the value. Then a small change in $(x,y)$ gives a small change in $f(x,y)$, and the graph has no hole or break there.

Definition

$$\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b)$$

This requires three things: $f(a,b)$ is defined, the limit exists, and the two are equal.

Polynomials
Continuous on all of $\mathbb R^2$.
Rational functions
Continuous wherever the denominator is not $0$.
Combinations
Sums, products, quotients, and compositions of continuous functions are continuous where defined.

Direct substitution

At a point of continuity, the limit is the value:

$$\lim_{(x,y)\to(1,2)}\big(x^2y^3-x^3y^2+3x+2y\big)=8-4+3+4=11$$
$$\lim_{(x,y)\to(-2,3)}\frac{x^2y+1}{x^3y^2-2x}=\frac{12+1}{-72+4}=-\frac{13}{68}$$

Compositions

$e^{-(x^2+y^2)}$ is continuous on $\mathbb R^2$. $\;\arctan(y/x)$ is continuous except on the line $x=0$, where $y/x$ is undefined.

Substitution fails at $0/0$. If the denominator is $0$ at $(a,b)$, the function is not defined there; use paths or the Squeeze Theorem.
§14.2 · Piecewise functions

Continuity of a piecewise function

Check every point of $\mathbb R^2$. The formula decides most points; only points where the formula breaks down need a limit.

Method

  1. Where the formula is defined: a rational function is continuous wherever its denominator is not $0$.
  2. Find the problem points: solve denominator $=0$. Only these points can be discontinuities.
  3. At a problem point $(a,b)$ with assigned value $k$: $f$ is continuous there exactly when $\lim\limits_{(x,y)\to(a,b)}f(x,y)$ exists and equals $k$.

Example 1: $f(x,y)=\dfrac{x^2-y^2}{x^2+y^2}$, $\ f(0,0)=k$

$x^2+y^2=0$ only at $(0,0)$, so $f$ is continuous at every other point. At $(0,0)$, the $x$-axis gives $1$ and the $y$-axis gives $-1$: no limit. Discontinuous at $(0,0)$ for every $k$.

Example 2: $f(x,y)=\dfrac{3x^2y}{x^2+y^2}$, $\ f(0,0)=k$

Again only $(0,0)$ needs checking, and there the limit is $0$ (slide 8). Continuous on $\mathbb R^2$ exactly when $k=0$; for $k\ne 0$, continuous except at $(0,0)$.

Drag to rotate · double-click to reset

Exercises

Practice: limits and continuity

Try all three problems before checking the solutions on the next slides. Justify each answer.

Exercise 1 · Limits along paths

Determine whether each limit exists.

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

Exercise 2 · Squeeze Theorem

Find each limit. Use an inequality and the Squeeze Theorem.

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

Exercise 3 · Piecewise continuity

For $k\in\mathbb R$, define

$$H_k(x,y)=\begin{cases}\dfrac{x^2y^4}{x^2+y^8}, & (x,y)\ne(0,0)\\[6pt] k, & (x,y)=(0,0)\end{cases}$$
  1. Determine all points at which $H_k$ is continuous. For what $k$ is $H_k$ continuous on all of $\mathbb R^2$?
  2. Define $K_k$ the same way with $\dfrac{2xy^4}{x^2+y^8}$. Is there a $k$ for which $K_k$ is continuous on $\mathbb R^2$?
Solution · Exercise 1

Solution 1: limits along paths

Two paths with different limits show that a limit does not exist.

(a) $\lim\limits_{(x,y)\to(0,0)}\dfrac{x^2+2xy}{x^2+3y^2}$

  1. $x$-axis ($y=0$): $\;f(x,0)=\dfrac{x^2}{x^2}=1\to 1$
  2. $y$-axis ($x=0$): $\;f(0,y)=\dfrac{0}{3y^2}=0\to 0$
$$1\ne 0\implies\text{the limit does not exist}$$

(b) $\lim\limits_{(x,y)\to(0,0)}\dfrac{2xy^4}{x^2+y^8}$

  1. Lines $y=mx$: $\;F(x,mx)=\dfrac{2m^4x^3}{1+m^8x^6}\to 0$
  2. $y$-axis ($x=0$): $\;F(0,y)=0\to 0$. Every line gives $0$.
  3. Curve $x=y^4$ (makes $x^2=y^8$): $\;F(y^4,y)=\dfrac{2y^8}{y^8+y^8}=1\to 1$
$$0\ne 1\implies\text{the limit does not exist}$$

(b) Values of $F$ along three paths

Paths: $(0,t)$, $(t,t)$, $(t^4,t)$

Solution · Exercises 2–3

Solutions 2–3: Squeeze Theorem and continuity

Continuity at $(0,0)$ needs the limit to exist and to equal the assigned value $k$.

Exercise 2 · Squeeze Theorem

(a) $\lim\limits_{(x,y)\to(0,0)}\dfrac{x^2y^4}{x^2+y^8}$

Bound: $x^2\le x^2+y^8$, so

$$0\le\frac{x^2y^4}{x^2+y^8}=y^4\cdot\frac{x^2}{x^2+y^8}\le y^4$$
$$\text{Squeeze: } y^4\to 0\implies\text{limit}=0$$

(b) $\lim\limits_{(x,y)\to(0,0)}\dfrac{x^3+y^3}{x^2+y^2}$

Bound: split the fraction; each piece has a factor $\le 1$:

$$\left|\frac{x^3+y^3}{x^2+y^2}\right|\le|x|\cdot\frac{x^2}{x^2+y^2}+|y|\cdot\frac{y^2}{x^2+y^2}\le|x|+|y|$$
$$\text{Squeeze: } \pm(|x|+|y|)\to 0\implies\text{limit}=0$$

Exercise 3 · Piecewise continuity

(a) $H_k$, built from $\dfrac{x^2y^4}{x^2+y^8}$

  1. Away from $(0,0)$: a rational function with denominator $x^2+y^8>0$, so continuous for every $k$.
  2. At $(0,0)$: the limit is $0$ by 2(a), so continuous exactly when $k=0$.
$$k=0:\ \text{continuous on }\mathbb R^2;\qquad k\ne 0:\ \text{on }\mathbb R^2\setminus\{(0,0)\}$$

(b) $K_k$, built from $\dfrac{2xy^4}{x^2+y^8}$

  1. Away from $(0,0)$: continuous for every $k$, as in (a).
  2. At $(0,0)$: the limit does not exist by 1(b), so no value of $k$ can equal it.
$$\text{No such }k:\ K_k\text{ is continuous only on }\mathbb R^2\setminus\{(0,0)\}$$
§14.1–14.2 · Summary

Summary: key definitions and methods

§14.1 describes functions of several variables; §14.2 studies their limits and continuity.

ConceptDefinition / Method
Domain of $f(x,y)$All $(x,y)$ where the formula is defined: $\sqrt{u}$ needs $u\ge 0$, denominators $\ne 0$, $\ln u$ needs $u>0$
GraphThe surface $z=f(x,y)$ over the domain $D$
Level curve$f(x,y)=k$ in the $xy$-plane. Close level curves mean $f$ changes quickly
Limit does not existFind two paths into $(a,b)$ with different limits: axes, lines $y=mx$, curves such as $x=cy^2$ that make the denominator terms equal size
Limit exists (Squeeze Theorem)$g\le f\le h$ with $g,h\to L$; often $|f-L|\le B\to 0$, using $0\le\dfrac{x^2}{x^2+y^2}\le 1$, $\;|x|,|y|\le\sqrt{x^2+y^2}$
Continuity at $(a,b)$$\displaystyle\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b)$; polynomials and rational functions (where defined) are continuous
Piecewise functionContinuous wherever the formula's denominator $\ne 0$; at a point where it is $0$, continuous exactly when the limit exists and equals the assigned value