Understanding Multivariable Functions
Understanding Multivariable Functions
MATH 2394
Engineering Maths
Topic 6: Multivariable Functions
Today’s Topics
1. Multivariable Functions: Definition and what they look like.
2
RMIT Classification: Trusted
Introduction to Multivariable
Functions
Curvy surfaces
RMIT Classification: Trusted
Multivariable Functions–Example 1
𝑥+𝑦+1
Example 1: Given the multivariable function 𝑓 𝑥, 𝑦 = , find the
𝑥−1
7
RMIT Classification: Trusted
Multivariable Functions–Example 1
𝑥+𝑦+1
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = , find the value
𝑥−1
8
RMIT Classification: Trusted
Multivariable Functions–Example 2
9
RMIT Classification: Trusted
Source: Link
10
RMIT Classification: Trusted
𝑧 = 𝑓 𝑥, 𝑦 = 4𝑥 2 + 𝑦 2
11
RMIT Classification: Trusted
12
Multivariable Functions RMIT Classification: Trusted
– Contour Map
• Another way to visualize functions with 2 variables is
Contour map.
Source: Link
13
Multivariable Functions RMIT Classification: Trusted
– Contour Map
14
Multivariable Functions– Contour
RMIT Classification: Trusted
Map Example
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = 6 − 3𝑥 − 2𝑦. Find the
contour line equations for 𝑘 = −6, 0, 6, 12.
15
Multivariable Functions – Section
RMIT Classification: Trusted
Highlight
• Multivariable functions (MVFs) are functions with multiple
independent variables.
• The Range of MVFs is the set of all real results of 𝑓(𝑥, 𝑦).
Partial Differentiation
Derivatives in 3 Dimensions
RMIT Classification: Trusted
′ ′
𝑓 𝑥+ℎ −𝑓 𝑥
𝑓 𝑥 = 𝑦 = lim
ℎ→0 ℎ
Multivariable Functions
• Given a function 𝑓(𝑥, 𝑦), we can define the limit of 𝑓(𝑥, 𝑦)
as 𝑥, 𝑦 approaches (𝑎, 𝑏) as 𝐿, such as:
𝐥𝐢𝐦 𝒇 𝒙, 𝒚 = 𝑳
𝒙,𝒚 → 𝒂,𝒃
Source: Link
19
RMIT Classification: Trusted
𝑥𝑦
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = . Determine if
𝑥 2 +𝑦 2
𝐥𝐢𝐦 𝒇 𝒙, 𝒚 = 𝒇(𝒂, 𝒃)
𝒙,𝒚 → 𝒂,𝒃
Source: Link
21
RMIT Classification: Trusted
𝒇 𝒙 + 𝒉, 𝒚 − 𝒇 𝒙, 𝒚
𝒇𝒙 𝒙, 𝒚 = 𝐥𝐢𝐦
𝒉→𝟎 𝒉
𝒇 𝒙, 𝒚 + 𝒉 − 𝒇 𝒙, 𝒚
𝒇𝒚 𝒙, 𝒚 = 𝐥𝐢𝐦
𝒉→𝟎 𝒉
Source: Link
23
RMIT Classification: Trusted
𝜕𝑓 𝜕𝑧 𝜕
𝑓𝑥 𝑥, 𝑦 = 𝑓𝑥 = = = 𝑓 𝑥, 𝑦 = 𝐷𝑥 𝑓
𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕𝑧 𝜕
𝑓𝑦 𝑥, 𝑦 = 𝑓𝑦 = = = 𝑓 𝑥, 𝑦 = 𝐷𝑦 𝑓
𝜕𝑦 𝜕𝑦 𝜕𝑦
Source: Link
24
Partial Differentiation – What does it
RMIT Classification: Trusted
mean?
• Recall that equation 𝑓 𝑥, 𝑦 represents a surface 𝑆.
mean?
27
RMIT Classification: Trusted
28
RMIT Classification: Trusted
End of Part 1
(To be continued…)
Partial Differentiation – Differentiation
RMIT Classification: Trusted
Formulas
• In general, Partial Derivatives will follow 7 out of 8 rules we discussed
previously for Differentiation.
1. Derivative of a Constant.
2. Power Rule
3. Constant Multiple Rule
4. Sum Rule
5. Difference Rule
6. Product Rule
7. Quotient Rule
Source: Link
30
RMIT Classification: Trusted
𝑑𝑧 Δ𝑟 𝑓 𝑥 + Δx, y + Δ𝑦 − 𝑓 𝑥, 𝑦
= lim = lim
𝑑𝑡 Δ𝑡→0 Δ𝑡 Δ𝑡→0 Δ𝑡
Δ𝑧 1
= 𝑓 𝑥 + Δx, y + Δ𝑦 + 𝑓 𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦
Δ𝑡 Δ𝑡
1
= [ 𝑓 𝑥 + Δ𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 + Δ𝑦 + 𝑓 𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 ]
Δ𝑡
𝑓 𝑥 + Δ𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 + Δ𝑦 Δ𝑥 𝑓 𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 Δ𝑦
= +
Δ𝑥 Δ𝑡 Δ𝑦 Δ𝑡
Δ𝑧
lim
Δ𝑡→0 Δ𝑡
𝑓 𝑥 + Δ𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 + Δ𝑦 Δ𝑥
= lim lim
Δ𝑥→0 Δ𝑥 Δ𝑡→0 Δ𝑡
𝑓 𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 Δ𝑦
+ lim lim
Δ𝑦→0 Δ𝑦 Δ𝑡→0 Δ𝑡
𝒅𝒛 𝝏𝒛 𝒅𝒙 𝝏𝒛 𝒅𝒚 𝒅𝒙 𝒅𝒚
→ = . + . = 𝒇𝒙 . + 𝒇𝒚 .
𝒅𝒕 𝝏𝒙 𝒅𝒕 𝝏𝒚 𝒅𝒕 𝒅𝒕 𝒅𝒕
Source: Link
33
RMIT Classification: Trusted
For each 𝑖 = 1, 2, … , 𝑚
Source: Link
34
Partial Differentiation – Chain Rule
RMIT Classification: Trusted
Example
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = 𝑥 2 𝑦 + 3𝑥𝑦 4 , where
𝑑𝑧
𝑥 = sin 2𝑡 and 𝑦 = cos 𝑡 , find when 𝑡 = 0
𝑑𝑡
(1) Invoking the Chain Rule, we have:
𝑑𝑧 𝑑𝑥 𝑑𝑦
= 𝑓𝑥 + 𝑓𝑦
𝑑𝑡 𝑑𝑡 𝑑𝑡
(2) Let’s find the partial derivative with respect to 𝑥
and 𝑦:
𝑓𝑥 = 2𝑥𝑦 + 3𝑦 4
𝑓𝑦 = 𝑥 2 + 12𝑥𝑦 3
(3) Next let’s find the derivative of 𝑥 and 𝑦 with
respect to 𝑡:
𝑑𝑥
= 2 cos 2𝑡
𝑑𝑡
𝑑𝑦
= − sin 𝑡
𝑑𝑡
35
Partial Differentiation – Chain Rule
RMIT Classification: Trusted
Example
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = 𝑥 2 𝑦 + 3𝑥𝑦 4 , where
𝑑𝑧
𝑥 = sin 2𝑡 and 𝑦 = cos 𝑡 , find when 𝑡 = 0
𝑑𝑡
(4) Now let’s put the terms back into the equation:
𝑑𝑧
= 2𝑥𝑦 + 3𝑦 4 2 cos 2𝑡 + 𝑥 2 + 12𝑥𝑦 3 − sin 𝑡
𝑑𝑡
36
Partial Differentiation – Implicit
RMIT Classification: Trusted
Differentiation
• Given a function 𝐹 𝑥, 𝑦 = 0 where 𝑦 = 𝑓(𝑥), then we can invoke the
Chain Rule as:
𝑑𝐹 𝑥, 𝑦 𝜕𝐹 𝑑𝑥 𝜕𝐹 𝑑𝑦
= . + . =0
𝑑𝑥 𝜕𝑥 𝑑𝑥 𝜕𝑦 𝑑𝑥
𝝏𝑭
𝒅𝒚 − 𝑭𝒙
→ = 𝝏𝒙 =−
𝒅𝒙 𝝏𝑭 𝑭𝒚
𝝏𝒚
Source: Link
37
Partial Differentiation – Implicit
RMIT Classification: Trusted
Differentiation
• Given a function 𝐹 𝑥, 𝑦, 𝑧 = 0 where 𝑥 and 𝑦 are independent variable
and 𝑧 is given implicitly as a function of 𝑥 and 𝑦, then we can invoke
the Chain Rule as:
𝑑𝐹 𝑥, 𝑦 𝜕𝐹 𝑑𝑥 𝜕𝐹 𝜕𝑦 𝜕𝐹 𝜕𝑧
= . + . + . =0
𝑑𝑥 𝜕𝑥 𝑑𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑧 𝜕𝑥
𝜕 𝑥 𝜕 𝑦
• Recognize that = 1 and = 0, we have:
𝜕𝑥 𝜕𝑥
𝝏𝑭
𝜕𝐹 𝜕𝐹 𝜕𝑧 𝝏𝒛 𝑭𝒙 −
+ . =0→ = 𝝏𝒙 = −
𝜕𝑥 𝜕𝑧 𝜕𝑥 𝝏𝒙 𝝏𝑭 𝑭𝒛
𝝏𝒛
Source: Link
38
Partial Differentiation – Implicit
RMIT Classification: Trusted
Differentiation
• The partial derivative of 𝑧 with respect to 𝑦 can be obtained in a similar
manner. Thus we have:
𝝏𝑭
𝝏𝒛 − 𝑭𝒚
𝝏𝒚
= =−
𝝏𝒚 𝝏𝑭 𝑭𝒛
𝝏𝒛
Source: Link
39
Partial Differentiation – Implicit
RMIT Classification: Trusted
Differentiation Example
Example: Given the multivariable function 𝑥 3 + 𝑦 3 + 𝑧 3 + 6𝑥𝑦𝑧 = 1, find
𝜕𝑧 𝜕𝑧
and .
𝜕𝑥 𝜕𝑦
Solution:
(1) First we invoke the formulas for Implicit differentiation:
𝜕𝑧 𝐹𝑥 𝜕𝑧 𝐹𝑦
= − 𝑎𝑛𝑑 = −
𝜕𝑥 𝐹𝑧 𝜕𝑦 𝐹𝑧
(2) Our function 𝐹 𝑥, 𝑦, 𝑧 is:
𝐹 𝑥, 𝑦, 𝑧 = 𝑥 3 + 𝑦 3 + 𝑧 3 + 6𝑥𝑦𝑧 − 1
(3) Let’s find the values of the partial derivatives:
𝐹𝑥 = 3𝑥 2 + 6𝑦𝑧
𝐹𝑦 = 3𝑦 2 + 6𝑥𝑧
𝐹𝑧 = 3𝑧 2 + 6𝑥𝑦
40
Partial Differentiation – Implicit
RMIT Classification: Trusted
Differentiation Example
Example: Given the multivariable function 𝑥 3 + 𝑦 3 + 𝑧 3 + 6𝑥𝑦𝑧 = 1, find
𝜕𝑧 𝜕𝑧
and .
𝜕𝑥 𝜕𝑦
Solution:
(4) Hence we have:
𝜕𝑧 𝐹𝑥 3𝑥 2 + 6𝑦𝑧 𝒙𝟐 + 𝟐𝒚𝒛
= − =− 2 =− 𝟐
𝜕𝑥 𝐹𝑧 3𝑧 + 6𝑥𝑦 𝒛 + 𝟐𝒙𝒚
𝜕𝑧 𝐹𝑦 3𝑦 2 + 6𝑥𝑧 𝒚𝟐 + 𝟐𝒙𝒛
= − =− 2 =− 𝟐
𝜕𝑦 𝐹𝑧 3𝑧 + 6𝑥𝑦 𝒛 + 𝟐𝒙𝒚
41
Partial Differentiation – Higher RMIT Classification: Trusted
Derivatives
• Similar to the 2D case, we can take higher derivatives of Multivariable
Functions. However, since there are two Partial 1st Order Partial Derivatives
(for the case of 2 variables), there are four 2nd Order Derivatives:
𝝏 𝝏𝒇 𝝏𝟐 𝒇 𝝏𝟐 𝒛
𝒇𝒙 𝒙 = 𝒇𝒙𝒙 = = 𝟐= 𝟐
𝝏𝒙 𝝏𝒙 𝝏𝒙 𝝏𝒙
𝝏 𝝏𝒇 𝝏𝟐 𝒇 𝝏𝟐 𝒛
𝒇𝒙 𝒚 = 𝒇𝒙𝒚 = = =
𝝏𝒚 𝝏𝒙 𝝏𝒚𝝏𝒙 𝝏𝒚𝝏𝒙
𝝏 𝝏𝒇 𝝏𝟐 𝒇 𝝏𝟐 𝒛
𝒇𝒚 = 𝒇𝒚𝒙 = = =
𝒙 𝝏𝒙 𝝏𝒚 𝝏𝒙𝝏𝒚 𝝏𝒙𝝏𝒚
𝝏 𝝏𝒇 𝝏𝟐 𝒇 𝝏𝟐 𝒛
𝒇𝒚 = 𝒇𝒚𝒚 = = 𝟐= 𝟐
Source: Link
𝒚 𝝏𝒚 𝝏𝒚 𝝏𝒚 𝝏𝒚
42
Partial Differentiation – Higher
RMIT Classification: Trusted
Derivatives
• Clairaut’s Theorem: (Symmetry of 2nd Derivative) If the functions 𝑓𝑥𝑦 and 𝑓𝑦𝑥
are both continuous on a domain D, then at a point 𝑎, 𝑏 , within domain D, on
the surface 𝑓 where 𝑓𝑥𝑦 and 𝑓𝑦𝑥 exist:
𝒇𝒙𝒚 𝒂, 𝒃 = 𝒇𝒚𝒙 (𝒂, 𝒃)
Source: Link
43
Partial Differentiation – Multivariable
RMIT Classification: Trusted
Calculus Example
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = 𝑥 3 + 𝑥 2 𝑦 3 − 2𝑦 2 , find
the 2nd partial derivatives of 𝑓(𝑥, 𝑦). Show that 𝑓𝑥𝑦𝑦 = 𝑓𝑦𝑦𝑥 = 𝑓𝑦𝑥𝑦 .
(1) First we find the partial derivatives with respect
to 𝑥 and 𝑦:
𝑓𝑥 = 3𝑥 2 + 2𝑥𝑦 3
𝑓𝑦 = 3𝑥 2 𝑦 2 − 4𝑦
(2) Next let’s find our 2nd Order partial derivatives:
𝒇𝒙𝒙 = 𝟔𝒙 + 𝟐𝒚𝟑
𝒇𝒚𝒚 = 𝟔𝒙𝟐 𝒚 − 𝟒
𝒇𝒙𝒚 = 𝟔𝒙𝒚𝟐
𝒇𝒚𝒙 = 𝟔𝒙𝒚𝟐
44
Partial Differentiation – Multivariable
RMIT Classification: Trusted
Calculus Example
Example: Given the multivariable function 𝑓 𝑥, 𝑦 = 𝑥 3 + 𝑥 2 𝑦 3 − 2𝑦 2 , find
the 2nd partial derivatives of 𝑓(𝑥, 𝑦). Show that 𝑓𝑥𝑦𝑦 = 𝑓𝑦𝑦𝑥 = 𝑓𝑦𝑥𝑦 .
(3) Next let us find 𝑓𝑥𝑦𝑦 , 𝑓𝑦𝑦𝑥 , 𝑓𝑦𝑥𝑦 :
𝜕 𝑓𝑥𝑦 𝜕 6𝑥𝑦 2
𝑓𝑥𝑦𝑦 = = = 𝟏𝟐𝒙𝒚
𝜕𝑦 𝜕𝑦
𝜕 𝑓𝑦𝑦 𝜕 6𝑥 2 𝑦 − 4
𝑓𝑦𝑦𝑥 = = = 𝟏𝟐𝒙𝒚
𝜕𝑥 𝜕𝑦
𝜕 𝑓𝑦𝑥 𝜕 6𝑥𝑦 2
𝑓𝑦𝑥𝑦 = = = 𝟏𝟐𝒙𝒚
𝜕𝑦 𝜕𝑦
45
Partial Differentiation – RMIT Classification: Trusted
Exercises
1. Find the domain of 𝑧 = 𝑓 𝑥, 𝑦 = ln(4 − 𝑥 2 − 𝑦 2 ) with 𝑝, 𝑥, 𝑦 ∈ 𝑅
𝑓 𝑥, 𝑦 = 3𝑥 3 + 2𝑥𝑦 + ln 𝑦
3. Let 𝑧 = 𝑥 10 + 6 and 𝑥 = 3𝑡 + 𝑣.
𝜕𝑧
Know that 𝑣 = 𝑣(𝑡), write the function .
𝜕𝑡
𝜕𝑤
4. Find , given that:
𝜕𝑡
𝑤 = 𝑥𝑦 2
𝑥 = 𝑒 3𝑡 cos 𝑐 ; 𝑦 = 𝑒 4𝑡 sin 𝑐 ; 𝑐 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
46
RMIT Classification: Trusted
Applications of Partial
Differentiations
The useful things we can do
Small Change Approximation –
RMIT Classification: Trusted
Introduction.
• Recall how the derivative 𝑓′(𝑥) can be estimated by the
formula:
′
𝑓 𝑥 + Δ𝑥 − 𝑓 𝑥
𝑓 𝑥 ≈
Δ𝑥
Source: Link
48
Small Change Approximation –
RMIT Classification: Trusted
Introduction.
• Recall the equation of a tangent plane:
𝒛 − 𝒛𝟎 = 𝒇𝒙 𝒙𝟎 , 𝒚𝟎 𝒙 − 𝒙𝟎 + 𝒇𝒚 (𝒙𝟎 , 𝒚𝟎 )(𝒚 − 𝒚𝟎 )
Source: Link
49
Small Change Approximation – RMIT Classification: Trusted
Introduction.
• Thus we can conclude for a general case, the change in 𝑧
can be approximated as Δ𝑧 via this function:
Δ𝑧 ≈ 𝑓𝑥 𝑥, 𝑦 Δ𝑥 + 𝑓𝑦 𝑥, 𝑦 Δ𝑦
Note: This is also called the Linear Approximation or Tangent Plane Approximation of 𝑧.
Source: Link
50
RMIT Classification: Trusted
51
RMIT Classification: Trusted
52
RMIT Classification: Trusted
Optimization – Introduction.
Source: Link
53
RMIT Classification: Trusted
54
RMIT Classification: Trusted
Source: Link
55
Optimization – Critical Points
RMIT Classification: Trusted
Example
Example: Given the MVF: 𝑓 𝑥, 𝑦 = 𝑥 2 + 𝑦 2 − 2𝑥 − 6𝑦 + 14. Find the
critical point(s) on the surface of this MVF. Is it a maximum or a minimum?
56
Optimization – Critical Points
RMIT Classification: Trusted
Example
Example: Given the MVF: 𝑓 𝑥, 𝑦 = 𝑥 2 + 𝑦 2 − 2𝑥 − 6𝑦 + 14. Find the
critical point(s) on the surface of this MVF. Is it a maximum or a minimum?
57
RMIT Classification: Trusted
• The formula for the 2nd Derivative test on MVFs is derived from
the determinant of the Hessian Matrix (to be discussed in Math
2240). For a 2-variables function, the Hessian matrix is:
𝑓𝑥𝑥 𝑓𝑥𝑦
→ 𝐷𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑎𝑛𝑡 = 𝒇𝒙𝒙 ∗ 𝒇𝒚𝒚 − 𝒇𝒙𝒚 𝒇𝒚𝒙
𝑓𝑦𝑥 𝑓𝑦𝑦
Source: Link
58
RMIT Classification: Trusted
Source: Link
59
RMIT Classification: Trusted
60
Optimization – 2nd Derivative test
RMIT Classification: Trusted
Example
Example: Given the MVF: 𝑓 𝑥, 𝑦 = 𝑥 4 + 𝑦 4 − 4𝑥𝑦 + 1. Find the critical
point(s) on the surface of this MVF.
61
Optimization – 2nd Derivative test
RMIT Classification: Trusted
Example
Example: Given the MVF: 𝑓 𝑥, 𝑦 = 𝑥 4 + 𝑦 4 − 4𝑥𝑦 + 1. Find the critical
point(s) on the surface of this MVF.
62
Optimization – 2nd Derivative test
RMIT Classification: Trusted
Example
Example: Given the MVF: 𝑓 𝑥, 𝑦 = 𝑥 4 + 𝑦 4 − 4𝑥𝑦 + 1. Find the critical
point(s) on the surface of this MVF.
(5) Next we check the D and 𝑓𝑥𝑥 value for each critical
point (cont.):
𝐷 0, 0 = 0 − 16 = −16 < 0
Hence, point 𝐵(0, 0) is a saddle point.
𝐷 1, 1 = 144 − 16 = 128 > 0
𝑓𝑥𝑥 1, 1 = 12 > 0
Hence, point 𝐶(1, 1) is a local minimum.
63
RMIT Classification: Trusted
4. Find the constraint equation and solve for the 3rd variable. Substitute the 3rd
variable back to the equation in step 3.
64
RMIT Classification: Trusted
Optimization – Example
Example: A rectangular box without a lid is to be made from 12𝑚2 of
cardboard. Find the maximum volume of such a box.
(1) First let us call the length, width, and height of the
box as 𝑥, 𝑦, 𝑧.
65
RMIT Classification: Trusted
Optimization – Example
Example: A rectangular box without a lid is to be made from 12𝑚2 of
cardboard. Find the maximum volume of such a box.
66
RMIT Classification: Trusted
Optimization – Example
Example: A rectangular box without a lid is to be made from 12𝑚2 of
cardboard. Find the maximum volume of such a box.
67
RMIT Classification: Trusted
Optimization – Example
Example: A rectangular box without a lid is to be made from 12𝑚2 of
cardboard. Find the maximum volume of such a box.
68
RMIT Classification: Trusted
Questions?