Definitions
(a) Let p = (p1, . . . , pn) ∈ Rn and let r > 0. Then Br(p) = {x = (x1, . . . , xn) ∈ Rn|
n
X
i=1
(xi− pi)21/2
= kx − pk < r}
is the (open) ball in Rn with center x and of radius r.
(b) E is called an opensubset of Rn if
for each p ∈ E there is an r > 0 such that Br(p) ⊂ E.
(c) K is called aclosed subset of Rn if Kc = {x ∈ Rn | x /∈ K} is an open subset of Rn. (d) Let E be a subset of Rn. A point p ∈ E is called an interior point of E if
there is a r > 0 such that Br(p) ⊂ E.
(e) Let E be a subset of Rn. A point p (not necessarily in E) is calleda boundary point of E if for each r > 0 we have Br(p) ∩ E 6= ∅ and Br(p) ∩ Ec6= ∅.
(f) Given a subset E ⊂ Rn, let Eo denote the set of interior points of E.
(g) Given a subset E ⊂ Rn, let ∂E denote the set of boundary points of E.
(h) Given a subset E ⊂ Rn, let ¯E = E ∪ ∂E denote the closure of E.
Remarks
(a) For each p ∈ E, either
(i) there is a r > 0 such that Br(p) ⊂ E then p is an interior point of E.
or
(ii) there exists no such r > 0 such that Br(p) ⊂ E, i.e.
for each r > 0, Br(p) 6⊂ E ⇐⇒ Br(p) ∩ Ec 6= ∅.
Since p ∈ E, we also have
p ∈ Br(p) ∩ E 6= ∅.
Hence, if p ∈ E then p is either an interior point or a boundary point of E.
(b) Eo is an open subset of Rn, i.e. the set of interior points of E is an open subset of Rn. (c) ¯E = E ∪ ∂E is a closed subset of Rn, i.e. the closure of E is a closed subset of Rn.
Definition Let f have domain E in Rn and range in R, and let p be an interior point of E. We say that f iscontinuous at p if
x→plimf (x) = f (p).
Equivalently, we say that f is continuous at p if
∀ > 0 ∃ δ() > 0 such that if x ∈ E and kx − pk ≤ δ(), then |f (x) − f (p)| < , or
∀ > 0 ∃ δ() > 0 such that f (Bδ()(p)) ⊂ B(f (p)).
Definition Let f have domain E in Rn and range in R, and let p be an interior point of E. For each 1 ≤ i ≤ n, the partial derivative of f with respect to xi, denoted fxi = ∂f
∂xi, is said to exist at p if
h→0lim
f (p1, . . . , pi−1,pi+ h, pi+1, . . . , pn) − f (p1, . . . , pi−1,pi, pi+1, . . . , pn)
h exists.
Remark Note that if fxi(p) exists for all i = 1, . . . , n, then f is continuous at p.
Definition Let f have domain E in Rn and range in R, and let p be an interior point of E. We say that f is differentiable at p if for every > 0 there exist a δ() > 0 and a linear function L: Rn→ R such that if x ∈ Rn is any vector satisfying kx − pk ≤ δ(), then x ∈ E and
|f (x) − f (p) − L(x − p)| ≤ kx − pk.
Equivalently, we say that f is differentiable at p if there exists an 1 × n matrix L : Rn→ R such that
x→plim
|f (x) − f (p) − L(x − p)|
kx − pk = lim
kx−pk→0
|f (x) − f (p) − L(x − p)|
kx − pk = 0.
A function g : E → R is said to be of the lower order magnitude than kx − pk, denoted g(x) = o(kx − pk) and read g(x) is of the little o of kx − pk, if
x→plim
|g(x)|
kx − pk = 0.
In terms of the vanishing order, f is differentiable at p if
f (x) − f (p) − L(x − p) = o(kx − pk).
Remarks
(a) Note that if f is differentaible at p, then the partial derivatives fxi(p) exists for all i = 1, . . . , n.
Proof Since f is differentiable at p, there exists an 1 × n matrix L : Rn→ R such that
x→plim
|f (x) − f (p) − L(x − p)|
kx − pk = 0.
For each 1 ≤ i ≤ n, by setting x = p + h ei, where ei is the unit vector in the positive xi coordinate, we have
kx − pk = kh eik = |h| =⇒x → p ⇐⇒ h → 0,
and
0 = lim
x→p
|f (x) − f (p) − L(x − p)|
kx − pk
= lim
h→0
|f (p + h ei) − f (p) − L(h ei)|
|h|
= lim
h→0
f (p + h ei) − f (p) − h L(ei) h
since L is linear
= lim
h→0
f (p + h ei) − f (p)
h − L(ei)
=
h→0lim
f (p + h ei) − f (p)
h − L(ei)
Hence
fxi(p) = ∂f
∂xi
(p) = lim
h→0
f (p + h ei) − f (p)
h = L(ei) exists for each 1 ≤ i ≤ n.
(b) If L1, L2 are linear functions such that f (x) − f (p) − L1(x − p) = o(kx − pk) and f (x) − f (p) − L2(x − p) = o(kx − pk), then L1 = L2.
Proof Observe that
x → p ⇐⇒ t → 0
and if L : Rn→ R is an 1 × n matrix and let ei denote the 1 × n unit vector in the positive i−th coordinate of Rn then
L(ei) = hL , eii = the i-th entry of L.
Since
0 ≤ lim
x→p
| L1− L2(x − p)|
kx − pk
= lim
x→p
|f (x) − f (p) − L2(x − p) − f (x) − f (p) − L1(x − p)|
kx − pk
≤ lim
x→p
|f (x) − f (p) − L2(x − p)|
kx − pk + lim
x→p
|f (x) − f (p) − L1(x − p)|
kx − p|
= 0,
we get L1 = L2 by taking x − p = tei and the fact that 0 = lim
t→0
| L1− L2(tei)|
kteik = | L1− L2(ei)|
which implies that the i-th entry of L1 is equal to the i-th entry of L2.
(c) If L exists at p ∈ E, i.e if f is differentiable at p, then L = Df (p), by part (b), is called the derivative of f at p. Note that the linear function Df (p) : Rn → R is defined by
Df (p)(x − p) = ∂f
∂x1(p), ∂f
∂x2(p), · · · , ∂f
∂xn(p)
, (x1− p1, x2− p2, · · · , xn− pn)
(d) When m = n = 1, f is differentiable at p ∈ (a, b) ⊂ R if there exists L ∈ R such that
x→plim
|f (x) − f (p) − L(x − p)|
|x − p| = lim
x→p
f (x) − f (p) − L(x − p) x − p
= 0
⇐⇒ lim
x→p
f (x) − f (p) − L(x − p)
x − p = 0
⇐⇒ lim
x→p
f (x) − f (p) x − p = L, and the deirivative of f at p is defined to be f0(p) = L.
Mean Value Theorem Let f be defined on an open subset E of Rn and have values in R.
Suppose that E contains the points a, b and the line segement S joining them, and that f is differentiable at every point of S. Then there exists a point c ∈ S such that
f (b) − f (a) = Df (c)(b − a).
Proof Let φ : R → Rn be defined by
φ(t) = (1 − t)a + tb = a + t(b − a) for t ∈ R,
so that φ(0) = a, φ(1) = b, and φ(t) ∈ S ( E for t ∈ [0, 1]. Since E is open and φ is continuous, differentiable on an open interval containing [0, 1], say [0, 1] ( (−γ, 1 + γ) for some γ > 0. Let F : (−γ, 1 + γ) → R be defined by
F (t) = f ◦ φ(t) = f (1 − t)a + tb.
Since F is continuous on [0, 1], differentiable on (0, 1), by the Mean Value Theoremand the Chain Rule, there exists 0 < s < 1 such that
F (1) − F (0) = F0(s)(1 − 0) = Df ((1 − s)a + sb)φ0(s) = Df (c)(b − a), where c = φ(s) = (1 − s)a + sb ∈ S.
Theorem Let f be defined on an open subset E of Rn and have values in R. Suppose that the partial derivatives fxi, i = 1, . . . , n, exist in a neiborhood of p ∈ E and are continuous at p, then f is differentiable at p.
Example Let f : R2 → R be defined by
f (x, y) =
x3− y3
x2+ y2 if (x, y) 6= (0, 0) 0 if (x, y) = (0, 0).
Then
fx(x, y) =
x4+ 3x2y2+ 2x y3
x2+ y22 if (x, y) 6= (0, 0)
1 if (x, y) = (0, 0),
and
fy(x, y) =
−y4+ 3y2x2+ 2y x3
x2 + y22 if (x, y) 6= (0, 0)
−1 if (x, y) = (0, 0).
Note that fx, fy are not continuous at (0, 0).
Also since lim
(x,y)→(0,0)
|f (x, y) − f (0, 0) − h(1, −1) , (x, y)i|
k(x, y)k = lim
(x,y)→(0,0)
|x3 − y3− (x − y)(x2+ y2)|
x2+ y23/2
= lim
(x,y)→(0,0)
|x2y − x y2| x2+ y23/2
By setting y = −x → 0 in the limit we get lim
(x,y)→(0,0)
|x2y − x y2|
x2+ y23/2 = lim
(x,−x)→(0,0)
| − x2x − x x2| x2+ x23/2 = 1
√2 6= 0.
Hence f is not differentiable at (0, 0).
Lemma Suppose that f is defined on an open ball Br(o) of o = (0, 0) ∈ R2 with values in R, that the partial derivatives Dxf = ∂f
∂x = fx and Dyf = ∂f
∂y = fy exist in Br(o), and that Dyxf = ∂2f
∂y∂x = fxy is continuous at (0, 0). Let A : Br(0) → R be defined by A(h, k) = f (h, k) − f (h, 0) − f (0, k) + f (0, 0) for (h, k) ∈ Br(o).
Then
fxy(0, 0) = Dyxf (0, 0) = lim
(h,k)→(0,0)
A(h, k) hk .
Proof Given > 0, since Br(o) is open and Dyxf is continuous at (0, 0), there exists a δ > 0 such that
if |h| < δ and |k| < δ then (h, k) ∈ Br(o) and |Dyxf (h, k) − Dyxf (0, 0)| < .
For each |k| < δ and |h| < δ, we define the map G : (−h, h) → R by
G(h) = f (h, k) − f (h, 0) for each |h| < δ =⇒ A(h, k) = G(h) − G(0).
By hypothesis, Dxf exists in Br(o) and hence G is differentiable on |h| < δ.
By the Mean Value Theorem, there exists h0 with 0 < |h0| < |h| such that A(h, k) = G(h) − G(0) = h G0(h0) = hDxf (h0, k) − Dxf (h0, 0).
Using the Mean Value Theorem again, there exists k0 with 0 < |k0| < |k| such that Dxf (h0, k) − Dxf (h0, 0) = k Dyxf (h0, k0) =⇒ A(h, k) = h k Dyxf (h0, k0)
for all 0 < |h| < δ and 0 < |h| < δ.
This completes the proof of
fxy(0, 0) = Dyxf (0, 0) = lim
(h,k)→(0,0)
A(h, k) hk .
Theorem Suppose that f is defined on an open ball Br(p) of p = (a, b) ∈ R2 with values in R, that the partial derivatives Dxf = ∂f
∂x = fx, Dyf = ∂f
∂y = fy and Dyxf = ∂2f
∂y∂x = fxy exist in Br(p), and that Dyxf = ∂2f
∂y∂x = fxy is continuous at p = (a, b). Then the partial derivative Dxyf = ∂2f
∂x∂y = fyx exists at p = (a, b) and
Dxyf (a, b) = Dyxf (a, b).
Proof Let
A(h, k) = f (a + h, b + k) − f (a + h, b) − f (a, b + k) + f (a, b) for (h, k) ∈ Br(o).
Using the Lemma, we have
Dyxf (a, b) = lim
(h,k)→(0,0)
A(h, k) hk . By the hypothesis, Dyf exists in Br(p) such that
lim
k→0
A(h, k)
hk = 1
h
lim
k→0
f (a + h, b + k) − f (a + h, b)
k − lim
k→0
f (a, b + k) − f (a, b) k
∀ 0 < |h| < r
= 1
h [Dyf (a + h, b) − Dyf (a, b)] ∀ 0 < |h| < r Given > 0, since Dyxf (a, b) = lim
(h,k)→(0,0)
A(h, k)
hk there exists a δ > 0 such that if 0 < |h| < δ and 0 < |k| < δ then
A(h, k)
hk − Dyxf (a, b)
< .
By taking the limit with respect to k → 0, we obtain
1
h [Dyf (a + h, b) − Dyf (a, b)] − Dyxf (a, b)
=
lim
k→0
A(h, k)
hk − Dyxf (a, b)
≤ for all h satisfying 0 < |h| < δ.
By letting h → 0, we get
|Dxyf (a, b) − Dyxf (a, b)| =
h→0lim
Dyf (a + h, b) − Dyf (a, b)
h − Dyxf (a, b)
≤ ∀ > 0.
Therefore, Dxyf (a, b) exists and equals Dyxf (a, b).
Remark Let E be an open subset of Rn and let Ck(E) denote the space of functions on E with continuous partial derivatives of orders up to k.
Example Let f : R2 → R be defined by
f (x, y) =
xy(x2− y2)
x2+ y2 if (x, y) 6= (0, 0) 0 if (x, y) = (0, 0).
Then
fx(x, y) =
3x2y − y3
x2 + y2 − 2x2y(x2− y2)
(x2+ y2)2 if (x, y) 6= (0, 0)
0 if (x, y) = (0, 0),
and
fy(x, y) =
x3− 3xy2
x2+ y2 −2xy2(x2− y2)
(x2+ y2)2 if (x, y) 6= (0, 0)
0 if (x, y) = (0, 0).
Direct computation shows that fx, fy are continuous on R2, the second partial derivatives fxy, fyx
exist on R2, yet
Dxyf (0, 0) = fyx(0, 0) = 1 6= −1 = fxy(0, 0) = Dyxf (0, 0), and
lim
(x,y)→(0,0)fyx(x, y) 6= 1 = fyx(0, 0) lim
(x,y)→(0,0)fxy(x, y) 6= −1 = fxy(0, 0).
Definition Let f have domain E in Rn and range in Rm, and let p be an interior point of E.
We say that f is differentiable at p if there exists a linear function L : Rn → Rm such that for every > 0 there exists δ() > 0 such that if x ∈ Rn is any vector satisfying kx − pk ≤ δ(), then x ∈ E and
kf (x) − f (p) − L(x − p)k ≤ kx − pk.
Equivalently, we say that f is differentiable at p if there exists an m × n matrix L : Rn → Rm such that
x→plim
kf (x) − f (p) − L(x − p)k
kx − pk = lim
kx−pk→0
kf (x) − f (p) − L(x − p)k
kx − pk = 0,
i.e., the function f (x) − f (p) − L(x − p) = o(kx − pk), or we say that f (x) − f (p) − L(x − p) is of a little o of kx − pk.
Chain Rule Let f have domain A ⊆ Rn and range in Rm, let g have domain B ⊆ Rm and range in Rk. Suppose that f is differentiable at p ∈ A and g is differentiable at q = f (p). Then the composition h = g ◦ f is differentiable at p and
Dh(p) = Dg(q) ◦ Df (p),
where the linear transformations Df (p) : Rn → Rm, Dg(q) : Rm → Rk and Dh(p) : Rn → Rk are differential maps of f, g and h = g ◦ f, respectively. Alternately, we write
D(g ◦ f )(p) = Dg(f (p)) ◦ Df (p).
In practice, one can represent Df (p), Dg(q) and Dh(p) as m × n, n × k and m × k matrices, respectively and the composition operation ◦ between differentials as matrix multiplication.
Definition Let E ⊆ Rn, let f : E → R be differentiable on E and let p be an interior point of E. If u is a unit vector in Rn, the directional derivative of f at p in the direction of u, denoted by Duf (p), is defined to be
Duf (p) = lim
t→0
f (p + tu) − f (p)
t .
Remark Since p is an interior point of E, there exists > 0 such that the map r : (−, ) → E defined by
r(t) = p + tu for t ∈ (−, ) satisfies that
r(t) ∈ E for all t ∈ (−, ).
Since f is differentiable at p, the gradient vector ∇f (p) = (fx1(p), . . . , fxn(p)) exists and saisfies that
0 = lim
t→0
|f (p + tu) − f (p) − h∇f (p) , (p + tu − p)i|
kp + tu − pk
= lim
t→0
|f (p + tu) − f (p) − th∇f (p) , ui|
|t|
=
limt→0
f (p + tu) − f (p)
t − h∇f (p) , ui
= |Duf (p) − h∇f (p) , ui|
Thus we have
Duf (p) = h∇f (p) , ui = k∇f (p)k cos θ,
where θ is the angle between ∇f (p) and the direction u. This imples that if ∇f (p) 6= 0, then f increases most rapidly when u = ∇f (p)
k∇f (p)k, i.e. θ = 0, and decreases most rapidly when u = − ∇f (p)
k∇f (p)k, i.e. θ = π.
Second Derivatives Test Let Br(p) be an open ball of radius r with center p = (a, b) ∈ R2. Suppose that f : Br(p) → R has continuous partial derivatives up to the 2nd order, i.e. f, fx, fy, fxx, fxy = fyx and fyy are continuous on Br(p), and suppose that fx(p) = 0 and fy(p) = 0, i.e. p is a critical point of f. Let
D =
fxx(p) fxy(p) fyx(p) fyy(p)
= fxx(p)fyy(p) − fxy2 (p).
(a) If D > 0 and fxx(p) > 0, then f (p) is a local minimum.
(b) If D > 0 and fxx(p) < 0, then f (p) is a local maximum.
(c) If D < 0 and fxx(p) > 0, then f (p) is not a local maximum or minimum.
Remarks
(a) Note that the characteristic equation 0 =
fxx(p) − λ fxy(p) fyx(p) fyy(p) − λ
= λ2− fxx(p) + fyy(p)λ + fxx(p)fyy(p) − fxy2 (p) implies that
fxx(p) + fyy(p) = the sum of eigenvalues
fxx(p)fyy(p) − fxy2 (p) = the product of eigenvalues.
(b) If D = fxx(p)fyy(p) − fxy2 (p) > 0 then fxx(p)fyy(p) > fxy2 (p) ≥ 0 and both eigenvalues have the same sign as fxx(p) or fyy(p).