Chapter V · Limits of functions of a continuous variable. Continuous and discontinuous functions

Continuous functions of two variables

§108 25 min

What continuity of ϕ(x,y)\phi(x, y) at a point means, and why it says much more than continuity in xx and in yy separately.

Why this matters

An equation f(x,y)=0f(x, y) = 0 defines a curve, and to ask whether it defines yy as a continuous function of xx (the next lesson) we need to know what it means for ff itself to be continuous. Partial derivatives, double integrals and every function of a point in the plane rest on the same notion. In §108 Hardy gives the definition and one striking example: a function that is continuous along every horizontal and every vertical line, yet not continuous.

The idea

For one variable, “xx near ξ\xi” meant an interval round ξ\xi. For two variables, “(x,y)(x, y) near (ξ,η)(\xi, \eta)” should mean a small region round the point, and Hardy uses a square with sides parallel to the axes. Continuity at (ξ,η)(\xi, \eta) says: however small a tolerance ε\varepsilon is named, some square round the point keeps every value of ϕ\phi within ε\varepsilon of ϕ(ξ,η)\phi(\xi, \eta).

The trap is that a square contains far more than the two lines through its centre. A function can behave perfectly on the horizontal and vertical lines, and even on every straight line through the point, and still misbehave in every square.

Explore Shrink the square

Try this. With Hardy’s function, shrink the green square towards the origin and watch the range of values in the readout. Then tilt the purple line (change α\alpha) and read the limit along it. Switch to xyxy and shrink the square again. Finally choose x2y/(x4+y2)x^2y/(x^4 + y^2) and approach along lines, then along parabolas.

ϕ(x,y)=2xyx2+y2\phi(x, y) = \dfrac{2xy}{x^2+y^2}, with ϕ(0,0)=0\phi(0, 0) = 0
xy
  • φ > 0 (darker = larger)
  • φ < 0
  • square of half-side s
  • path of approach
Approach along
In the square ∣x∣,∣y∣≤0.5|x|, |y| \le 0.5, φ takes values from about −1-1 to 11. Along the line y=0.5xy = 0.5x, φ → 0.80.8 as x→0x \to 0. However small the square, the range does not shrink, so φ is not continuous at the origin, although φ(x, 0) and φ(0, y) are continuous functions of one variable.
What to notice

Hardy’s function is constant along each line through the origin (the colours run in rays), with value 2α/(1+α2)2\alpha/(1 + \alpha^2) on y=αxy = \alpha x. So every square, however small, contains the values 11 (on y=xy = x) and −1-1 (on y=−xy = -x), while ϕ(0,0)=0\phi(0, 0) = 0. On the axes (α=0\alpha = 0) it is 00, which is why it is continuous in each variable separately. For xyxy the range shrinks to 00 with the square. The last function tends to 00 along every line, but is α/(1+α2)\alpha/(1 + \alpha^2) along each parabola y=αx2y = \alpha x^2.

Precise statements

Definition Continuity of a function of two variables Hardy: §108

ϕ(x,y)\phi(x, y) is continuous at (ξ,η)(\xi, \eta) if for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that

∣ϕ(x,y)−ϕ(ξ,η)∣<εwhenever ∣x−ξ∣≤δ and ∣y−η∣≤δ.|\phi(x, y) - \phi(\xi, \eta)| < \varepsilon \quad \text{whenever } |x - \xi| \le \delta \text{ and } |y - \eta| \le \delta.

That is, there is a square of side 2δ2\delta, centred at (ξ,η)(\xi, \eta) with sides parallel to the axes, at every point of which (inside or on the boundary) ϕ\phi differs from ϕ(ξ,η)\phi(\xi, \eta) by less than ε\varepsilon. In particular ϕ\phi must be defined throughout such a square.

