Survey of Mathematics

5.1 Scalar and vector fields, limits and continuity

A field attaches a number or a vector to every point of space. Limits and continuity of fields are the limits of Unit 1 with the distance between points of the line replaced by the length of a vector, and the one new difficulty is that a point of the plane can be approached along infinitely many paths, all of which must agree.

Taught in 375/376Apostol, not taughtBeyond the courseApostol Vol. 2, 8.1 to 8.5Spagnolie, Lecture 19 (second version) and Piazza note @105Genocchi and Peano, Calcolo differenziale e principii di calcolo integrale (1884)

Until now a function took one number in and gave one number out (Unit 1), or it was linear (Unit 2). Most quantities in the world depend on position: the temperature of a room, the pressure of the air, the wind. This chapter names such functions, shows how to draw them, and carries limit and continuity from 1.3 into Rn\mathbb R^n. There is one new difficulty, and it is the theme of the chapter. On a line you reach a point from two sides. In the plane there are infinitely many ways to reach it, and a limit exists only if all of them agree.

Before you start

1.3: limits and continuity with ε\varepsilon and δ\delta. 2.9: the length ∥x∥\lVert x \rVert and the Cauchy–Schwarz inequality. 4.1: open balls and open sets. Chapter 4.5 proves the same limit and continuity statements for any metric space; here we use them in Rn\mathbb R^n with the usual length.

Quick checkFor x=(3,4)x = (3, 4), which statement is true for each coordinate?
Quick checkWhich inequality is the Cauchy–Schwarz inequality for vectors u,vu, v in Rn\mathbb R^n?
Quick checkWhat is the open ball B(a,r)B(a, r) in R2\mathbb R^2?

The picture: a field is a function of position

On the left is the graph of f(x,y)f(x, y): over each point (x,y)(x, y) of the floor, a point at height f(x,y)f(x, y). On the right are its level curves: for each height cc, the set of floor points where f=cf = c, like the contour lines of a hiking map. Things to do:

  1. Start with x2+y2x^2 + y^2. The bowl’s level curves are circles. Drag the dot outward: the circles crowd together, because the bowl gets steeper.
  2. Switch to cos⁡(x+y)\cos(x + y). Its level curves are parallel lines of slope −1-1, because ff depends on x+yx + y only. This is the homework example worked below.
  3. Switch to x2−y2x^2 - y^2. The level curve at height 00 is two lines crossing at the origin. The surface is a saddle there.

A vector field has an arrow at every point instead of a height:

Pick the spin field (−y,x)(-y, x): the arrows go round the origin like water in a drain. Pick the stretch field (2x+y,x+2y)(2x + y, x + 2y): this is the fluid flow of Lecture 19 (first version), and we meet it again in 5.3.

The idea, in words

A function of one variable assigns a number to each point of a line. A field assigns something to each point of the plane or of space. If that something is a number (a temperature, a pressure, a density, an electric potential, the loss of a neural network), the field is a scalar field. If it is a vector (the wind, a force, an electric field), it is a vector field. Physicists said “field” first, long before mathematicians had a definition; the history box below says how.

There are three ways to look at a scalar field, and you should be able to switch between them:

  • the formula, f(x,y)=x2+3yf(x, y) = x^2 + 3y;
  • the graph, a surface in one dimension more than the domain;
  • the level sets, the pieces of the domain on which ff is constant.

The graph needs n+1n + 1 dimensions, so for n≥3n \ge 3 you cannot draw it. Level sets need only nn dimensions (and level surfaces of fields on R3\mathbb R^3 can be drawn), which is why they are the main tool.

Where this came from· From Faraday's lines of force to vector fields

Michael Faraday pictured electric and magnetic influence as “lines of force” filling space. James Clerk Maxwell took the picture seriously: in “On Faraday’s Lines of Force” (read 1855 and 1856) he treated the lines as the streamlines of an imagined incompressible fluid, which turned a picture into a vector at every point and gave the mathematics a place to start. The words “scalar” and “vector” themselves come from William Rowan Hamilton’s quaternions (from 1843): a scalar is a quantity on one scale of numbers, from negative to positive, and a vector is a quantity that carries a direction. The problem they were solving was how to describe a quantity that varies from point to point in space. That is exactly what Definitions 1 and 2 below say.

Definitions

Definition T

Scalar field

A scalar field is a function f:S→Rf: S \to \mathbb R where SS is a subset of Rn\mathbb R^n. The input is a vector (a point of space), the output is one real number. Apostol calls it a “real-valued function of a vector variable”. For points of R2\mathbb R^2 we write (x,y)(x, y) and for points of R3\mathbb R^3 we write (x,y,z)(x, y, z). Examples: f(x,y)=x2+y2f(x, y) = x^2 + y^2 (distance squared from the origin) and T(x,y,z)=T(x, y, z) = the temperature at that point of a room.

In one lineA function ff that gives a real number f(x)=f(x1,…,xn)f(x) = f(x_1, \dots, x_n) at each point xx of a set S⊆RnS \subseteq \mathbb R^n.

Why it existsIt is the right object for a quantity with a size and no direction, such as temperature or the loss of a network, that varies from place to place.

Definition T

Vector field

A vector field is a function F:S→RmF: S \to \mathbb R^m with S⊆RnS \subseteq \mathbb R^n. Writing F(x)=(F1(x),…,Fm(x))F(x) = (F_1(x), \dots, F_m(x)), each component Fk(x)=ek⋅F(x)F_k(x) = e_k \cdot F(x) is a scalar field, where eke_k is the kk-th unit vector. Examples: the identity F(x)=xF(x) = x (an arrow pointing away from the origin, of length equal to the distance from it), the spin field F(x,y)=(−y,x)F(x, y) = (-y, x), and every linear map x↦Axx \mapsto Ax of Unit 2. The air velocity in a room is a vector field R3→R3\mathbb R^3 \to \mathbb R^3.

In one lineA function FF that gives a vector F(x)∈RmF(x) \in \mathbb R^m at each point xx of a set S⊆RnS \subseteq \mathbb R^n; its mm components F1,…,FmF_1, \dots, F_m are scalar fields.

Why it existsIt is the right object for a quantity with a size and a direction, such as the wind or a force, that varies from place to place.

Definition T

Level set

For a scalar field f:S→Rf: S \to \mathbb R and a real number cc, the level set is L(c)={x∈S:f(x)=c}L(c) = \{x \in S : f(x) = c\}. In R2\mathbb R^2 it is usually a curve (a level curve, or contour line, or isotherm for temperature, isobar for pressure). In R3\mathbb R^3 it is usually a surface (a level surface). It is the slice of the graph at height cc, projected down to the floor.

In one lineFor a scalar field ff and a number cc, the level set L(c)={x:f(x)=c}L(c) = \{x : f(x) = c\}: all points where ff takes the value cc.

Why it existsLevel sets turn a function of nn variables into a family of (n−1)(n-1)-dimensional shapes you can draw, and they record where the function is flat.

