Chapter 02_Partial_Differentiation_annotated
Chapter 02_Partial_Differentiation_annotated
PARTIAL DIFFERENTIATION
Example 2.1.2 Note that 𝑥 " + 𝑦 " + 𝑧 " = 4 represents a sphere of radius 2. We cannot write this
in the form 𝑓(𝑥, 𝑦), since for each 𝑥 and 𝑦 in the disk 𝑥 " + 𝑦 " < 4 there are two corresponding
points on the sphere. As with the equation of a circle, we can resolve this equation into two
functions, 𝑓(𝑥, 𝑦) = 54 − 𝑥 " − 𝑦 " , and 𝑓(𝑥, 𝑦) = −54 − 𝑥 " − 𝑦 " 𝑟𝑒𝑝𝑟𝑒𝑠𝑒𝑛𝑡 the upper and
lower hemispheres. Each of these is an example of a function with a restricted domain: only certain
values of x and y make sense (namely, those for which 𝑥 " + 𝑦 " ≤ 4) and the graphs of these
functions are limited to a small region of the plane.
Understanding the concept of a limit was crucial to establish calculus for single-variable functions.
This was essential for grasping continuous functions and defining the derivative. Limits for
functions of two variables are often much more complex, but thankfully, most functions we
encounter are relatively straightforward.
The potential difficulty is mainly due to the fact that there are many ways to approach a point in
the 𝑥𝑦 − plane. If we want to say that
lim 𝑓(𝑥, 𝑦) = 𝐿
($,&)→(),*)
we need to capture the idea that as (𝑥, 𝑦) gets close to (𝑎, 𝑏) then 𝑓(𝑥, 𝑦) gets close to 𝐿.
For functions of one variable, 𝑓(𝑥), there are only two ways that 𝑥 can approach 𝑎: from the left
or right. But there are an infinite number of ways to approach (𝑎, 𝑏): along any one of an infinite
number of lines, or an infinite number of parabolas, or an infinite number of sine curves, and so
on. We might hope that it’s really not so bad—suppose, for example, that along every possible line
through (𝑎, 𝑏) the value of 𝑓(𝑥, 𝑦) gets close to 𝐿; surely this means that 𝑓(𝑥, 𝑦) approaches 𝐿 as
(𝑥, 𝑦) approaches (𝑎, 𝑏). Sadly, no.
If the value in step 01 and step 02 remain the same, the limit exists; otherwise not.
Step 03: Find the limit along 𝑦 = 𝑚𝑥 and 𝑦 = 𝑚𝑥 " . If the value of the limit does not contains 𝑚,
then the limit exists; If it contains 𝑚, the limit does not exist.
DEFINITION 2.2.1
If 𝑓(𝑥, 𝑦) is continuous at (𝑎, 𝑏) then,
lim 𝑓(𝑥, 𝑦) = 𝑓(𝑎, 𝑏)
($,&)→(),*)
Let 𝑧 = 𝑓(𝑥, 𝑦) be a function of two variables 𝑥 and 𝑦. If we we keep 𝑦 constant and 𝑥 varies then
𝑧 becomes a function of 𝑥 only. The derivative of 𝑧 with respect to 𝑥, keeping 𝑦 as a constant is
called partial derivative of 𝑧, with respect to 𝑥 is denoted by symbols,
𝜕𝑧 𝜕𝑓
, , 𝑓$ (𝑥, 𝑦)
𝜕𝑥 𝜕𝑥
Then,
Similarly, the partial derivative of 𝑧, with respect to 𝑦 keeping 𝑥 as a constant is denoted by,
𝜕𝑧 𝜕𝑓
, , 𝑓& (𝑥, 𝑦)
𝜕𝑦 𝜕𝑦
Example 2.3.1 The partial derivative with respect to 𝑥 of 𝑥 , + 3𝑥𝑦 is 3𝑥 " + 3𝑦.
/0 /0
Let 𝑧 = 𝑓(𝑥, 𝑦) then /$ and /& being the function of 𝑥 and 𝑦 can further be differentiated partially
If the mixed partial derivatives are continuous, then they are equal.
$&
Example 2.3.4 Compute the mixed partials of 𝑓(𝑥, 𝑦) = $ ! 1& ! .
"
𝐷(𝑥. , 𝑦. ) = 𝑓$$ (𝑥. , 𝑦. )𝑓&& (𝑥. , 𝑦. ) − Y𝑓$& (𝑥. , 𝑦. )Z
Example 2.3.5 Verify that 𝑓(𝑥, 𝑦) = 𝑥 " + 𝑦 " has a minimum at (0,0).
The Hessian matrix, a square matrix of second-order partial derivatives of a scalar-valued function,
is a fundamental tool in AI and Data Science for optimization and analysis.
For example,
Support Vector Machines (SVMs): In training SVMs, the Hessian matrix is used in the quadratic
programming problem formulation.
Neural Networks: During backpropagation, the Hessian can be used to adjust learning rates and
improve convergence in training deep networks.
The Hessian matrix is a matrix of second-order partial derivatives. Suppose we have a function 𝑓
of 𝑛 variables, i.e.,
𝑓: ℝ! → ℝ
The Hessian of 𝑓 is given by the following matrix and denoted as 𝐻2
𝜕"𝑓 𝜕"𝑓
⎡ ⋯ ⎤
⎢ 𝜕𝑥3" 𝜕𝑥3 𝜕𝑥! ⎥
𝐻2 = ⎢ ⋮ ⋱ ⋮ ⎥
⎢ 𝜕"𝑓 𝜕 𝑓 ⎥⎥
"
⎢ ⋯
⎣𝜕𝑥! 𝜕𝑥3 𝜕𝑥!" ⎦
Example 2.4.1 Find the Hessian matrix and its determinant for 𝑓(𝑥, 𝑦) = 𝑥 , + 2𝑦 " + 3𝑥𝑦 "