Functions of Several Variables, Limits & Continuity
Outline
- 1Domain and range of $f(x,y)$
- 2Graphs and level curves
- 3Limits: showing a limit does not exist with two paths
- 4Limits: proving a limit exists with the Squeeze Theorem
- 5Continuity and piecewise functions
- 6Exercises
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 formula | Requirement |
|---|---|
| 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}$
- Square root: $x+y+1\ge 0$, the half-plane on or above the line $y=-x-1$.
- Fraction: $x\ne 1$, so remove the vertical line $x=1$.
- Value at a point of $D$: $\;f(3,2)=\sqrt{6}/2\approx 1.225$.
Click the plane to move the test point
The graph of $f(x,y)$ is a surface
Plot the height $z=f(x,y)$ above each point $(x,y)$ of the domain.
Each point of $D$ has one height, so a vertical line meets the graph at most once.
Examples
| Function | Graph |
|---|---|
| $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 plane | Trace |
|---|---|
| $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
Level curves and contour maps
A level curve is the set of points in the $xy$-plane where $f$ has a fixed value $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
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
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
| 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$ |
Two paths with different limits
Does $\displaystyle\lim_{(x,y)\to(0,0)}\frac{xy}{x^2+y^2}$ exist?
- $x$-axis ($y=0$): $\;f(x,0)=\dfrac{0}{x^2}=0$, so $f\to 0$.
- $y$-axis ($x=0$): $\;f(0,y)=\dfrac{0}{y^2}=0$, so $f\to 0$. The same value does not prove anything yet.
- Line $y=x$: $\;f(x,x)=\dfrac{x^2}{2x^2}=\dfrac12$, so $f\to\dfrac12$.
All lines at once: $y=mx$
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
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?
- Lines $y=mx$: $\;f(x,mx)=\dfrac{m^2x^3}{x^2+m^4x^4}=\dfrac{m^2x}{1+m^4x^2}\to 0$.
- $y$-axis ($x=0$): $\;f(0,y)=0\to 0$. Every line through the origin gives $0$.
- Parabola $x=y^2$: $\;f(y^2,y)=\dfrac{y^4}{y^4+y^4}=\dfrac12\to\dfrac12$.
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$.
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
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.
- 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$
- 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|$$
- Squeeze: both bounds $\pm3|y|\to 0$.
Example 2: $L=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$$
- Squeeze: both bounds $\cos y,\,1\to 1$.
Drag to rotate · double-click to reset
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
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:
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.
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
- Where the formula is defined: a rational function is continuous wherever its denominator is not $0$.
- Find the problem points: solve denominator $=0$. Only these points can be discontinuities.
- 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
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.
- $$\lim_{(x,y)\to(0,0)}\frac{x^2+2xy}{x^2+3y^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.
- $$\lim_{(x,y)\to(0,0)}\frac{x^2y^4}{x^2+y^8}$$
- $$\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
- Determine all points at which $H_k$ is continuous. For what $k$ is $H_k$ continuous on all of $\mathbb R^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 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}$
- $x$-axis ($y=0$): $\;f(x,0)=\dfrac{x^2}{x^2}=1\to 1$
- $y$-axis ($x=0$): $\;f(0,y)=\dfrac{0}{3y^2}=0\to 0$
(b) $\lim\limits_{(x,y)\to(0,0)}\dfrac{2xy^4}{x^2+y^8}$
- Lines $y=mx$: $\;F(x,mx)=\dfrac{2m^4x^3}{1+m^8x^6}\to 0$
- $y$-axis ($x=0$): $\;F(0,y)=0\to 0$. Every line gives $0$.
- Curve $x=y^4$ (makes $x^2=y^8$): $\;F(y^4,y)=\dfrac{2y^8}{y^8+y^8}=1\to 1$
(b) Values of $F$ along three paths
Paths: $(0,t)$, $(t,t)$, $(t^4,t)$
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
(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$:
Exercise 3 · Piecewise continuity
(a) $H_k$, built from $\dfrac{x^2y^4}{x^2+y^8}$
- Away from $(0,0)$: a rational function with denominator $x^2+y^8>0$, so continuous for every $k$.
- At $(0,0)$: the limit is $0$ by 2(a), so continuous exactly when $k=0$.
(b) $K_k$, built from $\dfrac{2xy^4}{x^2+y^8}$
- Away from $(0,0)$: continuous for every $k$, as in (a).
- At $(0,0)$: the limit does not exist by 1(b), so no value of $k$ can equal it.
Summary: key definitions and methods
§14.1 describes functions of several variables; §14.2 studies their limits and continuity.
| Concept | Definition / 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$ |
| Graph | The 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 exist | Find 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 function | Continuous 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 |