Let f : D ⊆ R n → R f : D \subseteq \mathbb{R}^n \to \mathbb{R} f : D ⊆ R n → R . The partial derivative of f f f with respect to x i x_i x i at a = ( a 1 , … , a n ) \mathbf{a} = (a_1, \ldots, a_n) a = ( a 1 , … , a n ) is
∂ f ∂ x i ( a ) = lim h → 0 f ( a 1 , … , a i + h , … , a n ) − f ( a 1 , … , a n ) h \frac{\partial f}{\partial x_i}(\mathbf{a}) = \lim_{h \to 0} \frac{f(a_1, \ldots, a_i + h, \ldots, a_n) - f(a_1, \ldots, a_n)}{h} ∂ x i ∂ f ( a ) = lim h → 0 h f ( a 1 , … , a i + h , … , a n ) − f ( a 1 , … , a n )
Provided the limit exists. This is the rate of change of f f f in the direction of the x i x_i x i -axis, Holding all other variables fixed.
Notation. Common notations for the partial derivative with respect to x i x_i x i include f x i f_{x_i} f x i , ∂ i f \partial_i f ∂ i f And ∂ f ∂ x i \frac{\partial f}{\partial x_i} ∂ x i ∂ f . We use these interchangeably.
Theorem 1.1 (Clairaut’s Theorem / Schwarz’s Theorem). If f x y f_{xy} f x y and f y x f_{yx} f y x are continuous on an Open set containing ( a , b ) (a, b) ( a , b ) Then
∂ 2 f ∂ x ∂ y ( a , b ) = ∂ 2 f ∂ y ∂ x ( a , b ) \frac{\partial^2 f}{\partial x \partial y}(a,b) = \frac{\partial^2 f}{\partial y \partial x}(a,b) ∂ x ∂ y ∂ 2 f ( a , b ) = ∂ y ∂ x ∂ 2 f ( a , b )
Proof. Define the second-order difference function
Δ ( h , k ) = f ( a + h , b + k ) − f ( a + h , b ) − f ( a , b + k ) + f ( a , b ) \Delta(h, k) = f(a+h,\, b+k) - f(a+h,\, b) - f(a,\, b+k) + f(a, b) Δ ( h , k ) = f ( a + h , b + k ) − f ( a + h , b ) − f ( a , b + k ) + f ( a , b )
For h , k ≠ 0 h, k \neq 0 h , k = 0 . Define ϕ ( s ) = f ( s , b + k ) − f ( s , b ) \phi(s) = f(s, b+k) - f(s, b) ϕ ( s ) = f ( s , b + k ) − f ( s , b ) . Then Δ ( h , k ) = ϕ ( a + h ) − ϕ ( a ) \Delta(h,k) = \phi(a+h) - \phi(a) Δ ( h , k ) = ϕ ( a + h ) − ϕ ( a ) . By the Mean Value Theorem, there exists θ 1 ∈ ( 0 , 1 ) \theta_1 \in (0, 1) θ 1 ∈ ( 0 , 1 ) such that
Δ ( h , k ) = h ⋅ ϕ ′ ( a + θ 1 h ) = h [ f x ( a + θ 1 h , b + k ) − f x ( a + θ 1 h , b ) ] \Delta(h, k) = h \cdot \phi'(a + \theta_1 h) = h \left[f_x(a + \theta_1 h,\, b+k) - f_x(a + \theta_1 h,\, b)\right] Δ ( h , k ) = h ⋅ ϕ ′ ( a + θ 1 h ) = h [ f x ( a + θ 1 h , b + k ) − f x ( a + θ 1 h , b ) ]
Apply the Mean Value Theorem again to the function g ( t ) = f x ( a + θ 1 h , t ) g(t) = f_x(a + \theta_1 h,\, t) g ( t ) = f x ( a + θ 1 h , t ) on [ b , b + k ] [b, b+k] [ b , b + k ] . There exists θ 2 ∈ ( 0 , 1 ) \theta_2 \in (0, 1) θ 2 ∈ ( 0 , 1 ) such that
Δ ( h , k ) = h k ⋅ f x y ( a + θ 1 h , b + θ 2 k ) \Delta(h, k) = hk \cdot f_{xy}(a + \theta_1 h,\, b + \theta_2 k) Δ ( h , k ) = hk ⋅ f x y ( a + θ 1 h , b + θ 2 k )
Similarly, by reversing the order of application, there exist θ 3 , θ 4 ∈ ( 0 , 1 ) \theta_3, \theta_4 \in (0,1) θ 3 , θ 4 ∈ ( 0 , 1 ) such That
Δ ( h , k ) = h k ⋅ f y x ( a + θ 3 h , b + θ 4 k ) \Delta(h, k) = hk \cdot f_{yx}(a + \theta_3 h,\, b + \theta_4 k) Δ ( h , k ) = hk ⋅ f y x ( a + θ 3 h , b + θ 4 k )
For h , k ≠ 0 h, k \neq 0 h , k = 0 we have
f x y ( a + θ 1 h , b + θ 2 k ) = f y x ( a + θ 3 h , b + θ 4 k ) f_{xy}(a + \theta_1 h,\, b + \theta_2 k) = f_{yx}(a + \theta_3 h,\, b + \theta_4 k) f x y ( a + θ 1 h , b + θ 2 k ) = f y x ( a + θ 3 h , b + θ 4 k )
Taking the limit as ( h , k ) → ( 0 , 0 ) (h, k) \to (0, 0) ( h , k ) → ( 0 , 0 ) and using continuity of f x y f_{xy} f x y and f y x f_{yx} f y x We obtain f x y ( a , b ) = f y x ( a , b ) f_{xy}(a, b) = f_{yx}(a, b) f x y ( a , b ) = f y x ( a , b ) . ■ \blacksquare ■
Intuition. Clairaut’s theorem tells us that, under a mild regularity condition (continuity of the Mixed second partials), the order in which we differentiate does not matter. Without this Condition, the mixed partials may differ.
Definition. f : D ⊆ R n → R f : D \subseteq \mathbb{R}^n \to \mathbb{R} f : D ⊆ R n → R is differentiable at a \mathbf{a} a if There exists a linear map L : R n → R L : \mathbb{R}^n \to \mathbb{R} L : R n → R such that
lim h → 0 f ( a + h ) − f ( a ) − L ( h ) ∥ h ∥ = 0 \lim_{\mathbf{h} \to \mathbf{0}} \frac{f(\mathbf{a} + \mathbf{h}) - f(\mathbf{a}) - L(\mathbf{h})}{\lVert \mathbf{h} \rVert} = 0 lim h → 0 ∥ h ∥ f ( a + h ) − f ( a ) − L ( h ) = 0
When f f f is differentiable at a \mathbf{a} a The linear map L L L is given by the gradient.
Remark. Existence of all partial derivatives at a point does not imply differentiability at That point. The canonical counterexample is
f ( x , y ) = { x y x 2 + y 2 i f ( x , y ) ≠ ( 0 , 0 ) , 0 i f ( x , y ) = ( 0 , 0 ) . f(x,y) = \begin{cases} \dfrac{xy}{x^2 + y^2} & \mathrm{if\ }(x,y) \neq (0,0), \\ 0 & \mathrm{if\ }(x,y) = (0,0). \end{cases} f ( x , y ) = ⎩ ⎨ ⎧ x 2 + y 2 x y 0 if ( x , y ) = ( 0 , 0 ) , if ( x , y ) = ( 0 , 0 ) .
Both f x ( 0 , 0 ) f_x(0,0) f x ( 0 , 0 ) and f y ( 0 , 0 ) f_y(0,0) f y ( 0 , 0 ) exist (and equal 0 0 0 ), yet f f f is not even continuous at the origin, Hence not differentiable.
The gradient of f f f at a \mathbf{a} a is
∇ f ( a ) = ( ∂ f ∂ x 1 ( a ) , … , ∂ f ∂ x n ( a ) ) \nabla f(\mathbf{a}) = \left(\frac{\partial f}{\partial x_1}(\mathbf{a}), \ldots, \frac{\partial f}{\partial x_n}(\mathbf{a})\right) ∇ f ( a ) = ( ∂ x 1 ∂ f ( a ) , … , ∂ x n ∂ f ( a ) )
The linear approximation of f f f near a \mathbf{a} a is
f ( a + h ) ≈ f ( a ) + ∇ f ( a ) ⋅ h f(\mathbf{a} + \mathbf{h}) \approx f(\mathbf{a}) + \nabla f(\mathbf{a}) \cdot \mathbf{h} f ( a + h ) ≈ f ( a ) + ∇ f ( a ) ⋅ h
Theorem 1.2. If all partial derivatives of f f f exist and are continuous in a neighbourhood of a \mathbf{a} a Then f f f is differentiable at a \mathbf{a} a .
Remark. Functions whose partial derivatives exist and are continuous on an open set U U U are called C 1 ( U ) C^1(U) C 1 ( U ) . Theorem 1.2 says C 1 ⟹ C^1 \implies C 1 ⟹ differentiable. The converse is false: there exist Differentiable functions whose partial derivatives are not continuous.
Proposition. If f f f is differentiable at a \mathbf{a} a Then f f f is continuous at a \mathbf{a} a .
Proof. From the definition of differentiability:
f ( a + h ) − f ( a ) = L ( h ) + ε ( h ) ∥ h ∥ f(\mathbf{a} + \mathbf{h}) - f(\mathbf{a}) = L(\mathbf{h}) + \varepsilon(\mathbf{h})\lVert \mathbf{h} \rVert f ( a + h ) − f ( a ) = L ( h ) + ε ( h ) ∥ h ∥
Where L L L is linear and ε ( h ) → 0 \varepsilon(\mathbf{h}) \to 0 ε ( h ) → 0 as h → 0 \mathbf{h} \to \mathbf{0} h → 0 . As h → 0 \mathbf{h} \to \mathbf{0} h → 0 Both terms on the right vanish, so f ( a + h ) → f ( a ) f(\mathbf{a} + \mathbf{h}) \to f(\mathbf{a}) f ( a + h ) → f ( a ) . ■ \blacksquare ■
The directional derivative of f f f at a \mathbf{a} a in the direction of a unit vector u \mathbf{u} u is
D u f ( a ) = lim h → 0 f ( a + h u ) − f ( a ) h D_{\mathbf{u}} f(\mathbf{a}) = \lim_{h \to 0} \frac{f(\mathbf{a} + h\mathbf{u}) - f(\mathbf{a})}{h} D u f ( a ) = lim h → 0 h f ( a + h u ) − f ( a )
Theorem 1.3. If f f f is differentiable at a \mathbf{a} a Then
D u f ( a ) = ∇ f ( a ) ⋅ u D_{\mathbf{u}} f(\mathbf{a}) = \nabla f(\mathbf{a}) \cdot \mathbf{u} D u f ( a ) = ∇ f ( a ) ⋅ u
Proof. Since f f f is differentiable at a \mathbf{a} a
f ( a + h u ) − f ( a ) h = ∇ f ( a ) ⋅ ( h u ) + ε ( h u ) ∥ h u ∥ h \frac{f(\mathbf{a} + h\mathbf{u}) - f(\mathbf{a})}{h} = \frac{\nabla f(\mathbf{a}) \cdot (h\mathbf{u}) + \varepsilon(h\mathbf{u}) \lVert h\mathbf{u} \rVert}{h} h f ( a + h u ) − f ( a ) = h ∇ f ( a ) ⋅ ( h u ) + ε ( h u ) ∥ h u ∥
= ∇ f ( a ) ⋅ u + ε ( h u ) ∥ u ∥ = \nabla f(\mathbf{a}) \cdot \mathbf{u} + \varepsilon(h\mathbf{u}) \lVert \mathbf{u} \rVert = ∇ f ( a ) ⋅ u + ε ( h u ) ∥ u ∥
Where ε ( h ) → 0 \varepsilon(\mathbf{h}) \to 0 ε ( h ) → 0 as h → 0 \mathbf{h} \to \mathbf{0} h → 0 . Taking h → 0 h \to 0 h → 0 gives the result. ■ \blacksquare ■
Corollary 1.4. The gradient points in the direction of steepest ascent, and ∥ ∇ f ∥ \lVert \nabla f \rVert ∥ ∇ f ∥ Is the rate of steepest ascent.
Proof. By the Cauchy—Schwarz inequality, ∣ ∇ f ⋅ u ∣ ≤ ∥ ∇ f ∥ ⋅ ∥ u ∥ = ∥ ∇ f ∥ \lvert \nabla f \cdot \mathbf{u} \rvert \leq \lVert \nabla f \rVert \cdot \lVert \mathbf{u} \rVert = \lVert \nabla f \rVert ∣ ∇ f ⋅ u ∣ ≤ ∥ ∇ f ∥ ⋅ ∥ u ∥ = ∥ ∇ f ∥ With equality when u \mathbf{u} u is parallel to ∇ f \nabla f ∇ f . ■ \blacksquare ■
Theorem 1.5 (Multivariable Chain Rule). If g : R m → R n \mathbf{g} : \mathbb{R}^m \to \mathbb{R}^n g : R m → R n is Differentiable at a \mathbf{a} a and f : R n → R f : \mathbb{R}^n \to \mathbb{R} f : R n → R is differentiable at g ( a ) \mathbf{g}(\mathbf{a}) g ( a ) Then
∇ ( f ∘ g ) ( a ) = J g ( a ) T ∇ f ( g ( a ) ) \nabla (f \circ \mathbf{g})(\mathbf{a}) = J\mathbf{g}(\mathbf{a})^T \nabla f(\mathbf{g}(\mathbf{a})) ∇ ( f ∘ g ) ( a ) = J g ( a ) T ∇ f ( g ( a ))
Where J g J\mathbf{g} J g is the Jacobian matrix of g \mathbf{g} g .
Proof. Write h ( t ) = f ( g ( a + t v ) ) h(t) = f(\mathbf{g}(\mathbf{a} + t\mathbf{v})) h ( t ) = f ( g ( a + t v )) for a fixed direction v \mathbf{v} v . Then
h ( t ) − h ( 0 ) t = f ( g ( a + t v ) ) − f ( g ( a ) ) t \frac{h(t) - h(0)}{t} = \frac{f(\mathbf{g}(\mathbf{a} + t\mathbf{v})) - f(\mathbf{g}(\mathbf{a}))}{t} t h ( t ) − h ( 0 ) = t f ( g ( a + t v )) − f ( g ( a ))
Let k = g ( a + t v ) − g ( a ) \mathbf{k} = \mathbf{g}(\mathbf{a} + t\mathbf{v}) - \mathbf{g}(\mathbf{a}) k = g ( a + t v ) − g ( a ) . By differentiability of g \mathbf{g} g k = J g ( a ) ( t v ) + o ( t ) \mathbf{k} = J\mathbf{g}(\mathbf{a})(t\mathbf{v}) + o(t) k = J g ( a ) ( t v ) + o ( t ) And k → 0 \mathbf{k} \to \mathbf{0} k → 0 as t → 0 t \to 0 t → 0 . By Differentiability of f f f :
f ( g ( a ) + k ) − f ( g ( a ) ) = ∇ f ( g ( a ) ) ⋅ k + o ( ∥ k ∥ ) f(\mathbf{g}(\mathbf{a}) + \mathbf{k}) - f(\mathbf{g}(\mathbf{a})) = \nabla f(\mathbf{g}(\mathbf{a})) \cdot \mathbf{k} + o(\lVert \mathbf{k} \rVert) f ( g ( a ) + k ) − f ( g ( a )) = ∇ f ( g ( a )) ⋅ k + o (∥ k ∥)
= ∇ f ( g ( a ) ) ⋅ [ J g ( a ) ( t v ) + o ( t ) ] + o ( t ) = \nabla f(\mathbf{g}(\mathbf{a})) \cdot [J\mathbf{g}(\mathbf{a})(t\mathbf{v}) + o(t)] + o(t) = ∇ f ( g ( a )) ⋅ [ J g ( a ) ( t v ) + o ( t )] + o ( t )
Dividing by t t t and taking t → 0 t \to 0 t → 0 :
h ′ ( 0 ) = ∇ f ( g ( a ) ) ⋅ J g ( a ) v = [ J g ( a ) T ∇ f ( g ( a ) ) ] ⋅ v h'(0) = \nabla f(\mathbf{g}(\mathbf{a})) \cdot J\mathbf{g}(\mathbf{a})\mathbf{v} = [J\mathbf{g}(\mathbf{a})^T \nabla f(\mathbf{g}(\mathbf{a}))] \cdot \mathbf{v} h ′ ( 0 ) = ∇ f ( g ( a )) ⋅ J g ( a ) v = [ J g ( a ) T ∇ f ( g ( a ))] ⋅ v
Since v \mathbf{v} v was arbitrary, ∇ h ( 0 ) = J g ( a ) T ∇ f ( g ( a ) ) \nabla h(0) = J\mathbf{g}(\mathbf{a})^T \nabla f(\mathbf{g}(\mathbf{a})) ∇ h ( 0 ) = J g ( a ) T ∇ f ( g ( a )) . ■ \blacksquare ■
Problem. Let f ( x , y ) = x 2 y f(x, y) = x^2 y f ( x , y ) = x 2 y and let x = cos t x = \cos t x = cos t , y = sin t y = \sin t y = sin t . Find d d t f ( cos t , sin t ) \frac{d}{dt} f(\cos t, \sin t) d t d f ( cos t , sin t ) Using the chain rule, and verify by direct substitution.
Solution Via the chain rule:
d d t f ( x ( t ) , y ( t ) ) = f x ⋅ x ′ ( t ) + f y ⋅ y ′ ( t ) \frac{d}{dt} f(x(t), y(t)) = f_x \cdot x'(t) + f_y \cdot y'(t) d t d f ( x ( t ) , y ( t )) = f x ⋅ x ′ ( t ) + f y ⋅ y ′ ( t )
= 2 x y ⋅ ( − sin t ) + x 2 ⋅ cos t = − 2 cos t sin 2 t + cos 3 t = 2xy \cdot (-\sin t) + x^2 \cdot \cos t = -2\cos t \sin^2 t + \cos^3 t = 2 x y ⋅ ( − sin t ) + x 2 ⋅ cos t = − 2 cos t sin 2 t + cos 3 t
Via direct substitution: f ( cos t , sin t ) = cos 2 t sin t f(\cos t, \sin t) = \cos^2 t \sin t f ( cos t , sin t ) = cos 2 t sin t .
d d t [ cos 2 t sin t ] = − 2 cos t sin 2 t + cos 3 t \frac{d}{dt}[\cos^2 t \sin t] = -2\cos t \sin^2 t + \cos^3 t d t d [ cos 2 t sin t ] = − 2 cos t sin 2 t + cos 3 t
Both methods agree. ■ \blacksquare ■
Problem. Let f ( x , y ) = x 2 y + sin ( x y ) f(x, y) = x^2 y + \sin(xy) f ( x , y ) = x 2 y + sin ( x y ) . Compute ∇ f \nabla f ∇ f and find the directional derivative At ( 1 , π ) (1, \pi) ( 1 , π ) in the direction u = ( 1 / 2 , 1 / 2 ) \mathbf{u} = (1/\sqrt{2}, 1/\sqrt{2}) u = ( 1/ 2 , 1/ 2 ) .
Solution.
∂ f ∂ x = 2 x y + y cos ( x y ) \frac{\partial f}{\partial x} = 2xy + y\cos(xy) ∂ x ∂ f = 2 x y + y cos ( x y )
∂ f ∂ y = x 2 + x cos ( x y ) \frac{\partial f}{\partial y} = x^2 + x\cos(xy) ∂ y ∂ f = x 2 + x cos ( x y )
∇ f ( 1 , π ) = ( 2 π + π cos ( π ) , 1 + cos ( π ) ) = ( 2 π − π , 1 − 1 ) = ( π , 0 ) \nabla f(1, \pi) = (2\pi + \pi\cos(\pi), 1 + \cos(\pi)) = (2\pi - \pi, 1 - 1) = (\pi, 0) ∇ f ( 1 , π ) = ( 2 π + π cos ( π ) , 1 + cos ( π )) = ( 2 π − π , 1 − 1 ) = ( π , 0 )
D u f ( 1 , π ) = ∇ f ( 1 , π ) ⋅ u = π ⋅ 1 2 + 0 = π 2 D_{\mathbf{u}} f(1, \pi) = \nabla f(1, \pi) \cdot \mathbf{u} = \pi \cdot \frac{1}{\sqrt{2}} + 0 = \frac{\pi}{\sqrt{2}} D u f ( 1 , π ) = ∇ f ( 1 , π ) ⋅ u = π ⋅ 2 1 + 0 = 2 π ■ \blacksquare ■
Problem. Let f ( x , y , z ) = x 2 y e z + sin ( x z ) f(x, y, z) = x^2 y\, e^z + \sin(xz) f ( x , y , z ) = x 2 y e z + sin ( x z ) . Compute ∇ f \nabla f ∇ f and evaluate it at ( 1 , 0 , π ) (1, 0, \pi) ( 1 , 0 , π ) .
Solution ∂ f ∂ x = 2 x y e z + z cos ( x z ) \frac{\partial f}{\partial x} = 2xy\, e^z + z\cos(xz) ∂ x ∂ f = 2 x y e z + z cos ( x z )
∂ f ∂ y = x 2 e z \frac{\partial f}{\partial y} = x^2 e^z ∂ y ∂ f = x 2 e z
∂ f ∂ z = x 2 y e z + x cos ( x z ) \frac{\partial f}{\partial z} = x^2 y\, e^z + x\cos(xz) ∂ z ∂ f = x 2 y e z + x cos ( x z )
At ( 1 , 0 , π ) (1, 0, \pi) ( 1 , 0 , π ) :
f x ( 1 , 0 , π ) = 0 + π cos ( π ) = − π , f y ( 1 , 0 , π ) = e π , f z ( 1 , 0 , π ) = 0 + cos ( π ) = − 1 f_x(1,0,\pi) = 0 + \pi\cos(\pi) = -\pi, \quad f_y(1,0,\pi) = e^{\pi}, \quad f_z(1,0,\pi) = 0 + \cos(\pi) = -1 f x ( 1 , 0 , π ) = 0 + π cos ( π ) = − π , f y ( 1 , 0 , π ) = e π , f z ( 1 , 0 , π ) = 0 + cos ( π ) = − 1
∇ f ( 1 , 0 , π ) = ( − π , e π , − 1 ) \nabla f(1, 0, \pi) = (-\pi,\, e^{\pi},\, -1) ∇ f ( 1 , 0 , π ) = ( − π , e π , − 1 )
■ \blacksquare ■
Problem. Find the directional derivative of f ( x , y ) = x 2 y 3 f(x,y) = x^2 y^3 f ( x , y ) = x 2 y 3 at ( 1 , − 1 ) (1, -1) ( 1 , − 1 ) in the direction of v = ( 3 , − 4 ) \mathbf{v} = (3, -4) v = ( 3 , − 4 ) .
Solution First normalise v \mathbf{v} v : ∥ v ∥ = 9 + 16 = 5 \lVert \mathbf{v} \rVert = \sqrt{9 + 16} = 5 ∥ v ∥ = 9 + 16 = 5 So u = ( 3 / 5 , − 4 / 5 ) \mathbf{u} = (3/5,\, -4/5) u = ( 3/5 , − 4/5 ) .
∇ f = ( 2 x y 3 , 3 x 2 y 2 ) \nabla f = (2xy^3,\, 3x^2 y^2) ∇ f = ( 2 x y 3 , 3 x 2 y 2 )
∇ f ( 1 , − 1 ) = ( 2 ⋅ 1 ⋅ ( − 1 ) , 3 ⋅ 1 ⋅ 1 ) = ( − 2 , 3 ) \nabla f(1, -1) = (2 \cdot 1 \cdot (-1),\, 3 \cdot 1 \cdot 1) = (-2, 3) ∇ f ( 1 , − 1 ) = ( 2 ⋅ 1 ⋅ ( − 1 ) , 3 ⋅ 1 ⋅ 1 ) = ( − 2 , 3 )
D u f ( 1 , − 1 ) = ( − 2 ) ( 3 / 5 ) + ( 3 ) ( − 4 / 5 ) = − 6 − 12 5 = − 18 5 D_{\mathbf{u}} f(1, -1) = (-2)(3/5) + (3)(-4/5) = \frac{-6 - 12}{5} = -\frac{18}{5} D u f ( 1 , − 1 ) = ( − 2 ) ( 3/5 ) + ( 3 ) ( − 4/5 ) = 5 − 6 − 12 = − 5 18
■ \blacksquare ■
Suppose F ( x , y , z ) = 0 F(x, y, z) = 0 F ( x , y , z ) = 0 defines z z z implicitly as a function of x x x and y y y near a point ( a , b , c ) (a, b, c) ( a , b , c ) with F z ( a , b , c ) ≠ 0 F_z(a, b, c) \neq 0 F z ( a , b , c ) = 0 . By the Implicit Function Theorem, there exists a C 1 C^1 C 1 function φ \varphi φ defined on a neighbourhood of ( a , b ) (a, b) ( a , b ) such that φ ( a , b ) = c \varphi(a, b) = c φ ( a , b ) = c and F ( x , y , φ ( x , y ) ) = 0 F(x, y, \varphi(x, y)) = 0 F ( x , y , φ ( x , y )) = 0 .
Differentiating F ( x , y , φ ( x , y ) ) = 0 F(x, y, \varphi(x, y)) = 0 F ( x , y , φ ( x , y )) = 0 with respect to x x x :
F x + F z ⋅ ∂ z ∂ x = 0 ⟹ ∂ z ∂ x = − F x F z F_x + F_z \cdot \frac{\partial z}{\partial x} = 0 \implies \frac{\partial z}{\partial x} = -\frac{F_x}{F_z} F x + F z ⋅ ∂ x ∂ z = 0 ⟹ ∂ x ∂ z = − F z F x
Similarly, ∂ z ∂ y = − F y F z \frac{\partial z}{\partial y} = -\frac{F_y}{F_z} ∂ y ∂ z = − F z F y .
Proposition 1.6 (Implicit Function Theorem, special case). If F : R 3 → R F : \mathbb{R}^3 \to \mathbb{R} F : R 3 → R is C 1 C^1 C 1 and F ( a , b , c ) = 0 F(a,b,c) = 0 F ( a , b , c ) = 0 with F z ( a , b , c ) ≠ 0 F_z(a,b,c) \neq 0 F z ( a , b , c ) = 0 Then there exist neighbourhoods U U U of ( a , b ) (a,b) ( a , b ) and V V V of c c c and a unique C 1 C^1 C 1 function φ : U → V \varphi : U \to V φ : U → V with φ ( a , b ) = c \varphi(a,b) = c φ ( a , b ) = c and F ( x , y , φ ( x , y ) ) = 0 F(x, y, \varphi(x,y)) = 0 F ( x , y , φ ( x , y )) = 0 for all ( x , y ) ∈ U (x,y) \in U ( x , y ) ∈ U .
Problem. If x 2 y + y 2 z + z 2 x = 3 x^2 y + y^2 z + z^2 x = 3 x 2 y + y 2 z + z 2 x = 3 Find ∂ z ∂ x \frac{\partial z}{\partial x} ∂ x ∂ z and ∂ z ∂ y \frac{\partial z}{\partial y} ∂ y ∂ z at the point ( 1 , 1 , 1 ) (1, 1, 1) ( 1 , 1 , 1 ) .
Solution Let F ( x , y , z ) = x 2 y + y 2 z + z 2 x − 3 F(x,y,z) = x^2 y + y^2 z + z^2 x - 3 F ( x , y , z ) = x 2 y + y 2 z + z 2 x − 3 . Then F x = 2 x y + z 2 F_x = 2xy + z^2 F x = 2 x y + z 2 F y = x 2 + 2 y z F_y = x^2 + 2yz F y = x 2 + 2 y z , F z = y 2 + 2 z x F_z = y^2 + 2zx F z = y 2 + 2 z x .
At ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) : F x = 3 F_x = 3 F x = 3 , F y = 3 F_y = 3 F y = 3 , F z = 3 F_z = 3 F z = 3 .
∂ z ∂ x = − F x F z = − 3 3 = − 1 , ∂ z ∂ y = − F y F z = − 3 3 = − 1 \frac{\partial z}{\partial x} = -\frac{F_x}{F_z} = -\frac{3}{3} = -1, \quad \frac{\partial z}{\partial y} = -\frac{F_y}{F_z} = -\frac{3}{3} = -1 ∂ x ∂ z = − F z F x = − 3 3 = − 1 , ∂ y ∂ z = − F z F y = − 3 3 = − 1
■ \blacksquare ■
Theorem 1.7 (Taylor’s Theorem). Let f : U ⊆ R n → R f : U \subseteq \mathbb{R}^n \to \mathbb{R} f : U ⊆ R n → R be of class C k + 1 C^{k+1} C k + 1 On an open convex set U U U And let a ∈ U \mathbf{a} \in U a ∈ U . Then for all x ∈ U \mathbf{x} \in U x ∈ U :
f ( x ) = f ( a ) + ∇ f ( a ) ⋅ ( x − a ) + 1 2 ! ( x − a ) T H f ( a ) ( x − a ) + ⋯ + R k f(\mathbf{x}) = f(\mathbf{a}) + \nabla f(\mathbf{a}) \cdot (\mathbf{x} - \mathbf{a}) + \frac{1}{2!}(\mathbf{x} - \mathbf{a})^T H_f(\mathbf{a})(\mathbf{x} - \mathbf{a}) + \cdots + R_k f ( x ) = f ( a ) + ∇ f ( a ) ⋅ ( x − a ) + 2 ! 1 ( x − a ) T H f ( a ) ( x − a ) + ⋯ + R k
Where H f H_f H f is the Hessian matrix and the remainder R k R_k R k can be written in Lagrange form:
R k = 1 ( k + 1 ) ! ∑ ∣ α ∣ = k + 1 ( k + 1 ) ! α ! D α f ( c ) ( x − a ) α R_k = \frac{1}{(k+1)!} \sum_{\lvert \alpha \rvert = k+1} \frac{(k+1)!}{\alpha!} D^{\alpha} f(\mathbf{c})\, (\mathbf{x} - \mathbf{a})^{\alpha} R k = ( k + 1 )! 1 ∑ ∣ α ∣ = k + 1 α ! ( k + 1 )! D α f ( c ) ( x − a ) α
For some c \mathbf{c} c on the line segment joining a \mathbf{a} a and x \mathbf{x} x .
For n = 2 n = 2 n = 2 and k = 2 k = 2 k = 2 The second-order Taylor expansion is:
f ( a + h , b + k ) = f ( a , b ) + f x h + f y k + 1 2 ( f x x h 2 + 2 f x y h k + f y y k 2 ) + R 2 f(a+h, b+k) = f(a,b) + f_x h + f_y k + \frac{1}{2}\left(f_{xx} h^2 + 2f_{xy} hk + f_{yy} k^2\right) + R_2 f ( a + h , b + k ) = f ( a , b ) + f x h + f y k + 2 1 ( f xx h 2 + 2 f x y hk + f y y k 2 ) + R 2
Where all partial derivatives are evaluated at ( a , b ) (a, b) ( a , b ) and the remainder is
R 2 = 1 6 ( f x x x h 3 + 3 f x x y h 2 k + 3 f x y y h k 2 + f y y y k 3 ) ∣ c R_2 = \frac{1}{6}\left(f_{xxx} h^3 + 3f_{xxy} h^2 k + 3f_{xyy} hk^2 + f_{yyy} k^3\right)\Big|_{\mathbf{c}} R 2 = 6 1 ( f xxx h 3 + 3 f xx y h 2 k + 3 f x y y h k 2 + f y y y k 3 ) c
Proof (sketch). Define ϕ ( t ) = f ( a + t ( x − a ) ) \phi(t) = f(\mathbf{a} + t(\mathbf{x} - \mathbf{a})) ϕ ( t ) = f ( a + t ( x − a )) for t ∈ [ 0 , 1 ] t \in [0, 1] t ∈ [ 0 , 1 ] . Apply the single-variable Taylor theorem to ϕ \phi ϕ at t = 0 t = 0 t = 0 :
ϕ ( 1 ) = ϕ ( 0 ) + ϕ ′ ( 0 ) + 1 2 ! ϕ ′ ′ ( 0 ) + ⋯ + 1 k ! ϕ ( k ) ( 0 ) + 1 ( k + 1 ) ! ϕ ( k + 1 ) ( τ ) \phi(1) = \phi(0) + \phi'(0) + \frac{1}{2!}\phi''(0) + \cdots + \frac{1}{k!}\phi^{(k)}(0) + \frac{1}{(k+1)!}\phi^{(k+1)}(\tau) ϕ ( 1 ) = ϕ ( 0 ) + ϕ ′ ( 0 ) + 2 ! 1 ϕ ′′ ( 0 ) + ⋯ + k ! 1 ϕ ( k ) ( 0 ) + ( k + 1 )! 1 ϕ ( k + 1 ) ( τ )
For some τ ∈ ( 0 , 1 ) \tau \in (0, 1) τ ∈ ( 0 , 1 ) . By the multivariable chain rule, ϕ ′ ( t ) = ∇ f ( a + t ( x − a ) ) ⋅ ( x − a ) \phi'(t) = \nabla f(\mathbf{a} + t(\mathbf{x}-\mathbf{a})) \cdot (\mathbf{x}-\mathbf{a}) ϕ ′ ( t ) = ∇ f ( a + t ( x − a )) ⋅ ( x − a ) And higher Derivatives involve higher-order partial derivatives of f f f . Substituting c = a + τ ( x − a ) \mathbf{c} = \mathbf{a} + \tau(\mathbf{x}-\mathbf{a}) c = a + τ ( x − a ) yields the result. ■ \blacksquare ■
:::caution Common Pitfalls
Existence ≠ \neq = continuity of partials. A function can have all partial derivatives at a point yet fail to be continuous (hence not differentiable) there.Existence ≠ \neq = differentiability. Even if all partials exist at a point, the function need not be differentiable. Continuity of the partials in a neighbourhood (i.e., C 1 C^1 C 1 ) is sufficient but not necessary.Clairaut’s theorem requires continuity. Without continuity of the mixed partials, the equality f x y = f y x f_{xy} = f_{yx} f x y = f y x can fail.Normalise the direction vector. The formula D u f = ∇ f ⋅ u D_{\mathbf{u}} f = \nabla f \cdot \mathbf{u} D u f = ∇ f ⋅ u assumes ∥ u ∥ = 1 \lVert \mathbf{u} \rVert = 1 ∥ u ∥ = 1 . If the direction is given by a non-unit vector v \mathbf{v} v Divide by ∥ v ∥ \lVert \mathbf{v} \rVert ∥ v ∥ first.:::