Hardy also mentions the informal version, “ϕ(x,y)→ϕ(ξ,η)\phi(x, y) \to \phi(\xi, \eta) when x→ξx \to \xi and y→ηy \to \eta in any manner”, and warns that “in any manner” only has a precise meaning through the inequalities of the definition. A square is a matter of convenience: a disc (x−ξ)2+(y−η)2<δ\sqrt{(x - \xi)^2 + (y - \eta)^2} < \delta gives an equivalent definition, since every square round a point contains a disc round it and vice versa.

Theorem Arithmetic preserves continuity Hardy: §108

Sums and products of functions continuous at (ξ,η)(\xi, \eta) are continuous there, and so are quotients whose denominator is not 00 at (ξ,η)(\xi, \eta). Every polynomial in xx and yy is continuous at every point.

Theorem Continuous in both variables implies continuous in each Hardy: §108

If ϕ(x,y)\phi(x, y) is continuous at (ξ,η)(\xi, \eta), then ϕ(x,η)\phi(x, \eta) is a continuous function of xx at ξ\xi, and ϕ(ξ,y)\phi(\xi, y) a continuous function of yy at η\eta. The converse is false.

Proofs

Proof Polynomials in two variables are continuous
Strategy

Start from the two simplest functions, xx and yy, and build up with sums and products. The proofs for sums and products are word for word those for one variable, with “square of half-side δ\delta” in place of “interval of half-length δ\delta”.

The coordinate functions

ϕ(x,y)=x\phi(x, y) = x is continuous at (ξ,η)(\xi, \eta): if ∣x−ξ∣≤δ|x - \xi| \le \delta and ∣y−η∣≤δ|y - \eta| \le \delta then ∣ϕ(x,y)−ϕ(ξ,η)∣=∣x−ξ∣≤δ|\phi(x, y) - \phi(\xi, \eta)| = |x - \xi| \le \delta, so δ=12ε\delta = \tfrac12\varepsilon works. Likewise for yy, and constants are trivially continuous.

Sums and products

Given ε\varepsilon, choose squares for ϕ\phi and for ψ\psi with tolerances as in the one-variable proof (§96, Examples XXXV, 1); the smaller of the two squares works for ϕ+ψ\phi + \psi and for ϕψ\phi\psi.

Build the polynomial

Each monomial c xiyjc\,x^iy^j is a product of continuous factors, and a polynomial is a finite sum of monomials.

Proof Hardy’s example: continuous in each variable, not in both
Strategy

Take ϕ(x,y)=2xy/(x2+y2)\phi(x, y) = 2xy/(x^2 + y^2) away from the origin and ϕ(0,0)=0\phi(0, 0) = 0. On the axes ϕ\phi is 00, which gives separate continuity at the origin. On the line y=αxy = \alpha x it is the constant 2α/(1+α2)2\alpha/(1 + \alpha^2), so every square contains the value 11.

Continuous in xx for fixed yy

If y=0y = 0, then ϕ(x,0)=0\phi(x, 0) = 0 for every xx: continuous. If y=b≠0y = b \ne 0, then ϕ(x,b)=2xb/(x2+b2)\phi(x, b) = 2xb/(x^2 + b^2) is a rational function of xx with denominator never 00: continuous for every xx. The same holds for yy with xx fixed, by symmetry.

Constant along each line through the origin

For x≠0x \ne 0, ϕ(x,αx)=2αx2x2+α2x2=2α1+α2\phi(x, \alpha x) = \dfrac{2\alpha x^2}{x^2 + \alpha^2x^2} = \dfrac{2\alpha}{1 + \alpha^2}. As α\alpha varies this takes every value in [−1,1][-1, 1]; it is 11 for α=1\alpha = 1.

Not continuous at the origin

Take ε=12\varepsilon = \tfrac12. Every square ∣x∣,∣y∣≤δ|x|, |y| \le \delta contains the point (δ,δ)(\delta, \delta), where ϕ=1\phi = 1, and ∣1−ϕ(0,0)∣=1>12|1 - \phi(0, 0)| = 1 > \tfrac12. So no δ\delta works.

Worked examples and exercises

