Math Core

Lesson 3.2 · Partial Derivatives

Limits and continuity

In one variable, xx can approach aa from only two directions: the left and the right. In the plane, a point (x,y)(x, y) can approach (a,b)(a, b) along infinitely many lines and curves. That extra freedom makes limits of functions of two variables more delicate, and it is the main thing to understand before defining derivatives in several variables.

What the limit means

Definition

Limit of a function of two variables

We write lim⁡(x,y)→(a,b)f(x,y)=L\displaystyle\lim_{(x, y) \to (a, b)} f(x, y) = L if the values f(x,y)f(x, y) get arbitrarily close to LL whenever (x,y)(x, y) is close enough to (a,b)(a, b), with (x,y)≠(a,b)(x, y) \ne (a, b). Precisely: for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that 0<(x−a)2+(y−b)2<δ0 < \sqrt{(x - a)^2 + (y - b)^2} < \delta implies ∣f(x,y)−L∣<ε\lvert f(x, y) - L\rvert < \varepsilon.

The key phrase is "whenever (x,y)(x, y) is close enough." The definition does not care which route (x,y)(x, y) takes. Every route into (a,b)(a, b) has to produce the same limit LL.

Continuous functions: substitute

A function is continuous at (a,b)(a, b) if lim⁡(x,y)→(a,b)f(x,y)=f(a,b)\displaystyle\lim_{(x, y) \to (a, b)} f(x, y) = f(a, b). The limit laws you know (sums, products, quotients with nonzero denominators, compositions) all hold in two variables, so the following functions are continuous wherever they are defined:

  • polynomials in xx and yy, such as x3y−5xy2+7x^3 y - 5xy^2 + 7,
  • rational functions (quotients of polynomials) wherever the denominator is nonzero,
  • compositions of continuous functions, such as exye^{xy}, sin⁡(x2+y)\sin(x^2 + y) and ln⁡(1+x2+y2)\ln(1 + x^2 + y^2).

For these, the limit is found by direct substitution.

Worked example: Direct substitution

Evaluate lim⁡(x,y)→(1,2)x2y+3x+y\displaystyle\lim_{(x, y) \to (1, 2)} \frac{x^2 y + 3}{x + y}.

This is a rational function, and the denominator at (1,2)(1, 2) is 3≠03 \ne 0. Substitute:

(1)2(2)+31+2=53.\frac{(1)^2(2) + 3}{1 + 2} = \frac{5}{3}.

When substitution gives 00\tfrac{0}{0}, algebra sometimes helps, just as in one variable. For example,

lim⁡(x,y)→(2,2)x2−y2x−y=lim⁡(x,y)→(2,2)(x+y)=4,\lim_{(x, y) \to (2, 2)} \frac{x^2 - y^2}{x - y} = \lim_{(x, y) \to (2, 2)} (x + y) = 4,

because the factor x−yx - y cancels at every point off the line y=xy = x. The points on that line are outside the domain of the original function, and a limit only considers points in the domain, so the cancellation is valid.

Showing a limit does not exist: two paths

If f(x,y)→L1f(x, y) \to L_1 along one path into (a,b)(a, b) and f(x,y)→L2f(x, y) \to L_2 along another, with L1≠L2L_1 \ne L_2, then the limit does not exist.

The two-path test

To show lim⁡(x,y)→(a,b)f(x,y)\displaystyle\lim_{(x, y) \to (a, b)} f(x, y) does not exist, find two paths into (a,b)(a, b) that give different limiting values. Good paths to try at the origin: the xx-axis (y=0y = 0), the yy-axis (x=0x = 0), lines y=mxy = mx, and parabolas y=x2y = x^2 or x=y2x = y^2.

Worked example: Different limits along the axes

Show that lim⁡(x,y)→(0,0)x2−y2x2+y2\displaystyle\lim_{(x, y) \to (0, 0)} \frac{x^2 - y^2}{x^2 + y^2} does not exist.

Along the xx-axis, y=0y = 0 and x≠0x \ne 0: the function equals x2x2=1\dfrac{x^2}{x^2} = 1.

Along the yy-axis, x=0x = 0 and y≠0y \ne 0: the function equals −y2y2=−1\dfrac{-y^2}{y^2} = -1.

Two paths give 11 and −1-1, so the limit does not exist.

Worked example: Lines are not enough

Investigate lim⁡(x,y)→(0,0)xy2x2+y4\displaystyle\lim_{(x, y) \to (0, 0)} \frac{xy^2}{x^2 + y^4}.

Along any line y=mxy = mx (with x≠0x \ne 0):

x(m2x2)x2+m4x4=m2x1+m4x2→0.\frac{x(m^2x^2)}{x^2 + m^4x^4} = \frac{m^2 x}{1 + m^4 x^2} \to 0.

Along the yy-axis the function is 00 as well. It is tempting to conclude the limit is 00, but try the parabola x=y2x = y^2 (with y≠0y \ne 0):

y2⋅y2y4+y4=y42y4=12.\frac{y^2 \cdot y^2}{y^4 + y^4} = \frac{y^4}{2y^4} = \frac{1}{2}.

