Reason: First published version of the proof, carried onto lem:scaled-squared-distance-c2-2026a. The partial derivatives are computed through the slice function, using that all but one summand of the finite sum cancel; continuity of the function and of its first partials is verified against the Euclidean definition of continuity, after an explicit translation of that definition into the distance d_E.
Square comparison. We record an elementary fact used twice below: if r,s∈R satisfy 0≤r and 0<s, then r<s if and only if r2<s2. Indeed, if r<s then r⋅r≤r⋅s by multiplication by the nonnegative r and r⋅s<s⋅s by strict compatibility with multiplication by the positive s, so r2<s2 by mixed transitivity. Conversely, if s≤r then s⋅s≤s⋅r and s⋅r≤r⋅r by multiplication by the nonnegative elements s and r, so s2≤r2 and r2<s2 fails; hence r2<s2 forces r<s.
Translation of Euclidean continuity. Let E⊆Rn, let f:E→R and let b∈E. We claim that f is continuous at b if and only if for every ε∈R with 0<ε there is δ∈R with 0<δ such that every x∈E with dE(x,b)<δ satisfies ∣f(x)−f(b)∣<ε. This is only a rewriting of that definition, taken with m=1 and with f as the single coordinate function. In it, the hypothesis is ∑k=1n(xk−bk)2<δ2, which by the displayed identity above equals dE(x,b)2<δ2 and hence, by the square comparison applied with r=dE(x,b) and s=δ, is equivalent to dE(x,b)<δ; the conclusion is (f(x)−f(b))2<ε2, and since t2=∣t∣⋅∣t∣ for every real t (by claim 1 of the absolute-value lemma, ∣t∣ is t or −t, and in either case ∣t∣⋅∣t∣=t⋅t), the square comparison applied with r=∣f(x)−f(b)∣ and s=ε shows that this is equivalent to ∣f(x)−f(b)∣<ε. Below, continuous for real-valued functions on subsets of Rn always refers to this criterion.
Step 1: proof of claim 1. Fix b=(b1,…,bn)∈U and j∈{1,…,n}, and apply Slice Function and the Partial Derivative to q at b in the jth variable: let ρ∈R with 0<ρ be as in claim 1 of that lemma, and let I and the slice function g:I→R, g(s)=q(b[s]), be as in claim 2, where b[s] is the point of Rn whose jth coordinate is s and whose kth coordinate is bk for k=j, so that b[bj]=b.
Let h∈R satisfy 0<∣h∣ and bj+h∈I. Using the displayed formula for q and claims 2 and 3 of Properties of Finite Sums (additivity, and homogeneity with the scalar −1, which together give that a difference of two finite sums is the finite sum of the differences),
the division being legitimate because h=0. By claim 4 of the absolute-value lemma,
hg(bj+h)−g(bj)−2ct=∣c∣∣h∣.
Now let ε∈R with 0<ε. The element 1+∣c∣ satisfies 0<1+∣c∣, since 0≤1, 0≤∣c∣ and 1+∣c∣=0 (were 1+∣c∣=0 we would get 1=−∣c∣≤0, contradicting 0≤1 and 1=0); hence δ=ε⋅(1+∣c∣)−1 satisfies 0<δ. If 0<∣h∣<δ, then ∣c∣∣h∣≤(1+∣c∣)∣h∣ by multiplication of ∣c∣≤1+∣c∣ by the nonnegative ∣h∣, and (1+∣c∣)∣h∣<(1+∣c∣)δ=ε by strict compatibility with multiplication by the positive 1+∣c∣; so
hg(bj+h)−g(bj)−2ct<ε.
By Derivative at an Interior Point, g is differentiable at bj with g′(bj)=2ct=2c(bj−aj), and by claim 2 of Slice Function and the Partial Derivative the partial derivative of q with respect to the jth variable exists at b and equals 2c(bj−aj). Since b∈U and j were arbitrary, claim 1 holds.
Step 2: continuity of q and of its first partial derivatives. For j∈{1,…,n} let pj:U→R be the function pj(x)=2c(xj−aj); by claim 1, pj is the function ∂q/∂xj on U.
(i) Each pj is continuous at every point of U. Let b∈U and 0<ε. For x∈U we have pj(x)−pj(b)=2c(xj−bj), so by claim 4 of the absolute-value lemma and then claim 4 (coordinate bound) and claim 2 of Elementary Properties of the Euclidean Norm on Rn,
With δ=ε⋅(1+∣2c∣)−1, which is positive for the reason given in Step 1, dE(x,b)<δ gives ∣2c∣dE(x,b)≤(1+∣2c∣)dE(x,b)<(1+∣2c∣)δ=ε, whence ∣pj(x)−pj(b)∣<ε.
(ii) q is continuous at every point of U. Let b∈U and 0<ε, and set r=∥x−a∥ for a given x∈U and s=∥b−a∥. By claim 1 of Elementary Properties of the Euclidean Norm on Rn, q(x)=cr2 and q(b)=cs2, and 0≤r, 0≤s. Since Rn is a real vector space by Euclidean Space Rn is a Real Vector Space, we have x−a=(x−b)+(b−a), so claim 6 (triangle inequality) of Elementary Properties of the Euclidean Norm on Rn gives r≤∥x−b∥+s, that is, r−s≤∥x−b∥. Exchanging the roles of x and b and using claim 5 of that lemma with λ=−1 together with b−x=−(x−b) gives s−r≤∥b−x∥=∥x−b∥. By claim 6 (two-sided bound) of the absolute-value lemma, ∣r−s∣≤∥x−b∥=dE(x,b). Also r+s≤dE(x,b)+2s and 0≤r+s.
By elementary field arithmetic r2−s2=(r−s)(r+s), so by claim 4 of the absolute-value lemma and ∣r+s∣=r+s,
the last inequality being obtained by multiplying ∣r−s∣≤dE(x,b) and r+s≤dE(x,b)+2s by nonnegative elements and using mixed transitivity. Let δ be the minimum of 1 and ε⋅(1+∣c∣(1+2s))−1; by claim 2 of Elementary Properties of the Minimum of Two Elements the value δ is one of these two positive numbers, so 0<δ, and by claim 1 of that lemma δ≤1 and δ≤ε⋅(1+∣c∣(1+2s))−1. If x∈U satisfies dE(x,b)<δ, then dE(x,b)+2s<1+2s, hence
where the middle inequality multiplies dE(x,b)+2s≤1+2s by the nonnegative ∣c∣dE(x,b), and the strict inequality multiplies dE(x,b)<δ by the positive 1+∣c∣(1+2s) after bounding ∣c∣(1+2s)≤1+∣c∣(1+2s). Thus q is continuous at b.
Step 3: second partial derivatives. Fix b=(b1,…,bn)∈U and i,j∈{1,…,n}, and apply Slice Function and the Partial Derivative to pj at b in the ith variable, obtaining ρ, I and the slice function g2(s)=pj(b⟨s⟩), where b⟨s⟩ has ith coordinate s and kth coordinate bk for k=i.
If i=j, then g2(s)=2c(s−aj), so for h=0 with bi+h∈I we get g2(bi+h)−g2(bi)=2ch and hence the difference quotient equals 2c exactly; so for every ε with 0<ε any positive δ witnesses Derivative at an Interior Point, and g2′(bi)=2c.
∂xi∂xj∂2q(b)=2c if i=j,∂xi∂xj∂2q(b)=0 if i=j.
These values do not depend on b, so each function ∂2q/∂xi∂xj is constant on U and hence continuous at every point of U (for any ε with 0<ε, any positive δ works, since the difference of values is 0 and ∣0∣=0<ε).
Step 4: proof of claim 2. By Step 2(ii) the function q is continuous at every point of U, by claim 1 its first partial derivatives exist at every point of U, and by Step 2(i) each function ∂q/∂xj=pj is continuous at every point of U; so q is of class C1 on U, that definition being applied with m=1 and with q as the single coordinate function. Fix j∈{1,…,n}. The function pj is continuous at every point of U by Step 2(i), and by Step 3 its first partial derivatives exist at every point of U and are continuous there; so pj is of class C1 on U. By C^2 Real-Valued Map on an Open Subset of Euclidean Space, q is of class C2 on U.
and since the kth coordinate of x−a is xk−ak and the kth coordinate of the scalar multiple (2c)(x−a) is 2c(xk−ak) by Scalar Multiple of a Point of Rn, this is exactly (2c)(x−a).
By Hessian Matrix of a C^2 Function and Step 3, the entry of D2q(x) in row i and column j is 2c if i=j and 0 if i=j. By Identity Matrix the corresponding entry of In is 1 if i=j and 0 otherwise, and by Scalar Multiple of a Real Matrix the entry of (2c)In in row i and column j is 2c times that, that is, 2c if i=j and 0 otherwise. Since two real n×n matrices with the same entries are equal, D2q(x)=(2c)In.