Exercise A function continuous at the origin ●○○ Hardy: §108

Let ϕ(x,y)=xy/x2+y2\phi(x, y) = xy/\sqrt{x^2 + y^2} for (x,y)≠(0,0)(x, y) \ne (0, 0) and ϕ(0,0)=0\phi(0, 0) = 0. Show that ϕ\phi is continuous at the origin.

Hint
∣xy∣≤12(x2+y2)|xy| \le \tfrac12(x^2 + y^2).

Solution

From (∣x∣−∣y∣)2≥0(|x| - |y|)^2 \ge 0 we get ∣xy∣≤12(x2+y2)|xy| \le \tfrac12(x^2 + y^2), so ∣ϕ(x,y)∣≤12x2+y2|\phi(x, y)| \le \tfrac12\sqrt{x^2 + y^2}. In the square ∣x∣,∣y∣≤δ|x|, |y| \le \delta this is at most 122 δ<δ\tfrac12\sqrt{2}\,\delta < \delta. So δ=ε\delta = \varepsilon works: the values in the square are within ε\varepsilon of ϕ(0,0)=0\phi(0, 0) = 0. Compare Hardy’s function: there the factor x2+y2\sqrt{x^2 + y^2} is missing from the numerator, and nothing makes the values small.

Exercise Every line is not enough ●●○ Hardy: §108

Let ϕ(x,y)=x2y/(x4+y2)\phi(x, y) = x^2y/(x^4 + y^2) for (x,y)≠(0,0)(x, y) \ne (0, 0) and ϕ(0,0)=0\phi(0, 0) = 0. Show that ϕ(x,αx)→0\phi(x, \alpha x) \to 0 as x→0x \to 0 for every α\alpha (and ϕ(0,y)=0\phi(0, y) = 0), but that ϕ\phi is not continuous at the origin.

Hint
On y=αxy = \alpha x: ϕ=αx/(x2+α2)\phi = \alpha x/(x^2 + \alpha^2). On y=x2y = x^2: compute.

Solution

On y=αxy = \alpha x with x≠0x \ne 0: ϕ=αx3x4+α2x2=αxx2+α2\phi = \dfrac{\alpha x^3}{x^4 + \alpha^2x^2} = \dfrac{\alpha x}{x^2 + \alpha^2}. If α≠0\alpha \ne 0 this tends to 0/α2=00/\alpha^2 = 0; if α=0\alpha = 0 it is 00. On the yy-axis ϕ=0\phi = 0.

On the parabola y=x2y = x^2 with x≠0x \ne 0: ϕ=x4/(2x4)=12\phi = x^4/(2x^4) = \tfrac12. Every square round the origin contains points (t,t2)(t, t^2) with t≠0t \ne 0, so with ε=14\varepsilon = \tfrac14 no δ\delta works. Approaching along all straight lines does not test all the points near the origin. (In general ϕ(x,αx2)=α/(1+α2)\phi(x, \alpha x^2) = \alpha/(1 + \alpha^2).)

Exercise Squares and discs ●○○ Hardy: §108

Show that the definition of continuity is unchanged if “∣x−ξ∣≤δ|x - \xi| \le \delta and ∣y−η∣≤δ|y - \eta| \le \delta” is replaced by “(x−ξ)2+(y−η)2<δ2(x - \xi)^2 + (y - \eta)^2 < \delta^2”.

Hint
The disc of radius δ\delta lies in the square of half-side δ\delta; the square of half-side δ/2\delta/2 lies in the disc of radius δ\delta.

Solution

If the square condition holds with δ\delta, it holds on the disc of radius δ\delta, which is inside the square (if (x−ξ)2+(y−η)2<δ2(x - \xi)^2 + (y - \eta)^2 < \delta^2 then each of ∣x−ξ∣|x - \xi|, ∣y−η∣|y - \eta| is less than δ\delta). Conversely, if the disc condition holds with δ\delta, then the square of half-side δ/2\delta/2 works: its points have (x−ξ)2+(y−η)2≤2(δ/2)2=12δ2<δ2(x - \xi)^2 + (y - \eta)^2 \le 2(\delta/2)^2 = \tfrac12\delta^2 < \delta^2.