Worked example MATH 375 HW 11 (Apostol 8.3 #1c)
Sketch the level sets of f(x,y)=cos⁡(x+y)f(x, y) = \cos(x + y) for c=−1,0,12,22,1c = -1, 0, \tfrac12, \tfrac{\sqrt2}{2}, 1.

Solution.

  1. Notice what ff depends on. f(x,y)=cos⁡uf(x, y) = \cos u with u=x+yu = x + y. If the formula uses xx and yy only through one combination, the level sets are lines on which that combination is constant.
  2. Solve cos⁡u=c\cos u = c for uu. For c=1c = 1: u=2mπu = 2m\pi. For c=22c = \frac{\sqrt2}{2}: u=±π4+2mπu = \pm\frac\pi4 + 2m\pi. For c=12c = \frac12: u=±π3+2mπu = \pm\frac\pi3 + 2m\pi. For c=0c = 0: u=π2+mπu = \frac\pi2 + m\pi. For c=−1c = -1: u=π+2mπu = \pi + 2m\pi. Here mm is any whole number. Cosine is periodic, so each value of cc is taken at infinitely many uu.
  3. Each solution u=u0u = u_0 is a line. x+y=u0x + y = u_0, that is y=u0−xy = u_0 - x, a line of slope −1-1. That is the set of points with x+yx + y equal to the constant.
  4. Draw them. Every level set is a family of parallel lines of slope −1-1. Moving along such a line, x+yx + y does not change, so ff does not change: this is the direction in which ff is flat. Moving across the lines (direction (1,1)(1,1)) is the direction in which ff changes fastest. This is the idea of 5.2.

Answer. All level sets are unions of parallel lines x+y=u0x + y = u_0 of slope −1-1, for the values of u0u_0 listed in step 2.

Worked example Apostol 8.3 #1e
Describe the level sets of f(x,y,z)=x2+2y2+3z2f(x, y, z) = x^2 + 2y^2 + 3z^2 for c=0c = 0 and c=6c = 6.

Solution.

  1. Level c=0c = 0. x2+2y2+3z2=0x^2 + 2y^2 + 3z^2 = 0. Each term is at least 00, so all three must be 00. The level set is the single point (0,0,0)(0, 0, 0). A sum of non-negative terms is zero only when each term is.
  2. Level c=6c = 6. Divide by 6: x26+y23+z22=1\frac{x^2}{6} + \frac{y^2}{3} + \frac{z^2}{2} = 1. This is the standard form of an ellipsoid x2p2+y2q2+z2r2=1\frac{x^2}{p^2} + \frac{y^2}{q^2} + \frac{z^2}{r^2} = 1.
  3. Read the semi-axes. p=6p = \sqrt6, q=3q = \sqrt3, r=2r = \sqrt2. The ellipsoid crosses the xx-axis at ±6≈±2.45\pm\sqrt6 \approx \pm2.45, the yy-axis at ±3≈±1.73\pm\sqrt3 \approx \pm1.73 and the zz-axis at ±2≈±1.41\pm\sqrt2 \approx \pm1.41.
  4. General c>0c > 0. The same steps give ellipsoids with semi-axes c\sqrt c, c/2\sqrt{c/2}, c/3\sqrt{c/3}, nested like onion layers. Doubling cc multiplies every semi-axis by 2\sqrt2.

Answer. A point for c=0c = 0; an ellipsoid with semi-axes 6,3,2\sqrt6, \sqrt3, \sqrt2 for c=6c = 6. Level sets for c<0c < 0 are empty.

Quick checkThe level sets of f(x,y)=x2+y2f(x, y) = x^2 + y^2 are circles about the origin. What are the level sets of g(x,y)=exyg(x, y) = e^{xy} for c>0c > 0?

Limits

A limit of a field is the limit of Unit 1 with the distance ∣x−a∣|x - a| replaced by the length ∥x−a∥\lVert x - a \rVert.

Same idea elsewhere· This is the limit of chapter 4.5, for the usual length

For a field F:S→RmF: S \to \mathbb R^m, a point a∈Rna \in \mathbb R^n and b∈Rmb \in \mathbb R^m, Apostol writes

lim⁡x→aF(x)=bto meanlim⁡∥x−a∥→0∥F(x)−b∥=0.\lim_{x \to a} F(x) = b \quad \text{to mean} \quad \lim_{\lVert x - a \rVert \to 0} \lVert F(x) - b \rVert = 0.

In ε\varepsilon and δ\delta words: for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that 0<∥x−a∥<δ0 < \lVert x - a \rVert < \delta implies ∥F(x)−b∥<ε\lVert F(x) - b \rVert < \varepsilon. This is the limit of a map between metric spaces for the metric spaces Rn\mathbb R^n and Rm\mathbb R^m with the Euclidean distance, and ”FF is continuous at aa” means F(a)F(a) is defined and lim⁡x→aF(x)=F(a)\lim_{x \to a} F(x) = F(a), the continuous map between metric spaces at one point. As in 1.3, the condition 0<∥x−a∥0 < \lVert x - a \rVert keeps the value F(a)F(a) (if there is one) out of the limit.

Everything from 1.3 and 1.2 that did not use the order of the real numbers carries over word for word, with the same proofs.

Theorem T Apostol Thm 8.1

Limit laws for fields

Let F,GF, G be fields into Rm\mathbb R^m with lim⁡x→aF(x)=b\lim_{x \to a} F(x) = b and lim⁡x→aG(x)=c\lim_{x \to a} G(x) = c. Then, as x→ax \to a:

(a) F(x)+G(x)→b+cF(x) + G(x) \to b + c. (b) λF(x)→λb\lambda F(x) \to \lambda b for every real λ\lambda. (c) F(x)⋅G(x)→b⋅cF(x) \cdot G(x) \to b \cdot c. (d) ∥F(x)∥→∥b∥\lVert F(x) \rVert \to \lVert b \rVert.

For scalar fields (the case m=1m = 1) there is also (e): if c≠0c \ne 0 then F(x)/G(x)→b/cF(x)/G(x) \to b/c.

In one lineIf F→bF \to b and G→cG \to c as x→ax \to a, then F+G→b+cF + G \to b + c, λF→λb\lambda F \to \lambda b, F⋅G→b⋅cF \cdot G \to b \cdot c and ∥F∥→∥b∥\lVert F \rVert \to \lVert b \rVert.

Why it is trueLimits behave well under the operations that vectors have: adding, scaling, taking dot products and lengths. Dividing by a vector is not an operation, so there is no quotient law for vector fields.

ProofApostol 8.1; Spagnolie Lecture 19
The idea: (a), (b) and (d) follow from the triangle inequality in one line. For (c), write the difference of the dot products as a sum of three terms, each containing a small factor, and bound each with Cauchy–Schwarz.
(a) ∥(F+G)−(b+c)∥≤∥F−b∥+∥G−c∥\lVert (F + G) - (b + c) \rVert \le \lVert F - b \rVert + \lVert G - c \rVert, and the right side tends to 00.
Triangle inequality of 2.9.
(b) ∥λF−λb∥=∣λ∣ ∥F−b∥→0\lVert \lambda F - \lambda b \rVert = |\lambda|\,\lVert F - b \rVert \to 0.
∥λv∥=∣λ∣ ∥v∥\lVert \lambda v \rVert = |\lambda|\,\lVert v \rVert.
(c) F⋅G−b⋅c=(F−b)⋅(G−c)+b⋅(G−c)+c⋅(F−b)F \cdot G - b \cdot c = (F - b)\cdot(G - c) + b \cdot (G - c) + c \cdot (F - b).
Expand the three dot products on the right: F⋅G−F⋅c−b⋅G+b⋅cF \cdot G - F \cdot c - b \cdot G + b \cdot c, then + b⋅G−b⋅c+\, b \cdot G - b \cdot c, then + c⋅F−c⋅b+\, c \cdot F - c \cdot b. The cross terms cancel.This is the add-and-subtract trick from the product law of 1.2: change one factor at a time.
So ∣F⋅G−b⋅c∣≤∥F−b∥ ∥G−c∥+∥b∥ ∥G−c∥+∥c∥ ∥F−b∥|F \cdot G - b \cdot c| \le \lVert F - b \rVert\,\lVert G - c \rVert + \lVert b \rVert\,\lVert G - c \rVert + \lVert c \rVert\,\lVert F - b \rVert.
Triangle inequality for the three terms, then Cauchy–Schwarz ∣u⋅v∣≤∥u∥∥v∥|u \cdot v| \le \lVert u \rVert \lVert v \rVert on each.
The right side tends to 00, so F⋅G→b⋅cF \cdot G \to b \cdot c.
Each of ∥F−b∥\lVert F - b \rVert and ∥G−c∥\lVert G - c \rVert tends to 00, and ∥b∥\lVert b \rVert, ∥c∥\lVert c \rVert are fixed numbers.
(d) ∣∥F∥−∥b∥∣≤∥F−b∥→0\big|\lVert F \rVert - \lVert b \rVert\big| \le \lVert F - b \rVert \to 0.
The reverse triangle inequality ∣∥u∥−∥v∥∣≤∥u−v∥\big|\lVert u \rVert - \lVert v \rVert\big| \le \lVert u - v \rVert, which is the triangle inequality applied to u=(u−v)+vu = (u - v) + v and to v=(v−u)+uv = (v - u) + u.
(e) 1G→1c\frac1G \to \frac1c, hence FG=F⋅1G→bc\frac FG = F \cdot \frac1G \to \frac bc. ■\blacksquare
For ∣G−c∣<∣c∣/2|G - c| < |c|/2 we have ∣G∣>∣c∣/2|G| > |c|/2, so ∣1G−1c∣=∣c−G∣∣G∣∣c∣≤2c2∣G−c∣→0\big|\frac1G - \frac1c\big| = \frac{|c - G|}{|G||c|} \le \frac{2}{c^2}|G - c| \to 0. Then use (c) for F⋅1GF \cdot \frac1G.
Proof workshopRebuild the proof of part (c), the dot-product lawApostol 8.1 (c)

Tap the lines in the order a proof would write them. Each line can only use what is already above it.

    Theorem T Apostol 8.4 Example 1

    A field has a limit exactly when its components do

    Let F=(F1,…,Fm)F = (F_1, \dots, F_m) and b=(b1,…,bm)b = (b_1, \dots, b_m). Then lim⁡x→aF(x)=b\lim_{x \to a} F(x) = b if and only if lim⁡x→aFk(x)=bk\lim_{x \to a} F_k(x) = b_k for k=1,…,mk = 1, \dots, m. In particular, FF is continuous at aa exactly when each component FkF_k is.

    In one lineF(x)→bF(x) \to b as x→ax \to a if and only if Fk(x)→bkF_k(x) \to b_k for every component kk.

    Why it is trueIt reduces a limit of vectors to mm limits of numbers, so you can compute componentwise.

    ProofApostol 8.4 Example 1
    The idea: A vector is small exactly when all its components are small: the comparison of norms from 4.1 gives |F_k − b_k| ≤ ‖F − b‖ ≤ sum of |F_k − b_k|.
    For every kk: ∣Fk(x)−bk∣≤∥F(x)−b∥|F_k(x) - b_k| \le \lVert F(x) - b \rVert.
    One coordinate of a vector is no longer than the vector (4.1, max-norm at most 2-norm).
    Also ∥F(x)−b∥≤∑k=1m∣Fk(x)−bk∣\lVert F(x) - b \rVert \le \sum_{k=1}^m |F_k(x) - b_k|.
    The 2-norm is at most the 1-norm (4.1): s12+⋯+sm2≤∣s1∣+⋯+∣sm∣\sqrt{s_1^2 + \dots + s_m^2} \le |s_1| + \dots + |s_m| because squaring the right side only adds non-negative cross terms.
    So F→bF \to b implies every Fk→bkF_k \to b_k.
    If F→bF \to b, the left inequality squeezes each ∣Fk−bk∣|F_k - b_k| to 00.
    Conversely, F→bF \to b. ■\blacksquare
    If every Fk→bkF_k \to b_k, the right side is a finite sum of quantities tending to 00, so it tends to 00.

    The new danger: many paths

    Try these four things in the picture above.

    1. (x−y)/(x+y)(x - y)/(x + y) along straight lines. Turn the line angle. The value the function settles to changes with the angle. The limit at the origin would have to be all those numbers at once.
    2. x2y/(x4+y2)x^2y/(x^4 + y^2) along straight lines. Every line gives 00. Now switch the path to the parabola y=x2y = x^2. The value is 12\frac12 all the way in.
    3. x2y/(x2+y2)x^2y/(x^2 + y^2). Every path, line or curve, gives 00. This one really has limit 00, and the section on the squeeze below proves it.
    4. Look at the colour map for x2y/(x4+y2)x^2y/(x^4 + y^2). The strongest colours hug the two parabolas y=±x2y = \pm x^2, which squeeze into the origin. A straight line meets that thin strip only near its tip, which is why lines never see the value 12\frac12 that the parabola sees.
    Theorem T Apostol 8.4; the sequential criterion of 1.3

    A limit forces the same value along every path

    Suppose lim⁡x→aF(x)=b\lim_{x \to a} F(x) = b. Let r(t)r(t) be points with r(t)≠ar(t) \ne a and r(t)→ar(t) \to a as t→0+t \to 0^+ (a straight line r(t)=a+tur(t) = a + tu or a curve such as r(t)=(t,t2)r(t) = (t, t^2)). Then lim⁡t→0+F(r(t))=b\lim_{t \to 0^+} F(r(t)) = b. Consequently: if two such paths give two different limits, or one path gives no limit, then lim⁡x→aF(x)\lim_{x \to a} F(x) does not exist.

    In one lineIf F(x)→bF(x) \to b as x→ax \to a and a path r(t)→ar(t) \to a with r(t)≠ar(t) \ne a, then F(r(t))→bF(r(t)) \to b along the path.

    Why it is trueIt turns 'no limit' into something you can show with two paths: if two paths give different limits, no limit exists.

    ProofApostol 8.4
    The idea: Given ε, take the δ from the definition of the limit. Once the path is within δ of a, the function is within ε of b.
    Let ε>0\varepsilon > 0. Choose δ>0\delta > 0 with ∥F(x)−b∥<ε\lVert F(x) - b \rVert < \varepsilon whenever 0<∥x−a∥<δ0 < \lVert x - a \rVert < \delta.
    Definition of lim⁡x→aF(x)=b\lim_{x \to a} F(x) = b.
    Choose τ>0\tau > 0 so that 0<∥r(t)−a∥<δ0 < \lVert r(t) - a \rVert < \delta for 0<t<τ0 < t < \tau.
    r(t)→ar(t) \to a, and r(t)≠ar(t) \ne a so the norm is strictly positive.
    For 0<t<τ0 < t < \tau: ∥F(r(t))−b∥<ε\lVert F(r(t)) - b \rVert < \varepsilon. So F(r(t))→bF(r(t)) \to b. ■\blacksquare
    Take x=r(t)x = r(t) in the first step.
    Worked example Lecture 19 (second version); Apostol 8.5 #3
    Show that f(x,y)=x−yx+yf(x, y) = \dfrac{x - y}{x + y} has no limit at (0,0)(0, 0).

    Solution.

    1. Choose a family of paths. The line y=mxy = mx with m≠−1m \ne -1 and x≠0x \ne 0. Lines through the origin are the simplest paths. We avoid m=−1m = -1 because ff is not defined where x+y=0x + y = 0.
    2. Compute ff on the line. f(x,mx)=x−mxx+mx=x(1−m)x(1+m)=1−m1+mf(x, mx) = \dfrac{x - mx}{x + mx} = \dfrac{x(1 - m)}{x(1 + m)} = \dfrac{1 - m}{1 + m}. We may cancel xx because x≠0x \ne 0 inside a limit.
    3. Read the limit along each line. The value is the constant 1−m1+m\frac{1 - m}{1 + m}, so that is the limit along the line. For m=0m = 0 it is 11; for m=1m = 1 it is 00; for m=3m = 3 it is −12-\frac12. A constant function has that constant as its limit.
    4. Compare. Two paths give two different numbers, 11 and 00. By the theorem above a limit would have to equal both.

    Answer. lim⁡(x,y)→(0,0)x−yx+y\lim_{(x,y) \to (0,0)} \frac{x - y}{x + y} does not exist. Apostol’s other check uses iterated limits: take the limit in one variable first (the other held fixed), then take the limit of the result in the other variable. Here the two orders differ. For fixed x≠0x \ne 0, letting y→0y \to 0 first gives xx=1\frac xx = 1; for fixed y≠0y \ne 0, letting x→0x \to 0 first gives −yy=−1\frac{-y}{y} = -1. So lim⁡x→0lim⁡y→0f=1\lim_{x \to 0}\lim_{y \to 0} f = 1 but lim⁡y→0lim⁡x→0f=−1\lim_{y \to 0}\lim_{x \to 0} f = -1.

    Your answerAlong the line y=3xy = 3x (x≠0x \ne 0), what constant value does x−yx+y\frac{x - y}{x + y} take?
    Worked example Apostol 8.4 Example 7; Final Review, 'continuous in x and in y'
    Let f(x,y)=xyx2+y2f(x, y) = \dfrac{xy}{x^2 + y^2} for (x,y)≠(0,0)(x, y) \ne (0, 0) and f(0,0)=0f(0, 0) = 0. Show ff is continuous in xx alone and in yy alone at the origin, but not continuous at the origin.

    Solution.

    1. Slice along the xx-axis. For y=0y = 0: f(x,0)=0f(x, 0) = 0 for every xx, including x=0x = 0. The numerator xyxy is 00 on the axis.
    2. Slice along the yy-axis. Likewise f(0,y)=0f(0, y) = 0 for every yy. Same reason, with x=0x = 0.
    3. Conclude “separately continuous”. As a function of xx alone (with y=0y = 0) and as a function of yy alone (with x=0x = 0), ff is the constant 00, hence continuous at 00. This is what continuity “in each variable separately” means.
    4. Now the diagonal. For x≠0x \ne 0: f(x,x)=x22x2=12f(x, x) = \dfrac{x^2}{2x^2} = \dfrac12. The diagonal y=xy = x is a path to the origin.
    5. Compare with the value. Points with f=12f = \frac12 exist arbitrarily close to the origin, but f(0,0)=0f(0, 0) = 0. So lim⁡(x,y)→(0,0)f(x,y)≠f(0,0)\lim_{(x,y) \to (0,0)} f(x, y) \ne f(0, 0) (the limit along the diagonal is 12\frac12). By the path theorem, if the limit existed it would be 12\frac12 and also, along the axes, 00.

    Answer. ff is continuous in each variable separately but not continuous as a function of both variables together. Continuity in each variable alone does not imply continuity.

    Quick checkA function f(x,y)f(x, y) is continuous in xx for every fixed yy, and continuous in yy for every fixed xx. Is ff continuous as a function of (x,y)(x, y)?
    Where this came from· Peano's separately continuous function

    In his 1821 textbook Cours d’analyse, Cauchy had stated that a function that is continuous in each variable separately is continuous. In the treatise on calculus published under Angelo Genocchi’s name in 1884, with additions by his assistant Giuseppe Peano, the function xyx2+y2\frac{xy}{x^2 + y^2} (with value 00 at the origin) appears as a counterexample: continuous in each variable alone, discontinuous on the diagonal. Peano was one of the people who pushed analysis towards checking every claim with an explicit example; the next function below, which gives limit 00 along every straight line and still has no limit, is of the same kind. This is the reason a definition with ε\varepsilon and δ\delta over a whole ball is needed in Rn\mathbb R^n rather than a test along lines.

    Worked example Spagnolie Piazza @105 (the same shape as the Lecture 20 function); new
    Show that f(x,y)=x2yx4+y2f(x, y) = \dfrac{x^2y}{x^4 + y^2} has limit 00 along every straight line through the origin, but no limit at the origin.

    Solution.

    1. Lines y=mxy = mx with m≠0m \ne 0. f(x,mx)=x2⋅mxx4+m2x2=mxx2+m2f(x, mx) = \dfrac{x^2 \cdot mx}{x^4 + m^2x^2} = \dfrac{mx}{x^2 + m^2} for x≠0x \ne 0. Cancel the common factor x2x^2.
    2. Let x→0x \to 0. The denominator tends to m2≠0m^2 \ne 0 and the numerator to 00, so the limit is 00. Quotient law (e) of the limit laws, allowed because the denominator’s limit is not 00.
    3. The remaining lines. On the xx-axis (m=0m = 0) and on the yy-axis (x=0x = 0) f=0f = 0 identically. The numerator is 00 on both.
    4. So every straight line gives 00. This is the evidence that tempts you to say the limit is 00.
    5. Now the parabola y=x2y = x^2. f(x,x2)=x2⋅x2x4+x4=x42x4=12f(x, x^2) = \dfrac{x^2 \cdot x^2}{x^4 + x^4} = \dfrac{x^4}{2x^4} = \dfrac12 for x≠0x \ne 0. The parabola y=x2y = x^2 touches the xx-axis at the origin, so it is a path to the origin like any other. It bends upward exactly as fast as x2x^2 grows, which keeps it where ff is largest. No straight line does that.
    6. Compare. The path y=x2y = x^2 gives 12\frac12, the lines give 00. By the path theorem, no limit.

    Answer. The limit does not exist. Checking all straight lines is not enough to prove a limit, however many you check. (By x4+y2≥2x2∣y∣x^4 + y^2 \ge 2x^2|y|, ∣f∣≤12|f| \le \frac12 everywhere: the function is bounded, and 12\frac12 is its largest size, reached exactly on the two parabolas y=±x2y = \pm x^2.)

    Your answerWhat value does x2yx4+y2\dfrac{x^2y}{x^4 + y^2} take at the point (0.1, 0.01)(0.1,\ 0.01) on the parabola y=x2y = x^2?
    Python labSample many paths, then try to catch the bad one
    import numpy as np
    rng = np.random.default_rng(0)
    
    def f(x, y):
        return x**2 * y / (x**4 + y**2)
    
    print("along lines y = m x, then the parabola y = x^2")
    for t in (1e-1, 1e-2, 1e-3):
        row = [f(t, m * t) for m in (0.5, 1, 2, 10)] + [f(t, t**2)]
        print(f"x = {t:g}: " + "  ".join(f"{v:9.5f}" for v in row))
    
    r = 1e-3
    pts = rng.uniform(-r, r, size=(200000, 2))
    pts = pts[pts[:, 0]**2 + pts[:, 1]**2 < r**2]
    print("random points in the disk of radius", r, ": largest |f| =", abs(f(pts[:, 0], pts[:, 1])).max().round(4))
    
    # aim at the thin curved strip near y = x^2
    x = rng.uniform(r / 100, r, 200000)
    y = x**2 * rng.uniform(0.5, 2, 200000)
    print("points near the parabola: largest f =", f(x, y).max().round(4))

    Try this. Run it once. Then change r to 1e-6 and run again: the largest |f| found does not shrink, even though every straight line gave values going to 0. Now delete the last block (the points near the parabola) and run the random disk alone with r = 1e-6: how often does a random point land in the thin strip where f is large? Replace f by x**2*y/(x2+y2) and see the largest |f| shrink with r, as the squeeze below proves.

    Proving that a limit exists: the squeeze

    To show a limit exists you cannot test paths, because there are too many. You bound the whole difference by something that depends only on the distance to the point.

    Proposition T Apostol 8.4

    Squeeze for fields

    Let F:S→RmF: S \to \mathbb R^m. Suppose there is a function φ(r)\varphi(r) with φ(r)→0\varphi(r) \to 0 as r→0+r \to 0^+ and a δ0>0\delta_0 > 0 such that ∥F(x)−b∥≤φ(∥x−a∥)\lVert F(x) - b \rVert \le \varphi(\lVert x - a \rVert) whenever 0<∥x−a∥<δ00 < \lVert x - a \rVert < \delta_0. Then lim⁡x→aF(x)=b\lim_{x \to a} F(x) = b.

    In one lineIf ∥F(x)−b∥≤φ(∥x−a∥)\lVert F(x) - b \rVert \le \varphi(\lVert x - a \rVert) near aa and φ(r)→0\varphi(r) \to 0 as r→0+r \to 0^+, then F(x)→bF(x) \to b.

    Why it is trueIt reduces a problem about all approach directions at once to a one-variable limit in the distance rr.

    ProofApostol 8.4
    The idea: Choose δ so small that φ(r) is below ε for every r below δ; the bound does the rest.
    Given ε>0\varepsilon > 0, choose δ≤δ0\delta \le \delta_0 with φ(r)<ε\varphi(r) < \varepsilon for 0<r<δ0 < r < \delta.
    φ(r)→0\varphi(r) \to 0 as r→0+r \to 0^+.
    If 0<∥x−a∥<δ0 < \lVert x - a \rVert < \delta then ∥F(x)−b∥≤φ(∥x−a∥)<ε\lVert F(x) - b \rVert \le \varphi(\lVert x - a \rVert) < \varepsilon. ■\blacksquare
    Apply the hypothesis with r=∥x−a∥r = \lVert x - a \rVert.

    In the plane at the origin, polar coordinates x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta make this convenient: r=∥(x,y)∥r = \lVert (x, y) \rVert is the distance to the origin, and θ\theta names the direction of approach. If you can bound ∣f(rcos⁡θ,rsin⁡θ)−b∣|f(r\cos\theta, r\sin\theta) - b| by some φ(r)\varphi(r) that does not depend on θ\theta, the squeeze applies. The words “does not depend on θ\theta” are the entire point.

    Worked example
    Prove lim⁡(x,y)→(0,0)x2yx2+y2=0\displaystyle\lim_{(x,y) \to (0,0)} \frac{x^2y}{x^2 + y^2} = 0, first with ε\varepsilon and δ\delta and then with polar coordinates.

    Solution.

    1. Bound by the distance. Since x2≤x2+y2x^2 \le x^2 + y^2, we have x2∣y∣x2+y2≤∣y∣≤x2+y2\dfrac{x^2|y|}{x^2 + y^2} \le |y| \le \sqrt{x^2 + y^2}. Write f=x2x2+y2⋅yf = \frac{x^2}{x^2 + y^2}\cdot y. The first factor is between 00 and 11, so ∣f∣≤∣y∣|f| \le |y|. And ∣y∣=y2≤x2+y2|y| = \sqrt{y^2} \le \sqrt{x^2 + y^2}.
    2. Choose δ\delta. Given ε>0\varepsilon > 0 take δ=ε\delta = \varepsilon. If 0<∥(x,y)∥<δ0 < \lVert (x, y) \rVert < \delta then ∣f(x,y)−0∣≤∥(x,y)∥<ε|f(x, y) - 0| \le \lVert (x, y) \rVert < \varepsilon. This is the definition of the limit, with the work done in step 1.
    3. The same in polar form. f(rcos⁡θ,rsin⁡θ)=r3cos⁡2θsin⁡θr2=rcos⁡2θsin⁡θf(r\cos\theta, r\sin\theta) = \dfrac{r^3\cos^2\theta\sin\theta}{r^2} = r\cos^2\theta\sin\theta. x2+y2=r2x^2 + y^2 = r^2 and the numerator has r3r^3.
    4. Bound without θ\theta. ∣rcos⁡2θsin⁡θ∣≤r|r\cos^2\theta\sin\theta| \le r for every θ\theta. ∣cos⁡θ∣≤1|\cos\theta| \le 1 and ∣sin⁡θ∣≤1|\sin\theta| \le 1. The bound φ(r)=r\varphi(r) = r does not mention θ\theta, so the squeeze applies.

    Answer. The limit is 00. Both versions are the same inequality: ∣f∣≤r|f| \le r.

    Worked example Apostol 8.5 #8
    Find the value f(0,0)f(0, 0) that makes f(x,y)=sin⁡(x2+y2)x2+y2f(x, y) = \dfrac{\sin(x^2 + y^2)}{x^2 + y^2} continuous at the origin.

    Solution.

    1. Rename the combination. Put u=x2+y2=r2u = x^2 + y^2 = r^2. Then f=h(u)f = h(u) with h(u)=sin⁡uuh(u) = \dfrac{\sin u}{u}. The formula uses (x,y)(x, y) only through uu, so the problem becomes one-variable.
    2. Recall the one-variable limit. lim⁡u→0sin⁡uu=1\lim_{u \to 0}\dfrac{\sin u}{u} = 1. It is the derivative of sin⁡\sin at 00 (1.4): sin⁡u−sin⁡0u−0→cos⁡0=1\frac{\sin u - \sin 0}{u - 0} \to \cos 0 = 1.
    3. Transfer it. ∣f(x,y)−1∣=∣h(r2)−1∣|f(x, y) - 1| = |h(r^2) - 1| depends only on rr and tends to 00 as r→0+r \to 0^+ (because u=r2→0u = r^2 \to 0). This is the squeeze with φ(r)=∣h(r2)−1∣\varphi(r) = |h(r^2) - 1|, free of θ\theta.
    4. Choose the value. Continuity at 00 needs f(0,0)=lim⁡(x,y)→(0,0)f=1f(0, 0) = \lim_{(x,y) \to (0,0)} f = 1.

    Answer. Define f(0,0)=1f(0, 0) = 1. Then ff is continuous at the origin (and everywhere else, as a composition of continuous fields).

    Watch out· Polar coordinates prove a limit only if the bound is free of θ

    For x2yx4+y2\dfrac{x^2y}{x^4 + y^2} in polar form, f=rcos⁡2θsin⁡θr2cos⁡4θ+sin⁡2θf = \dfrac{r\cos^2\theta\sin\theta}{r^2\cos^4\theta + \sin^2\theta}. For a fixed θ\theta with sin⁡θ≠0\sin\theta \ne 0 this tends to 00 as r→0r \to 0, which is why lines look harmless. But the speed at which it tends to 00 depends on θ\theta, and near θ=0\theta = 0 the denominator is small too. For every r>0r > 0 there is a direction θ\theta (the one pointing at the parabola) with f=12f = \frac12. So no φ(r)\varphi(r) free of θ\theta exists. Checking a few fixed θ\theta is the same mistake as checking a few lines.

    Worked example MATH 375 HW 11 (Apostol 8.5 #5)
    Let f(x,y)=xsin⁡1yf(x, y) = x\sin\frac1y for y≠0y \ne 0 and f(x,0)=0f(x, 0) = 0. Show that f→0f \to 0 at the origin, but that one iterated limit does not exist.

    Solution.

    1. Squeeze. For y≠0y \ne 0: ∣f(x,y)∣=∣x∣ ∣sin⁡1y∣≤∣x∣|f(x, y)| = |x|\,|\sin\frac1y| \le |x|, and for y=0y = 0: ∣f∣=0≤∣x∣|f| = 0 \le |x|. ∣sin⁡t∣≤1|\sin t| \le 1 for every tt, even though sin⁡1y\sin\frac1y oscillates wildly as y→0y \to 0. The bound uses only the factor xx.
    2. Conclude. ∣x∣≤∥(x,y)∥|x| \le \lVert (x, y) \rVert, so ∣f∣≤r→0|f| \le r \to 0. Hence lim⁡(x,y)→(0,0)f=0\lim_{(x,y) \to (0,0)} f = 0. Squeeze with φ(r)=r\varphi(r) = r.
    3. First iterated limit. For a fixed y≠0y \ne 0: lim⁡x→0xsin⁡1y=0\lim_{x \to 0} x\sin\frac1y = 0 (a constant times xx). Then lim⁡y→00=0\lim_{y \to 0} 0 = 0. The inner limit is taken first, with yy held fixed.
    4. Second iterated limit. For a fixed x≠0x \ne 0: lim⁡y→0xsin⁡1y\lim_{y \to 0} x\sin\frac1y does not exist, because sin⁡1y\sin\frac1y oscillates between −1-1 and 11. So lim⁡x→0[lim⁡y→0f(x,y)]\lim_{x \to 0}\big[\lim_{y \to 0} f(x, y)\big] makes no sense. The inner limit fails, so there is nothing to feed to the outer limit.
    5. No contradiction with Apostol 8.5 #2. That exercise says: if the two-variable limit exists and the two one-variable limits exist, then the iterated limits equal it. Here one of the one-variable limits (in yy for fixed x≠0x \ne 0) does not exist, so the hypothesis fails.

    Answer. f→0f \to 0 at the origin. The iterated limit in the order ”yy first” does not exist, and in the order ”xx first” it equals 00. Existence of the two-variable limit does not make both iterated limits exist.

    Quick checkTo prove lim⁡(x,y)→(0,0)f=0\lim_{(x,y)\to(0,0)} f = 0 a student checks that f→0f \to 0 along y=mxy = mx for every mm, and along both axes. What has the student proved?

    Continuity

    A field FF is continuous at aa if F(a)F(a) is defined and lim⁡x→aF(x)=F(a)\lim_{x \to a} F(x) = F(a); it is continuous on SS if it is continuous at each point of SS. The limit laws immediately give an algebra of continuous fields, and the same one-line proof gives continuity of a composition.

    Theorem T Apostol Thm 8.1, Examples 2 to 5, Thm 8.2

    Building continuous fields

    (a) If F,GF, G are continuous at aa, so are F+GF + G, λF\lambda F, F⋅GF \cdot G and ∥F∥\lVert F \rVert; for scalar fields f/gf/g is continuous at aa if g(a)≠0g(a) \ne 0.

    (b) The coordinate functions x↦xkx \mapsto x_k are continuous on Rn\mathbb R^n. Hence every polynomial in x1,…,xnx_1, \dots, x_n is continuous on Rn\mathbb R^n, and every rational function P/QP/Q is continuous where Q≠0Q \ne 0.

    (c) Every linear map T:Rn→RmT: \mathbb R^n \to \mathbb R^m is continuous.

    (d) Composition. If GG is continuous at aa and FF is continuous at G(a)G(a), then F∘GF \circ G is continuous at aa.

    In one lineSums, scalar multiples, dot products, norms and compositions of continuous fields are continuous; so are the coordinate functions, linear maps, polynomials, and quotients where the denominator is not zero.

    Why it is trueYou can recognise most fields as continuous without any ε\varepsilon or δ\delta, by seeing how they are built from continuous pieces.

    ProofApostol 8.1 to 8.2
    The idea: Parts (a) and (b) are the limit laws. For (c), write T(h) as a combination of the images of the unit vectors. For (d), work backwards from ε: first the η that F needs at G(a), then the δ that G needs to stay within η.
    (a) follows from the limit laws.
    Limit laws applied with b=F(a)b = F(a) and c=G(a)c = G(a).
    (b) The coordinate function x↦xkx \mapsto x_k is continuous. Products and sums of continuous fields are continuous by (a), so polynomials are, and P/QP/Q is by the quotient law where Q≠0Q \ne 0.
    ∣xk−ak∣≤∥x−a∥|x_k - a_k| \le \lVert x - a \rVert (the first quiz of this chapter): take δ=ε\delta = \varepsilon.
    (c) T(a+h)−T(a)=T(h)=∑k=1nhkT(ek)T(a + h) - T(a) = T(h) = \sum_{k=1}^n h_k T(e_k).
    h=∑hkekh = \sum h_k e_k and TT is linear (2.3).
    So ∥T(h)∥≤∥h∥∑k∥T(ek)∥\lVert T(h) \rVert \le \lVert h \rVert \sum_k \lVert T(e_k) \rVert, which tends to 00 as ∥h∥→0\lVert h \rVert \to 0. Hence TT is continuous at every aa.
    Triangle inequality, then ∣hk∣≤∥h∥|h_k| \le \lVert h \rVert.
    (d) Let ε>0\varepsilon > 0. Choose η>0\eta > 0 so that ∥y−b∥<η\lVert y - b \rVert < \eta implies ∥F(y)−F(b)∥<ε\lVert F(y) - F(b) \rVert < \varepsilon.
    Continuity of FF at b=G(a)b = G(a).
    Choose δ>0\delta > 0 so that ∥x−a∥<δ\lVert x - a \rVert < \delta implies ∥G(x)−b∥<η\lVert G(x) - b \rVert < \eta.
    Continuity of GG at aa, using η\eta as the target accuracy.
    Then ∥x−a∥<δ\lVert x - a \rVert < \delta implies ∥F(G(x))−F(G(a))∥<ε\lVert F(G(x)) - F(G(a)) \rVert < \varepsilon. ■\blacksquare
    Take y=G(x)y = G(x) in the first choice.
    Worked example Lecture 19 (second version)
    Find all points where h(x,y)=log⁡(sin⁡2(x2+y2))h(x, y) = \log\big(\sin^2(x^2 + y^2)\big) is continuous.

    Solution.

    1. The inside. u(x,y)=x2+y2u(x, y) = x^2 + y^2 is a polynomial, hence continuous on all of R2\mathbb R^2. Building continuous fields (b).
    2. The middle. sin⁡\sin is continuous on R\mathbb R, and so is its square, so v(x,y)=sin⁡2(x2+y2)v(x, y) = \sin^2(x^2 + y^2) is continuous on R2\mathbb R^2. Composition (d), then a product (a).
    3. The outside. log⁡\log is continuous on the open half-line (0,∞)(0, \infty), and nowhere else is it defined. Here log⁡\log means the natural logarithm, as in all of the course.
    4. Where the composition works. h=log⁡∘vh = \log \circ v is continuous at every point where v>0v > 0. Composition (d), valid where the outer function is defined and continuous at the inner value.
    5. Where v>0v > 0 fails. sin⁡2w=0\sin^2 w = 0 exactly when w=mπw = m\pi for a whole number mm. With w=x2+y2≥0w = x^2 + y^2 \ge 0 we need m=0,1,2,…m = 0, 1, 2, \dots x2+y2x^2 + y^2 is never negative.

    Answer. hh is continuous at every point except those with x2+y2=mπx^2 + y^2 = m\pi, m=0,1,2,…m = 0, 1, 2, \dots: the origin and the circles of radius mπ\sqrt{m\pi} about it. There hh is not defined (it tends to −∞-\infty). The discontinuities of a function of two variables can be isolated points or entire curves.

    Your answerHow many of the circles x2+y2=mπx^2 + y^2 = m\pi (m≥1m \ge 1) of discontinuity of log⁡(sin⁡2(x2+y2))\log(\sin^2(x^2 + y^2)) lie inside the disk of radius 55?
    Worked example MATH 375 HW 11 (Apostol 8.5 #1f); the printed key's answer is wrong
    Where is f(x,y)=arcsin⁡xx2+y2f(x, y) = \arcsin\dfrac{x}{\sqrt{x^2 + y^2}} continuous?

    Solution.

    1. The domain. ff is defined when (x,y)≠(0,0)(x, y) \ne (0, 0) and −1≤xx2+y2≤1-1 \le \dfrac{x}{\sqrt{x^2 + y^2}} \le 1. arcsin⁡\arcsin is defined on [−1,1][-1, 1] and the denominator must be nonzero.
    2. The inequality always holds. ∣x∣≤x2+y2|x| \le \sqrt{x^2 + y^2}, so the quotient lies in [−1,1][-1, 1] for every (x,y)≠(0,0)(x, y) \ne (0, 0). One coordinate is not longer than the vector.
    3. The inner field. g(x,y)=xx2+y2g(x, y) = \dfrac{x}{\sqrt{x^2 + y^2}} is continuous on R2∖{(0,0)}\mathbb R^2 \setminus \{(0, 0)\}. xx and x2+y2\sqrt{x^2 + y^2} are continuous, and the denominator is not zero there (quotient law).
    4. The outer function. arcsin⁡\arcsin is continuous on its whole domain [−1,1][-1, 1], including the endpoints ±1\pm1. It has an infinite slope at ±1\pm1, which means it is not differentiable there, but it has no jump: arcsin⁡t→π2\arcsin t \to \frac\pi2 as t→1−t \to 1^-.
    5. Compose. f=arcsin⁡∘gf = \arcsin \circ g is continuous at every point of R2∖{(0,0)}\mathbb R^2 \setminus \{(0, 0)\}, including points (x,0)(x, 0) on the xx-axis where g=±1g = \pm1. Composition (d).

    Answer. ff is continuous at every point except the origin (where it is not defined). The printed key said ff is discontinuous along y=0y = 0; that mixes up “infinite slope” with “discontinuous”. Near (1,0)(1, 0) for instance g→1g \to 1 and f→π2f \to \frac\pi2.

    Quick checkFor f(x,y)=arcsin⁡xx2+y2f(x, y) = \arcsin\frac{x}{\sqrt{x^2 + y^2}}, can we define f(0,0)f(0, 0) so that ff becomes continuous at the origin?

    Open sets from continuous fields

    Continuity is the tool that shows a set defined by an inequality is open. Chapter 4.1 introduced open sets; here is the bridge.

    Theorem T Apostol 8.5 #9; used in 8.3 #2

    A strict inequality between continuous fields defines an open set

    Let gg be a scalar field, continuous on an open set U⊆RnU \subseteq \mathbb R^n (for example on all of Rn\mathbb R^n). Then P={x∈U:g(x)>0}P = \{x \in U : g(x) > 0\} is open. The same holds for g<0g < 0, and for g<cg < c or g>cg > c with any constant cc (apply the result to c−gc - g or g−cg - c).

    In one lineIf gg is a continuous scalar field on an open set, then {x:g(x)>0}\{x : g(x) > 0\} is open.

    Why it is trueIt lets you prove 'this set is open' by writing the set as {g>0}\{g > 0\} and checking that gg is continuous, instead of finding a ball around every point.

    ProofApostol 8.5 #9
    The idea: At a point a with g(a) > 0, continuity with the choice ε = g(a) keeps g within g(a) of g(a), so g stays positive on a whole ball.
    Let a∈Pa \in P and put ε=g(a)>0\varepsilon = g(a) > 0.
    a∈Pa \in P means g(a)>0g(a) > 0. This positive number is a legitimate choice of ε\varepsilon.
    There is δ>0\delta > 0 with B(a,δ)⊆UB(a, \delta) \subseteq U and ∣g(x)−g(a)∣<g(a)|g(x) - g(a)| < g(a) for all x∈B(a,δ)x \in B(a, \delta).
    Continuity of gg at aa, together with UU open so the ball can be taken inside UU.
    So 0<g(x)<2g(a)0 < g(x) < 2g(a) for x∈B(a,δ)x \in B(a, \delta); in particular g(x)>0g(x) > 0.
    ∣g(x)−g(a)∣<g(a)|g(x) - g(a)| < g(a) means −g(a)<g(x)−g(a)<g(a)-g(a) < g(x) - g(a) < g(a); add g(a)g(a) to all three parts.
    So B(a,δ)⊆PB(a, \delta) \subseteq P, and PP is open. ■\blacksquare
    Definition of open set (4.1): every point has a ball inside.
    Worked example MATH 375 HW 11 (Apostol 8.3 #2m); the key's sketch does not match this set
    Is S={(x,y):(x2+y2−1)(4−x2−y2)>0}S = \{(x, y) : (x^2 + y^2 - 1)(4 - x^2 - y^2) > 0\} open? Sketch it and indicate its boundary.

    Solution.

    1. Write SS as {g>0}\{g > 0\}. g(x,y)=(x2+y2−1)(4−x2−y2)g(x, y) = (x^2 + y^2 - 1)(4 - x^2 - y^2) is a polynomial, hence continuous on R2\mathbb R^2. Building continuous fields (b).
    2. So SS is open. By the theorem proved above.
    3. Describe SS. Put ρ=x2+y2\rho = x^2 + y^2. A product (ρ−1)(4−ρ)(\rho - 1)(4 - \rho) is positive when both factors have the same sign. Both positive: ρ>1\rho > 1 and ρ<4\rho < 4. Both negative: ρ<1\rho < 1 and ρ>4\rho > 4, impossible. So S={1<x2+y2<4}S = \{1 < x^2 + y^2 < 4\}. Sign analysis of a product.
    4. Identify the shape. SS is the open annulus between the circles of radius 11 and radius 22 about the origin. ρ=r2\rho = r^2, so 1<r<21 < r < 2.
    5. The boundary. ∂S\partial S is the two circles x2+y2=1x^2 + y^2 = 1 and x2+y2=4x^2 + y^2 = 4. There g=0g = 0, so they are not in SS; every ball around such a point contains points with 1<r<21 < r < 2 (in SS) and points outside, which is the definition of a boundary point (4.1).

    Answer. SS is open: the annulus 1<∥(x,y)∥<21 < \lVert (x, y) \rVert < 2. Its boundary is the two circles; no boundary point belongs to SS. (The printed key draws two overlapping discs, which is the picture for a similar problem with non-concentric circles; its conclusion “open, boundary excluded” is right.)

    Worked example Lecture 19 (second version); Apostol 8.2
    Prove that the open rectangle A1×A2A_1 \times A_2 is open in R2\mathbb R^2 when A1A_1 and A2A_2 are open intervals.

    Solution.

    1. Take a point. Let a=(a1,a2)∈A1×A2a = (a_1, a_2) \in A_1 \times A_2. To show a set is open we must find a ball around an arbitrary point of it.
    2. Use that each interval is open. There are r1,r2>0r_1, r_2 > 0 with B(a1,r1)⊆A1B(a_1, r_1) \subseteq A_1 and B(a2,r2)⊆A2B(a_2, r_2) \subseteq A_2 (balls in R\mathbb R are intervals). A1A_1 and A2A_2 are open sets of R\mathbb R.
    3. Take the smaller radius. Put r=min⁡(r1,r2)r = \min(r_1, r_2). The ball in the plane must fit in both directions at once.
    4. Check the ball. If ∥x−a∥<r\lVert x - a \rVert < r, then ∣x1−a1∣≤∥x−a∥<r≤r1|x_1 - a_1| \le \lVert x - a \rVert < r \le r_1 and likewise ∣x2−a2∣<r2|x_2 - a_2| < r_2. So x1∈A1x_1 \in A_1 and x2∈A2x_2 \in A_2. A coordinate is not longer than the vector.

    Answer. B(a,r)⊆A1×A2B(a, r) \subseteq A_1 \times A_2, so every point of the rectangle has a ball inside: it is open. (An open interval of the line, viewed as a subset of the plane, is not open in the plane: no disc fits inside a line.) ■\blacksquare

    Worked example Apostol 8.3 #2e
    Is S={(x,y):∣x∣≤1, ∣y∣<1}S = \{(x, y) : |x| \le 1,\ |y| < 1\} open?

    Solution.

    1. Look for a bad point. A set is open only if every one of its points has a ball inside it. So we look for a point of SS with no such ball. The suspects are the points with ∣x∣=1|x| = 1, where the inequality is not strict. At a point with ∣x∣<1|x| < 1 and ∣y∣<1|y| < 1 a small ball fits (the open rectangle example). Only the edge points can fail.
    2. Take a=(1,0)a = (1, 0). It is in SS because ∣1∣≤1|1| \le 1 and ∣0∣<1|0| < 1. We need a point that belongs to SS.
    3. Show no ball around aa fits. Let r>0r > 0 be any radius. The point b=(1+r2,0)b = (1 + \frac r2, 0) is at distance r2<r\frac r2 < r from aa, so b∈B(a,r)b \in B(a, r). But ∣1+r2∣>1|1 + \frac r2| > 1, so b∉Sb \notin S. Every ball around aa, however small, contains a point with x>1x > 1.

    Answer. No, SS is not open: the point (1,0)(1, 0) of SS has no ball around it inside SS. To show a set is not open, find one point and show every ball around it leaves the set. To show it is open, take an arbitrary point and find a ball.

    Same idea elsewhere· Interior, exterior and boundary in Lecture 19

    Lecture 19 splits the space into three parts for a set SS. A point is interior if a ball around it lies in SS; exterior if a ball around it lies entirely outside SS (that is, it is interior to the complement); and a boundary point otherwise. The first and third are the interior and boundary of 4.1; Apostol’s exterior is the interior of the complement. Every point is in exactly one of the three. That the derivative of a field is defined at interior points is the reason these words appear here: a derivative needs room around the point in every direction.

    Where it is used

    Used inside maths· Inside maths: the set of invertible matrices is open

    The determinant of an n×nn \times n matrix is a polynomial in its n2n^2 entries (2.7), so det⁡:Rn2→R\det: \mathbb R^{n^2} \to \mathbb R is a continuous scalar field. A matrix is invertible exactly when det⁡A≠0\det A \ne 0, that is, when (det⁡A)2>0(\det A)^2 > 0. By the theorem above, the set of invertible matrices is an open subset of Rn2\mathbb R^{n^2}: if AA is invertible, every matrix close enough to AA is invertible too. This is why a tiny perturbation of an invertible matrix cannot make it singular, and why conditioning (3.5) measures how tiny “tiny” must be.

    Used in the real world· Weather and AI: fields on a grid, and the loss landscape

    The ERA5 reanalysis of the European weather centre stores the wind 10 metres above the ground as two scalar fields, an east-west component and a north-south component, on a grid with 721 latitudes and 1440 longitudes (every quarter of a degree): 721×1440=1,038,240721 \times 1440 = 1{,}038{,}240 points for each hour. Together they form a vector field on the sphere. The sea-level pressure on the same grid is a scalar field whose level curves are the isobars on every weather map.

    A neural network with nn weights has a loss L(w1,…,wn)L(w_1, \dots, w_n), a scalar field on Rn\mathbb R^n. The largest version of GPT-2 has about 1.5×1091.5 \times 10^9 weights, so its loss is a scalar field on a space of about 1.5 billion dimensions. Nobody can draw its graph; the two-dimensional “loss landscape” pictures in papers are the graph of LL restricted to a plane through the current weights, and the contour lines in them are level sets. Training moves a point of that space downhill (chapters 5.2 and 5.10).

    Traps

    Watch out· Lines are not enough

    A limit that is the same along every straight line can still fail to exist (x2yx4+y2\frac{x^2y}{x^4+y^2}), and a function with the same limit along every line can be discontinuous. A limit is a statement about all approaches. To disprove a limit, find two paths (curved ones too). To prove one, bound the difference by a function of the distance alone.

    Watch out· Equal iterated limits do not give a limit

    Apostol 8.5 #4: f=x2y2x2y2+(x−y)2f = \dfrac{x^2y^2}{x^2y^2 + (x - y)^2} has both iterated limits equal to 00, but along y=xy = x its value is 11. The converse of Apostol 8.5 #2 is false. Iterated limits are two limits in one variable at a time, which is much weaker than the two-variable limit.

    Watch out· Separately continuous is not continuous

    A function can be continuous in xx for each yy and continuous in yy for each xx, and still be discontinuous (Peano’s xyx2+y2\frac{xy}{x^2+y^2}). Joint continuity is what the course and the theorems of the next chapters use.

    Watch out· Domain and discontinuity are different things

    A point where ff is not defined is not automatically a “point of discontinuity”, and a function can be continuous everywhere on its domain even if it has infinite slope somewhere. The key to HW 11 #1(f) and #1(j) made this mistake: arcsin⁡\arcsin and arccos⁡\arccos are continuous on all of [−1,1][-1, 1], endpoints included. First find the domain; then use compositions of continuous fields to conclude continuity on it.

    Watch out· A bound in polar coordinates must be free of θ

    ∣rcos⁡2θsin⁡θ∣≤r|r\cos^2\theta\sin\theta| \le r proves a limit. An expression like rcos⁡2θsin⁡θr2cos⁡4θ+sin⁡2θ\dfrac{r\cos^2\theta\sin\theta}{r^2\cos^4\theta + \sin^2\theta} does not, because near θ=0\theta = 0 its size is not controlled by rr.

    Watch out· There is no quotient of vectors

    F/GF/G for vector fields has no meaning (Lecture 19: “don’t have such an object”). Dot products F⋅GF \cdot G and cross products make sense; dividing by a vector does not. The quotient law is for scalar fields only.

    Problems

    checkApostol 8.3 #1a

    Describe the level sets of f(x,y)=x2+y2f(x, y) = x^2 + y^2 for c=0,1,4,9c = 0, 1, 4, 9.

    Solution

    x2+y2=cx^2 + y^2 = c. For c=0c = 0 it is the single point (0,0)(0, 0); for c=1,4,9c = 1, 4, 9 it is the circle about the origin of radius 1,2,31, 2, 3. For c<0c < 0 the level set is empty.

    checkApostol 8.3 #1b

    Describe the level set exy=ce^{xy} = c for c=e−2,1,ec = e^{-2}, 1, e.

    Solution

    exy=ce^{xy} = c means xy=ln⁡cxy = \ln c. For c=e−2c = e^{-2}: xy=−2xy = -2, a hyperbola in the second and fourth quadrants. For c=1c = 1: xy=0xy = 0, the two coordinate axes. For c=ec = e: xy=1xy = 1, a hyperbola in the first and third quadrants.

    checkApostol 8.3 #2c and #2e

    Are {(x,y):∣x∣<1, ∣y∣<1}\{(x, y) : |x| < 1,\ |y| < 1\} and {(x,y):∣x∣≤1, ∣y∣<1}\{(x, y) : |x| \le 1,\ |y| < 1\} open?

    Solution

    The first is the product of the open intervals (−1,1)×(−1,1)(-1, 1) \times (-1, 1), hence open (worked example). The second is not open: the point (1,0)(1, 0) belongs to it, but every ball around (1,0)(1, 0) contains points with x>1x > 1, which are not in the set.

    checkMATH 375 HW 11 (Apostol 8.5 #1b)

    Find the set of points where f(x,y)=log⁡(x2+y2)f(x, y) = \log(x^2 + y^2) is continuous.

    Solution

    x2+y2x^2 + y^2 is continuous, and log⁡\log is continuous on (0,∞)(0, \infty). So ff is continuous wherever x2+y2>0x^2 + y^2 > 0, that is at every point except (0,0)(0, 0), where it is not defined.

    useApostol 8.5 #6

    Let f(x,y)=x2−y2x2+y2f(x, y) = \dfrac{x^2 - y^2}{x^2 + y^2} for (x,y)≠(0,0)(x, y) \ne (0, 0). Find the limit of ff along the line y=mxy = mx. Can f(0,0)f(0, 0) be defined so that ff is continuous at the origin?

    Solution

    f(x,mx)=x2(1−m2)x2(1+m2)=1−m21+m2f(x, mx) = \dfrac{x^2(1 - m^2)}{x^2(1 + m^2)} = \dfrac{1 - m^2}{1 + m^2}, which depends on mm: it is 11 on the xx-axis, −1-1 on the yy-axis and 00 on the diagonal. Two paths give different limits, so lim⁡(x,y)→(0,0)f\lim_{(x,y)\to(0,0)} f does not exist and no value of f(0,0)f(0,0) makes ff continuous.

    useMATH 375 HW 11 (Apostol 8.5 #1j); the printed key drops the boundary cases

    Find the set where f(x,y)=arccos⁡x/yf(x, y) = \arccos\sqrt{x/y} is continuous.

    Solution

    Domain: y≠0y \ne 0 and 0≤x/y≤10 \le x/y \le 1 (for ⋅\sqrt{\cdot} to be defined and for the value to lie in [−1,1][-1, 1], the domain of arccos⁡\arccos). Within this set, x/yx/y is continuous (quotient with y≠0y \ne 0), ⋅\sqrt{\cdot} is continuous on [0,∞)[0, \infty) and arccos⁡\arccos is continuous on [−1,1][-1, 1], endpoints included. So ff is continuous on its whole domain: {y>0, 0≤x≤y}∪{y<0, y≤x≤0}\{y > 0,\ 0 \le x \le y\} \cup \{y < 0,\ y \le x \le 0\}. That includes the points with x=0x = 0 (where f=π2f = \frac\pi2) and with x=yx = y (where f=0f = 0). The printed key kept only the strict inequalities.

    useApostol 8.5 #4

    Let f(x,y)=x2y2x2y2+(x−y)2f(x, y) = \dfrac{x^2y^2}{x^2y^2 + (x - y)^2} when the denominator is not zero. Show that both iterated limits at the origin are 00, but that ff has no limit at the origin.

    Solution

    For fixed x≠0x \ne 0, as y→0y \to 0 the numerator tends to 00 and the denominator to x2≠0x^2 \ne 0, so f(x,y)→0f(x, y) \to 0; thus lim⁡x→0lim⁡y→0f=0\lim_{x \to 0}\lim_{y \to 0} f = 0. By symmetry in xx and yy the other order also gives 00. On the line y=xy = x: f(x,x)=x4x4+0=1f(x, x) = \dfrac{x^4}{x^4 + 0} = 1. A path with value 11 and a path with limit 00 (the axes) show that the two-variable limit does not exist.

    useApostol 8.5 #7

    Let f(x,y)=1f(x, y) = 1 if 0<y<x20 < y < x^2 and f(x,y)=0f(x, y) = 0 otherwise. Show f→0f \to 0 along every straight line through the origin, find a curve through the origin on which f=1f = 1 except at the origin, and decide whether ff is continuous at the origin.

    Solution

    A line y=mxy = mx with m≠0m \ne 0 lies in {0<y<x2}\{0 < y < x^2\} only if 0<mx<x20 < mx < x^2, which for small ∣x∣|x| fails (it would need ∣x∣>∣m∣|x| > |m|). So near the origin f=0f = 0 on every such line; on the axes f=0f = 0 as well. On the parabola y=x2/2y = x^2/2, for x≠0x \ne 0: 0<x22<x20 < \frac{x^2}{2} < x^2, so f=1f = 1. Since f(0,0)=0f(0,0) = 0, ff is not continuous at the origin.

    proveApostol 8.5 #2

    Suppose lim⁡(x,y)→(a,b)f(x,y)=L\lim_{(x,y)\to(a,b)} f(x, y) = L and that for every yy near bb (y≠by \ne b) the limit φ(y)=lim⁡x→af(x,y)\varphi(y) = \lim_{x \to a} f(x, y) exists. Prove lim⁡y→bφ(y)=L\lim_{y \to b}\varphi(y) = L.

    Solution

    Plan. Use the two-variable ε\varepsilon and δ\delta with yy held fixed, then let x→ax \to a inside the inequality.

    Let ε>0\varepsilon > 0. Choose δ>0\delta > 0 with ∣f(x,y)−L∣<ε|f(x, y) - L| < \varepsilon whenever 0<∥(x−a,y−b)∥<δ0 < \lVert (x - a, y - b) \rVert < \delta. Fix yy with 0<∣y−b∣<δ0 < |y - b| < \delta. For every xx with ∣x−a∣<δ2−(y−b)2|x - a| < \sqrt{\delta^2 - (y - b)^2} we have 0<∥(x−a,y−b)∥<δ0 < \lVert (x - a, y - b) \rVert < \delta (positive because y≠by \ne b), so ∣f(x,y)−L∣<ε|f(x, y) - L| < \varepsilon. Letting x→ax \to a, the limit preserves the non-strict inequality: ∣φ(y)−L∣≤ε|\varphi(y) - L| \le \varepsilon. This holds for all yy with 0<∣y−b∣<δ0 < |y - b| < \delta, so φ(y)→L\varphi(y) \to L as y→by \to b. ■\blacksquare (The same argument with the roles of xx and yy swapped gives the other iterated limit.)

    prove

    Prove that if ff is a continuous scalar field on Rn\mathbb R^n and cc is a number, then {x:f(x)<c}\{x : f(x) < c\} is open and {x:f(x)≥c}\{x : f(x) \ge c\} is closed.

    Solution

    Plan. Apply the strict-inequality theorem to g=c−fg = c - f, then take a complement.

    g=c−fg = c - f is continuous (difference of continuous fields), so {g>0}={f<c}\{g > 0\} = \{f < c\} is open. Its complement is {f≥c}\{f \ge c\}, which is closed by the definition of a closed set (4.1). ■\blacksquare

    proveApostol 8.4 Example 3

    Prove that a linear map T:Rn→RmT: \mathbb R^n \to \mathbb R^m satisfies ∥T(h)∥≤K∥h∥\lVert T(h) \rVert \le K\lVert h \rVert for some constant KK, and deduce that TT is continuous.

    Solution

    Plan. Write hh in the standard basis and use the triangle inequality.

    h=∑khkekh = \sum_k h_k e_k and TT is linear, so T(h)=∑khkT(ek)T(h) = \sum_k h_k T(e_k). By the triangle inequality and ∣hk∣≤∥h∥|h_k| \le \lVert h \rVert: ∥T(h)∥≤∑k∣hk∣ ∥T(ek)∥≤∥h∥∑k∥T(ek)∥\lVert T(h) \rVert \le \sum_k |h_k|\,\lVert T(e_k) \rVert \le \lVert h \rVert \sum_k \lVert T(e_k) \rVert. Take K=∑k∥T(ek)∥K = \sum_k \lVert T(e_k) \rVert. Then ∥T(a+h)−T(a)∥=∥T(h)∥≤K∥h∥\lVert T(a + h) - T(a) \rVert = \lVert T(h) \rVert \le K\lVert h \rVert, which is below ε\varepsilon when ∥h∥<ε/(K+1)\lVert h \rVert < \varepsilon/(K + 1). So TT is continuous at every aa. ■\blacksquare

    prove

    Write an ε\varepsilon and δ\delta argument showing that f(x,y)=x2yx4+y2f(x, y) = \dfrac{x^2y}{x^4 + y^2} (with f(0,0)=0f(0,0) = 0) is not continuous at the origin.

    Solution

    Plan. To deny continuity, exhibit one ε\varepsilon for which no δ\delta works.

    Take ε=14\varepsilon = \frac14. Let δ>0\delta > 0 be arbitrary. Choose x>0x > 0 so small that x1+x2<δx\sqrt{1 + x^2} < \delta (possible since the left side tends to 00), and let y=x2y = x^2. The point (x,x2)(x, x^2) has length x1+x2<δx\sqrt{1 + x^2} < \delta, yet ∣f(x,x2)−f(0,0)∣=12>14|f(x, x^2) - f(0,0)| = \frac12 > \frac14. So no δ\delta works for this ε\varepsilon, and ff is not continuous at the origin. ■\blacksquare

    stretch

    For a,b>0a, b > 0 and c>0c > 0, let f(x,y)=∣x∣a∣y∣b(x2+y2)cf(x, y) = \dfrac{|x|^a|y|^b}{(x^2 + y^2)^c} with f(0,0)=0f(0,0) = 0. Prove that ff is continuous at the origin if and only if a+b>2ca + b > 2c.

    Solution

    Plan. If a+b>2ca + b > 2c, bound by a power of rr. If not, the diagonal is a path along which ff does not tend to 00.

    If a+b>2ca + b > 2c: ∣x∣≤r|x| \le r and ∣y∣≤r|y| \le r, so f≤rarbr2c=ra+b−2c→0f \le \dfrac{r^a r^b}{r^{2c}} = r^{a + b - 2c} \to 0 as r→0r \to 0. By the squeeze, f→0=f(0,0)f \to 0 = f(0,0). If a+b≤2ca + b \le 2c: on the diagonal y=xy = x, f(x,x)=∣x∣a+b2c∣x∣2c=2−c∣x∣a+b−2cf(x, x) = \dfrac{|x|^{a + b}}{2^c|x|^{2c}} = 2^{-c}|x|^{a + b - 2c}, which equals the constant 2−c≠02^{-c} \ne 0 if a+b=2ca + b = 2c and tends to ∞\infty if a+b<2ca + b < 2c. Either way it does not tend to 0=f(0,0)0 = f(0,0), so ff is not continuous. ■\blacksquare (Examples: x2y/(x2+y2)x^2y/(x^2+y^2) has a+b=3>2a + b = 3 > 2; xy/(x2+y2)xy/(x^2+y^2) has a+b=2=2ca + b = 2 = 2c.)

    stretchMATH 375 Final Review, 8.4

    Give an example of a function f:R2→Rf: \mathbb R^2 \to \mathbb R that is continuous in each variable separately everywhere and yet discontinuous at the origin, and one that has limit 00 along every line through the origin but is discontinuous at the origin. Are the two examples the same function?

    Solution

    The first: xyx2+y2\dfrac{xy}{x^2+y^2} with f(0,0)=0f(0,0) = 0 (worked above). It is not an example of the second kind, since along y=xy = x its value is 12\frac12. The second: x2yx4+y2\dfrac{x^2y}{x^4+y^2} with f(0,0)=0f(0,0) = 0: along every line the limit is 00, but along y=x2y = x^2 the value is 12\frac12. It is also separately continuous at the origin (on the axes it is 00), though one would still check separate continuity at other points, where it is a quotient with nonzero denominator and hence continuous. So the second function is a counterexample to both claims at once; the first is a counterexample to the first claim only.

    Summary

    • A scalar field f:S→Rf: S \to \mathbb R (S⊆RnS \subseteq \mathbb R^n) gives a number at each point; a vector field F:S→RmF: S \to \mathbb R^m gives a vector, with mm scalar-field components. A level set L(c)={f=c}L(c) = \{f = c\} is the slice of the graph at height cc, projected to the floor.
    • lim⁡x→aF(x)=b\lim_{x \to a} F(x) = b means ∥F(x)−b∥→0\lVert F(x) - b \rVert \to 0 as ∥x−a∥→0\lVert x - a \rVert \to 0. The laws of 1.2 hold (sum, scalar multiple, dot product, norm, and quotients of scalar fields); a field has a limit exactly when each component does.
    • In Rn\mathbb R^n a point can be approached along infinitely many paths. Two paths with different limits (or one path with no limit) prove that a limit does not exist. Lines are not enough: x2yx4+y2\frac{x^2y}{x^4+y^2} has limit 00 along every line and no limit.
    • To prove a limit exists, squeeze: bound ∥F(x)−b∥\lVert F(x) - b \rVert by a function of r=∥x−a∥r = \lVert x - a \rVert alone. In polar coordinates the bound must be free of θ\theta.
    • A field is continuous at aa if F(a)F(a) is defined and equals the limit. Sums, products, quotients (nonzero denominator), norms, polynomials, linear maps and compositions of continuous fields are continuous; log⁡(sin⁡2(x2+y2))\log(\sin^2(x^2+y^2)) fails to be continuous exactly on the circles x2+y2=mπx^2 + y^2 = m\pi.
    • Separately continuous does not mean jointly continuous (Peano). Equal iterated limits do not give a limit.
    • A strict inequality g>0g > 0 for a continuous gg defines an open set: this is how to show that sets such as the annulus 1<∥x∥<21 < \lVert x \rVert < 2 are open, and that the invertible matrices form an open set.

    Watch and read

    The same ideas explained by someone else. Use these when an explanation here does not land.

    Where this sits

    Comes from
    1.3 Limits and continuity with epsilon and delta
    2.9 Inner products, orthogonality, Gram–Schmidt, projection
    4.1 Metric and normed spaces; open and closed sets
    4.5 Continuity between metric spaces
    Leads to
    5.2 Directional derivatives, partial derivatives and the gradient
    Same idea elsewhere
    MATH 375: Lecture 19 and Apostol 8.1 to 8.5. The examples (x − y)/(x + y), log(sin²(x² + y²)) and the homework on level sets, continuity sets and iterated limits are all worked below.
    MATH 521: 521 proves that a continuous map sends compact sets to compact sets, and that continuity can be tested with sequences. The path test below is the sequence test, and the failure of line-by-line checking is why 521 insists on ε and δ.
    MATH 551: Topology defines continuity by open sets alone. The theorem that a strict inequality between continuous fields gives an open set is the first half of that definition.
    AI: A loss function is a scalar field on the space of all weights. Every picture of a 'loss landscape' is a graph or a set of level curves of that field.