Along this parabola the value is always 12\tfrac{1}{2}. Since 0≠120 \ne \tfrac{1}{2}, the limit does not exist.

Common mistake

Getting the same value along many paths never proves that a limit exists. There are infinitely many paths, and the example above shows a function that agrees along every line yet fails along a parabola. Paths can only prove that a limit does not exist. To prove existence, use continuity, algebra, or a squeeze.

Showing a limit exists: squeeze and polar coordinates

If ∣f(x,y)−L∣≤g(x,y)\lvert f(x, y) - L\rvert \le g(x, y) and g(x,y)→0g(x, y) \to 0, then f(x,y)→Lf(x, y) \to L. This is the Squeeze Theorem in two variables. The trick is usually to bound a fraction by noticing that x2≤x2+y2x^2 \le x^2 + y^2, so x2x2+y2≤1\dfrac{x^2}{x^2 + y^2} \le 1.

Worked example: A squeeze

Evaluate lim⁡(x,y)→(0,0)3x2yx2+y2\displaystyle\lim_{(x, y) \to (0, 0)} \frac{3x^2 y}{x^2 + y^2}.

For (x,y)≠(0,0)(x, y) \ne (0, 0),

∣3x2yx2+y2∣=3∣y∣⋅x2x2+y2≤3∣y∣.\left\lvert \frac{3x^2 y}{x^2 + y^2} \right\rvert = 3\lvert y\rvert \cdot \frac{x^2}{x^2 + y^2} \le 3\lvert y\rvert.

As (x,y)→(0,0)(x, y) \to (0, 0), 3∣y∣→03\lvert y\rvert \to 0. By the Squeeze Theorem, the limit is 00.

Polar coordinates package the same idea. With x=rcos⁡θx = r\cos\theta and y=rsin⁡θy = r\sin\theta, the condition (x,y)→(0,0)(x, y) \to (0, 0) becomes r→0+r \to 0^+, for every θ\theta. In the example above,

3x2yx2+y2=3r3cos⁡2θsin⁡θr2=3rcos⁡2θsin⁡θ,\frac{3x^2 y}{x^2 + y^2} = \frac{3r^3\cos^2\theta\sin\theta}{r^2} = 3r\cos^2\theta\sin\theta,

and since ∣3cos⁡2θsin⁡θ∣≤3\lvert 3\cos^2\theta\sin\theta\rvert \le 3, the expression is at most 3r3r in absolute value, which goes to 00. The bound must not depend on θ\theta; if the polar form still depends on θ\theta after r→0r \to 0, the limit does not exist.

Tip

A quick heuristic at the origin: compare the total degree of the numerator with that of the denominator. In 3x2yx2+y2\dfrac{3x^2y}{x^2 + y^2} the numerator has degree 3 and the denominator degree 2, so the limit is often 00. When the degrees match, as in xyx2+y2\dfrac{xy}{x^2 + y^2}, the limit usually fails. This is only a guide; always confirm with a squeeze or two paths.

Continuity

A function is continuous on a region if it is continuous at every point of the region. A piecewise definition such as

f(x,y)={xyx2+y2,(x,y)≠(0,0)0,(x,y)=(0,0)f(x, y) = \begin{cases} \dfrac{xy}{x^2 + y^2}, & (x, y) \ne (0, 0) \\ 0, & (x, y) = (0, 0) \end{cases}

is continuous everywhere except the origin: along y=xy = x the values are 12\tfrac{1}{2}, not 00, so the limit at the origin does not exist.

Practice

Practice 1

Evaluate lim⁡(x,y)→(2,−1)(x2+3xy−y3)\displaystyle\lim_{(x, y) \to (2, -1)} \left(x^2 + 3xy - y^3\right).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Evaluate lim⁡(x,y)→(3,1)x2−9y2x−3y\displaystyle\lim_{(x, y) \to (3, 1)} \frac{x^2 - 9y^2}{x - 3y}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find the limit of f(x,y)=xyx2+y2f(x, y) = \dfrac{xy}{x^2 + y^2} as (x,y)→(0,0)(x, y) \to (0, 0) along the line y=2xy = 2x.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

What is lim⁡(x,y)→(0,0)x2−2y2x2+y2\displaystyle\lim_{(x, y) \to (0, 0)} \frac{x^2 - 2y^2}{x^2 + y^2}?

Practice 5

Evaluate lim⁡(x,y)→(0,0)x2y2x2+y2\displaystyle\lim_{(x, y) \to (0, 0)} \frac{x^2 y^2}{x^2 + y^2}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find the limit of f(x,y)=x2yx4+y2f(x, y) = \dfrac{x^2 y}{x^4 + y^2} as (x,y)→(0,0)(x, y) \to (0, 0) along the parabola y=x2y = x^2.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Where is f(x,y)=ln⁡(x2+y2−1)f(x, y) = \ln(x^2 + y^2 - 1) continuous?

Practice 8

Evaluate lim⁡(x,y)→(0,0)x2+y2x2+y2+1−1\displaystyle\lim_{(x, y) \to (0, 0)} \frac{x^2 + y^2}{\sqrt{x^2 + y^2 + 1} - 1}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.