Exercise Composition ●○○ Hardy: §108

Show that sin⁡(x2+y2)\sin(x^2 + y^2) and 1+x2y2\sqrt{1 + x^2y^2} are continuous at every point of the plane.

Hint
Combine the theorem on polynomials with the one-variable composition theorem (§100).

Solution

u=x2+y2u = x^2 + y^2 and v=1+x2y2v = 1 + x^2y^2 are polynomials, hence continuous at every (ξ,η)(\xi, \eta). sin⁡\sin is continuous everywhere, and  \sqrt{\ } is continuous on [0,∞)∋v[0, \infty) \ni v. The proof of the composition theorem goes through unchanged: given ε\varepsilon, continuity of sin⁡\sin at u0=ξ2+η2u_0 = \xi^2 + \eta^2 gives γ\gamma; continuity of uu at (ξ,η)(\xi, \eta) gives a square on which ∣u−u0∣<γ|u - u_0| < \gamma; on that square ∣sin⁡u−sin⁡u0∣<ε|\sin u - \sin u_0| < \varepsilon. The same for v\sqrt{v}.

Check yourself

Check yourself True or false?

If ϕ(x,η)\phi(x, \eta) is continuous in xx at ξ\xi and ϕ(ξ,y)\phi(\xi, y) is continuous in yy at η\eta, then ϕ\phi is continuous at (ξ,η)(\xi, \eta).

Why

False. Hardy’s 2xy/(x2+y2)2xy/(x^2 + y^2) (with 00 at the origin) is 00 on both axes, so both one-variable functions are continuous at 00; but it equals 11 at every point (t,t)(t, t), t≠0t \ne 0, so it is not continuous at the origin.

Check yourself Enter a number

What constant value does Hardy’s function 2xy/(x2+y2)2xy/(x^2 + y^2) take on the line y=2xy = 2x (away from the origin)?

Why

2α/(1+α2)2\alpha/(1 + \alpha^2) with α=2\alpha = 2: 4/5=0.84/5 = 0.8. Each line through the origin carries its own constant, which is why no single limit exists there.

Check yourself Choose one

ϕ(x,y)→0\phi(x, y) \to 0 as (x,y)→(0,0)(x, y) \to (0, 0) along every straight line through the origin, and ϕ(0,0)=0\phi(0, 0) = 0. What follows?

Why

x2y/(x4+y2)x^2y/(x^4 + y^2) tends to 00 along every line (including the axes) but equals 12\tfrac12 on the parabola y=x2y = x^2. Continuity needs every point of a small square, and lines through the centre miss most of them.

Hardy’s language

The reader should observe carefully that to assert the continuity of ϕ(x, y) with respect to the two variables x and y is to assert much more than its continuity with respect to each variable considered separately.

— G. H. Hardy, §108

Summary

Summary
  • ϕ(x,y)\phi(x, y) is continuous at (ξ,η)(\xi, \eta) if every tolerance ε\varepsilon has a square ∣x−ξ∣,∣y−η∣≤δ|x - \xi|, |y - \eta| \le \delta on which ∣ϕ(x,y)−ϕ(ξ,η)∣<ε|\phi(x, y) - \phi(\xi, \eta)| < \varepsilon; discs give the same notion.
  • Sums, products, quotients (nonzero denominator) and compositions behave as for one variable; polynomials in x,yx, y are continuous.
  • Continuity in both variables implies continuity in each separately, but not conversely: 2xy/(x2+y2)2xy/(x^2 + y^2) is constant 2α/(1+α2)2\alpha/(1 + \alpha^2) on each line y=αxy = \alpha x.
  • Even limits along all straight lines do not settle continuity (x2y/(x4+y2)x^2y/(x^4 + y^2)).