Total Differential. Gradient. Linearization in N Variables. Part 2
Almaz Khusnutdinov•Math enthusiast, love coding and mathematics
Published 10/3/2025
Gradient Vector. Linear Approximation for N-variables
Proof Based Problems
Problem 1.1
Let f:Rn→Rm.(a) Give the Freˊchet definition of differentiability at a∈Rn.(b) Prove uniqueness of the derivative.(c) Show that if all partial derivatives of f exist in a neighborhood of a and are continuous at a,then f is Freˊchet differentiable at a and Df(a) is the Jacobian at a.Answer and detailed explanation: (a) Definition. f is Freˊchet differentiable at a if there exists a linear map L:Rn→Rmsuch that h→0lim∥h∥∥f(a+h)−f(a)−Lh∥=0.This L is denoted Df(a).(b) Uniqueness. Suppose L1,L2 both satisfy the definition. For h=0,∥h∥∥(L1−L2)h∥≤∥h∥∥f(a+h)−f(a)−L1h∥+∥h∥∥f(a+h)−f(a)−L2h∥h→00.Thus ∥(L1−L2)h∥=o(∥h∥).Setting h=tv(t→0,∥v∥=1) gives ∥(L1−L2)v∥=o(1)→0.Hence (L1−L2)v=0∀v,so L1=L2.(c) Continuity of partials ⇒ Freˊchet differentiability.Write f=(f(1),…,f(m)).Fix a and h=(h1,…,hn).Define the chain a(0)=a,a(k)=a+(h1,…,hk,0,…,0).For each component f(j), apply the 1D mean value theorem along the k-th coordinate segment:f(j)(a(k))−f(j)(a(k−1))=∂xkf(j)(ξk(j))hk,ξk(j)lies on [a(k−1),a(k)].Summing over k yields f(j)(a+h)−f(j)(a)=k=1∑n∂xkf(j)(a)hk+k=1∑n(∂xkf(j)(ξk(j))−∂xkf(j)(a))hk.Let J∈Rm×n be the Jacobian at a,Jjk=∂xkf(j)(a),and set Lh:=Jh.Vector form: f(a+h)−f(a)=Lh+R(h),R(h):=(k∑δk(1)hk,…,k∑δk(m)hk),with δk(j)=∂xkf(j)(ξk(j))−∂xkf(j)(a).Continuity of all partials at a gives δk(j)→0as h→0.Hence ∥R(h)∥≤j,k∑∣δk(j)∣∣hk∣.Normalize: ∥h∥∥R(h)∥≤j,k∑∣δk(j)∣∥h∥∣hk∣≤j,k∑∣δk(j)∣h→00.Therefore h→0lim∥h∥∥f(a+h)−f(a)−Lh∥=0,so f is Freˊchet differentiable at a with Df(a)=L=J.
Problem 1.2
Let f:Rn→R have all partial derivatives continuous at a=(a1,…,an).Set h=(h1,…,hn),a+h=(a1+h1,…,an+hn),Δf:=f(a+h)−f(a).Prove f is differentiable at a and Δf=i=1∑nfxi(a)hi+o(∥h∥).Answer (outline with detailed explanation): Write a coordinatewise telescoping sum Δf=i=1∑n[f(a(i))−f(a(i−1))],where a(0)=a,a(i)=(a1+h1,…,ai+hi,ai+1,…,an).Each bracket is a one-variable change with other variables frozen:f(a(i))−f(a(i−1))=fxi(ξi)hi,for some ξion the segment between a(i−1) and a(i).⇒Δf=i=1∑nfxi(ξi)hi=i=1∑nfxi(a)hi+i=1∑n(fxi(ξi)−fxi(a))hi.Continuity of fxi at a gives fxi(ξi)→fxi(a)as h→0.Normalize and bound: ∥h∥∣Δf−∑fxi(a)hi∣≤i=1∑n∣fxi(ξi)−fxi(a)∣∥h∥∣hi∣≤i=1∑n∣fxi(ξi)−fxi(a)∣→0.Hence Δf=i=1∑nfxi(a)hi+o(∥h∥),so dz=i=1∑nfxi(a)dxi.
Problem 1.3
Let g:Rm→Rn be differentiable at a,f:Rn→R be differentiable at g(a).Prove that f∘g is differentiable at a and D(f∘g)(a)=Df(g(a))∘Dg(a).Answer (outline): Write g(a+k)=g(a)+Dg(a)[k]+ρ(k),∥k∥∥ρ(k)∥→0.Then f(g(a+k))=f(g(a)+Dg(a)[k]+ρ(k))=f(g(a))+Df(g(a))[Dg(a)[k]+ρ(k)]+r(k),with ∥Dg(a)[k]+ρ(k)∥∣r(k)∣→0.Hence f∘g(a+k)−f∘g(a)=(Df(g(a))∘Dg(a))[k]+o(∥k∥)Df(g(a))[ρ(k)]+r(k).Therefore D(f∘g)(a)=Df(g(a))∘Dg(a).
Problem 1.4
Let f:Rn→R be differentiable at a with differential Df(a).For any unit vector u∈Rn,prove the directional derivative exists and Duf(a)=∇f(a)⋅u.Answer (outline): Set h=tu,t→0.f(a+tu)−f(a)=Df(a)[tu]+r(t),∣t∣r(t)→0.Divide by t:tf(a+tu)−f(a)=Df(a)[u]+tr(t).Limit t→0 gives Duf(a)=Df(a)[u]=∇f(a)⋅u.
Problem 1.5
Let f:Rn→R,f(x)=∥x∥2=i=1∑nxi2.Prove that f is Freˊchet differentiable at every a∈Rn,find Df(a)[h] and the linearization Ta(x).Detailed explanation: f(a+h)−f(a)=∥a+h∥2−∥a∥2=2a⋅h+∥h∥2.Set Lh:=2a⋅h.Then ∥h∥∣f(a+h)−f(a)−Lh∣=∥h∥∥h∥2=∥h∥→0.Hence Df(a)=L,Df(a)[h]=2a⋅h,Ta(x)=f(a)+Df(a)[x−a]=∥a∥2+2a⋅(x−a).Answer: Df(a)[h]=2a⋅h,Ta(x)=∥a∥2+2a⋅(x−a).
Problem 1.6
Let f:Rn→Rbe differentiable at a.Show that the Freˊchet derivative is unique.Answer (outline): Assume L1,L2 both satisfy ∥f(a+h)−f(a)−Lih∥/∥h∥→0.Then ∥(L1−L2)h∥/∥h∥≤i=1∑2∥f(a+h)−f(a)−Lih∥/∥h∥→0.Fix unit v and set h=tv:∥(L1−L2)v∥=t→0lim∥(L1−L2)tv∥/∣t∣=0⇒L1=L2.
Problem 1.7
Let g:Rn→Rm be Freˊchet differentiable at a,f:Rm→Rp be Freˊchet differentiable at g(a).Prove rigorously that f∘g is Freˊchet differentiable at a and D(f∘g)(a)=Df(g(a))Dg(a).Answer (outline):Write g(a+h)=g(a)+Lh+ρ(h),L:=Dg(a),∥ρ(h)∥/∥h∥→0.Write f(y+k)=f(y)+Mk+ry(k),M:=Df(y),∥ry(k)∥/∥k∥→0,with y=g(a).Set k=Lh+ρ(h).Then f(g(a+h))−f(g(a))=f(y+k)−f(y)=M(Lh+ρ(h))+ry(Lh+ρ(h)).Thus f∘g(a+h)−f∘g(a)=Df(g(a))Dg(a)[h](ML)h+=:R(h)Mρ(h)+ry(Lh+ρ(h)).Estimate the remainder:∥h∥∥Mρ(h)∥≤∥M∥∥h∥∥ρ(h)∥h→00,∥h∥∥ry(Lh+ρ(h))∥=∥Lh+ρ(h)∥∥ry(⋅)∥⋅∥h∥∥Lh+ρ(h)∥h→00.Hence h→0lim∥h∥∥R(h)∥=0,so f∘g is Freˊchet differentiable at a with D(f∘g)(a)=Df(g(a))Dg(a).
Problem 1.8
Let f:Rn→R,f(x)=∥Mx∥2=x⊤M⊤Mx,where M∈Rk×n is fixed.Prove that f is Freˊchet differentiable at every a∈Rn,find Df(a)[h] and the linearization Ta(x).Detailed explanation: f(a+h)−f(a)=∥M(a+h)∥2−∥Ma∥2=2(Ma)⋅(Mh)+∥Mh∥2.Set Lh:=2(M⊤Ma)⋅h.Then ∥h∥∣f(a+h)−f(a)−Lh∣=∥h∥∥Mh∥2≤∥M∥2∥h∥→0.Hence Df(a)=L,Df(a)[h]=2(M⊤Ma)⋅h,Ta(x)=f(a)+Df(a)[x−a]=∥Ma∥2+2(M⊤Ma)⋅(x−a).Answer: Df(a)[h]=2(M⊤Ma)⋅h,Ta(x)=∥Ma∥2+2(M⊤Ma)⋅(x−a).
Problem 1.9
Let f:Rn→R,f(x)=i=1∑nwixi2with fixed wi∈R.Prove f is Freˊchet differentiable at every a∈Rn,find Df(a)[h] and Ta(x).Answer: Df(a)[h]=2i=1∑nwiaihi,Ta(x)=f(a)+i=1∑n2wiai(xi−ai).
Problem 1.10
Let f:Rn→R,f(x)=∥x∥2+b⋅xwith fixed b∈Rn.Prove f is Freˊchet differentiable at every a∈Rn,find Df(a)[h] and Ta(x).Answer: Df(a)[h]=(2a+b)⋅h,Ta(x)=∥a∥2+b⋅a+(2a+b)⋅(x−a).
Let g:R2→R2,g(x,y)=(excosy,exsiny),f(u,v)=u2+v2.Compute D(f∘g)(a)[h]for arbitrary a=(a1,a2),h=(h1,h2).Answer: (f∘g)(x,y)=e2x⇒∇(f∘g)(a)=(2e2a1,0),D(f∘g)(a)[h]=2e2a1h1.
Problem 2.3
Let f:R3→R,f(x)=ln(1+x1+2x2+3x3).At a=0,find the directional derivative along u=6(1,−1,2).Answer: ∇f(0)=(1,2,3)⇒Duf(0)=∇f(0)⋅u=61−2+6=65.
Problem 2.4
Let g:R2→R3,g(x,y)=(xey,y2,sinx),f:R3→R,f(u,v,w)=u2+vw.Compute D(f∘g)(a)[h]for arbitrary a=(a1,a2),h=(h1,h2).Answer: D(f∘g)(a)[h]=(2a1e2a2+a22cosa1)h1+(2a12e2a2+2a2sina1)h2.
Problem 2.5
Let g:R2→R2,g(x,y)=(x+y,ex−y),f(u,v)=vu.Compute D(f∘g)(a)[h]for arbitrary a=(a1,a2),h=(h1,h2).Answer: D(f∘g)(a)[h]=e−(a1−a2)((1−(a1+a2))h1+(1+(a1+a2))h2).
Problem 2.6
Let g:R2→R2,g(r,θ)=(rcosθ,rsinθ),f(u,v)=(u2−v2,2uv).Find the Jacobian Jf∘g(r,θ).Answer: Jf∘g(r,θ)=[2rcos2θ2rsin2θ−2r2sin2θ2r2cos2θ].
Problem 2.7
Let g:Rn→Rn,g(x)=Ax+b,A∈Rn×n,b∈Rn,c∈Rn.Let f:Rn→R,f(u)=φ(c⋅u)with φ∈C1.Compute D(f∘g)(a)[h]for arbitrary a,h∈Rn.Answer: D(f∘g)(a)[h]=φ′(c⋅(Aa+b))(c⋅Ah).
Problem 2.8
Let g:R2→R3,g(x,y)=(x2,y2,xy),f:R3→R,f(u,v,w)=uv+ew.Compute D(f∘g)(a)[h]for arbitrary a=(a1,a2),h=(h1,h2).Answer: D(f∘g)(a)[h]=(2a1a22+a2ea1a2)h1+(2a2a12+a1ea1a2)h2.
Problem 2.9
Let g:R3→R2,g(x,y,z)=(ln(1+x+y),zex),f:R2→R,f(u,v)=u3+sinv.Find the total differential d(f∘g) at a=(a1,a2,a3) applied to h=(h1,h2,h3).Answer: d(f∘g)a[h]=3(1+a1+a2h1+h2)(ln(1+a1+a2))2+cos(a3ea1)(a3ea1h1+ea1h3).