Partial Derivatives: Assistant Lecture Shrooq M. Azzo
Partial Derivatives: Assistant Lecture Shrooq M. Azzo
Assistant lecture
Shrooq M. Azzo
2020-2021
12/19/2020 shrooq.azoo@uoz.edu.krd 1
Partial Derivatives
Def.: The partial derivative of the function 𝑓(𝑥, 𝑦) with respect to 𝑥 is defined as
𝜕 𝜕𝑓 𝑓 𝑥 + ℎ, 𝑦 − 𝑓(𝑥, 𝑦)
𝑓𝑥 = 𝑓 = = lim
𝜕𝑥 𝜕𝑥 ℎ→0 ℎ
Similarly, the partial derivative of the function 𝑓(𝑥, 𝑦) with respect to 𝑦 is defined as
𝜕 𝜕𝑓 𝑓 𝑥, 𝑦 + ℎ − 𝑓(𝑥, 𝑦)
𝑓𝑦 = 𝑓 = = lim
𝜕𝑦 𝜕𝑦 ℎ→0 ℎ
12/19/2020 shrooq.azoo@uoz.edu.krd 2
Examples
𝜕𝑓 𝜕𝑓
Find and from the following functions
𝜕𝑥 𝜕𝑦
1) 𝑍 = 𝑓 𝑥, 𝑦 = 𝑥cos 𝑦 + 𝑦𝑒 𝑥
𝜕𝑓
Solution: = cos 𝑦 + 𝑦𝑒 𝑥
𝜕𝑥
𝜕𝑓
= −𝑥sin 𝑦 + 𝑒 𝑥
𝜕𝑦 3) 𝑍 = 𝑓 𝑥, 𝑦 = 𝑦 sin(𝑥𝑦)
2) 𝑍 = 𝑓 𝑥, 𝑦 = ln 𝑥 2 − 𝑦
𝜕𝑓
𝜕𝑓 2𝑥
Solution: = 𝑦 cos 𝑥𝑦 𝑦 = 𝑦 2 cos 𝑥𝑦
𝜕𝑥
Solution: =
𝜕𝑥 𝑥 2 −𝑦
𝜕𝑓 −1 𝜕𝑓
= = sin 𝑥𝑦 + 𝑦 𝑥 cos(𝑥𝑦)
𝜕𝑦 𝑥 2 −𝑦 𝜕𝑦
12/19/2020 shrooq.azoo@uoz.edu.krd 3
Second order partial derivatives
𝜕2 𝑍
= 𝑓𝑦𝑦 is the second derivative with respect to 𝑦
𝜕𝑦 2
𝜕2 𝑍
= 𝑓𝑥𝑦 differentiate first with respect to 𝑥, and then with respect to 𝑦
𝜕𝑥𝜕𝑦
12/19/2020 shrooq.azoo@uoz.edu.krd 4
Examples
𝑍 = 𝑓 𝑥, 𝑦 = sin 𝑥 − 𝑦 + sin(𝑥 + 𝑦)
𝜕𝑓
Solution: = 𝑓𝑥 = cos 𝑥 − 𝑦 + cos 𝑥 + 𝑦
𝜕𝑥
𝜕𝑓
= 𝑓𝑦 = −cos 𝑥 − 𝑦 + cos 𝑥 + 𝑦
𝜕𝑦
Solution: 𝑓𝑥 = 3𝑥 2 − 3𝑦 3 ⟹ 𝑓𝑥𝑥 = 6𝑥
12/19/2020 shrooq.azoo@uoz.edu.krd 6
Chain rule for partial derivatives
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦
= +
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠
12/19/2020 shrooq.azoo@uoz.edu.krd 7
Example
𝑑𝑤
let 𝑊 = 𝑥𝑦 + 𝑧 with 𝑥 = cos 𝑡 , 𝑦 = sin 𝑡 and 𝑧 = 𝑡 find
𝑑𝑡
𝑑𝑊 𝜕𝑊 𝑑𝑥 𝜕𝑊 𝑑𝑦 𝜕𝑊 𝑑𝑧
Solution: = + + = 𝑦 − sin 𝑡 + 𝑥cos 𝑡 + 1
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑧 𝑑𝑡
12/19/2020 shrooq.azoo@uoz.edu.krd 8
Example
𝜕𝑧 𝜕𝑧
let 𝑧 = 𝑥 2 − 2𝑥𝑦 + 2𝑦 3 with 𝑥 = s2 ln 𝑡 and 𝑦 = 2𝑠𝑡 3 find 𝑎𝑛𝑑
𝜕𝑠 𝜕𝑡
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦
Solution: = + = 2𝑥 − 2𝑦 2𝑠 ln(𝑡) + −2𝑥 + 6𝑦 2 2𝑡 3
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠
12/19/2020 shrooq.azoo@uoz.edu.krd 9
Example
𝑠
If 𝑧 = 𝑓 𝑥, 𝑦 = 𝑥2 + 𝑥𝑦 + 𝑦2, with 𝑥 = 𝑠𝑡 and 𝑦 =
𝑡
𝜕𝑧 𝜕𝑧 𝜕𝑧
Show that: 𝑠 +𝑡 = 2𝑥
𝜕𝑠 𝜕𝑡 𝜕𝑥
Solution:
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦 1
= + = 2𝑥 + 𝑦 𝑡 + 𝑥 + 2𝑦
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠 𝑡
𝑠 𝑠 1
= 2𝑠𝑡 + 𝑡 + 𝑠𝑡 + 2
𝑡 𝑡 𝑡
𝜕𝑧 2
𝑠 2
𝑠
= 2𝑠𝑡 + 𝑠 + 𝑠 + 2 2 = 2𝑠𝑡 + 2𝑠 + 2 2
𝜕𝑠 𝑡 𝑡
12/19/2020 shrooq.azoo@uoz.edu.krd 10
Example
𝜕𝑧 𝑠 𝑠2
𝑠 =𝑠 2𝑠𝑡 2 + 2𝑠 +2 2 = 2𝑠 2 𝑡 2 + 2𝑠 2 + 2 2
𝜕𝑠 𝑡 𝑡
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦 −𝑠
= + = 2𝑥 + 𝑦 𝑠 + 𝑥 + 2𝑦
𝜕𝑡 𝜕𝑥 𝜕𝑡 𝜕𝑦 𝜕𝑡 𝑡2
𝜕𝑧 𝑠 𝑠 −𝑠 2 𝑠2 𝑠2 𝑠2
= 2𝑠𝑡 + 𝑠 + 𝑠𝑡 + 2 = 2𝑠 𝑡 + − −2 3
𝜕𝑡 𝑡 𝑡 𝑡2 𝑡 𝑡 𝑡
𝑠2
= 2𝑠 2 𝑡 − 2 3
𝑡
𝜕𝑧 𝑠2
𝑡 = 2𝑠 2 𝑡 2 − 2 2
𝜕𝑡 𝑡
12/19/2020 shrooq.azoo@uoz.edu.krd 11
Example
𝜕𝑧 𝜕𝑧 𝑠2 𝑠2
Now, 𝑠 + 𝑡 = 2𝑠 2 𝑡 2 + 2𝑠 2 +2 2 + 2𝑠 2 𝑡 2 − 2 2 = 4𝑠 2 𝑡 2 + 2𝑠 2
𝜕𝑠 𝜕𝑡 𝑡 𝑡
… (1)
𝜕𝑧 𝑠
And, = 2𝑥 + 𝑦 = 2𝑠𝑡 +
𝜕𝑥 𝑡
𝜕𝑧 𝑠 𝑠
2𝑥 = 2𝑥 2𝑠𝑡 + = 2𝑠𝑡 2𝑠𝑡 + = 4𝑠 2 𝑡 2 + 2𝑠 2 … (2)
𝜕𝑥 𝑡 𝑡
12/19/2020 shrooq.azoo@uoz.edu.krd 12
Matrices
Index
Determinant of matrix
Inverse of matrix
12/19/2020 shrooq.azoo@uoz.edu.krd 13
Matrices
Definition: a matrix A is a rectangular array or table of numbers of 𝑀 × 𝑁 𝑚𝑢𝑚𝑏𝑒𝑟𝑠
where, 𝑀 is a row and 𝑁 is a column.
12/19/2020 shrooq.azoo@uoz.edu.krd 14
Some types of matrices
1) Square matrix: is a 𝑚 × 𝑛 matrix with 𝑚 = 𝑛
1 2 1 2 0
𝐴= 𝐵= 2 3 5
3 4 2×2
10 1 3 3×3
2) Zero matrix: is a 𝑚 × 𝑛 matrix with all components equal to zero.
0 0
𝐴=
0 0 2×2
3) Diagonal matrix: is a square with 𝑎𝑖𝑗 = 0, if 𝑖 ≠ 𝑗
2 0 0
𝐴= 0 3 0
0 0 6 3×3
12/19/2020 shrooq.azoo@uoz.edu.krd 15
Some types of matrices
4) Identity matrix 𝐼𝑚×𝑛 : is a diagonal matrix, ones down the main diagonal and zero
everywhere else.
1 2 1 0
𝐴= → 𝐼2×2 =
3 4 2×2 0 1
1 2 0 1 0 0
𝐵= 2 3 5 → 𝐼3×3 = 0 1 0
10 1 3 3×3 0 0 1
12/19/2020 shrooq.azoo@uoz.edu.krd 16
Some types of matrices
5) Transpose of matrix 𝐴𝑇 : is a 𝑚 × 𝑛 matrix obtained by writing the rows of A are order as
columns.
1 −1 1
𝑇 1 2 3
𝐴= 2 0 → 𝐴 = 𝐵= 2 → 𝐵𝑇 = 1 2 3
−1 0 4 3
3 4
properties of transpose
If A and B are any two matrices , then:
a) 𝐴𝑇 𝑇 = 𝐴
b) 𝐴 ± 𝐵 𝑇 = 𝐴𝑇 ± 𝐵𝑇
c) 𝐴𝐵 𝑇 = 𝐴𝑇 𝐵𝑇
d) 𝑘𝐴 𝑇 = 𝐾𝐴𝑇 , where k is any constant.
12/19/2020 shrooq.azoo@uoz.edu.krd 17
Some types of matrices
6) Symmetric matrix: a square matrix A is called symmetric matrix if 𝐴 = 𝐴𝑇
1 2 4 1 2 4
𝐴= 2 7 −3 → 𝐴𝑇 = 2 7 −3
4 −3 0 4 −3 0
7) Skew symmetric matrix: a square matrix A is called skew symmetric matrix if 𝐴 = −𝐴𝑇
0 −1 𝑇 0 1 0 −1
𝐴= → 𝐴 = → − 𝐴 𝑇=
1 0 −1 0 1 0
12/19/2020 shrooq.azoo@uoz.edu.krd 18
Some types of matrices
12/19/2020 shrooq.azoo@uoz.edu.krd 19
Determinant of matrix
If 𝐴 = 𝑎𝑖𝑗 be a square matrix of order n, then det(A) or 𝐴 is called determinant of
𝑛×𝑛
matrix A.
a) determinant of 2 × 2 matrix
𝑎11 𝑎12 𝑎11 𝑎12
If 𝐴 = 𝑎 𝑎22 , then det A = 𝑎21 𝑎22 = 𝑎11 𝑎22 − 𝑎12 𝑎21
21
b) determinant of 3×3 matrix
𝑎11 𝑎12 𝑎13
If 𝐵 = 𝑎21 𝑎22 𝑎23 , then
𝑎31 𝑎32 𝑎33
𝑎22 𝑎23 𝑎21 𝑎23 𝑎21 𝑎22
det 𝐵 = 𝑎11 𝑎32 𝑎33 − 𝑎12 𝑎31 𝑎33 + 𝑎13 𝑎31 𝑎32
= 𝑎11 𝑎22 𝑎33 − 𝑎23 𝑎32 − 𝑎12 𝑎21 𝑎33 − 𝑎23 𝑎31 + 𝑎13 𝑎21 𝑎32 − 𝑎22 𝑎31
12/19/2020 shrooq.azoo@uoz.edu.krd 20
Example
1 0 2
If 𝐴 = −1 3 4 , find det(A)
0 5 −2
Solution:
3 4 −1 4 −1 3
𝐴 =1 −0 +2
5 −2 0 −2 0 5
= 1 −6 − 20 − 0 2 − 0 + 2 −5 − 0 = −26 − 10 = −36
Singular matrix:
12/19/2020 shrooq.azoo@uoz.edu.krd 21
Inverse of matrix:
If A and B are two matrices such that 𝐴𝐵 = 𝐵𝐴 = 𝐼, then each side is inverse to the another
𝑎𝑑𝑗(𝐴)
side, and denoted by 𝐴−1 , and defined as 𝐴−1 = , where adj(A) is adjoin of A.
𝐴
a) If 𝐴 is 2 × 2 matrix:
1 2
Example: If 𝐴 = , find the inverse of A (𝐴−1 )
3 4
Solution:
𝐴 = 1 ∗ 4 − 2 ∗ 3 = 4 − 6 = −2
4 −2
𝑎𝑑𝑗 𝐴 =
−3 1
4 −2 −2 1
4 −2
𝑎𝑑𝑗(𝐴) 1 = −2 −2
𝐴−1 = = −3 = 3 −1
𝐴 −2 −3 1
−2 −2 2 2
12/19/2020 shrooq.azoo@uoz.edu.krd 22
Inverse of matrix:
b) If 𝐴 is 3 × 3 matrix:
The cofactor of the element 𝑎𝑖𝑗 is defined by 𝐶𝑖𝑗 = −1 𝑖+𝑗 𝑀𝑖𝑗 , where 𝑀𝑖𝑗 is a new
matrix (sub-matrix) obtained by deleting the row i and the column j.
𝑇
and 𝑎𝑑𝑗 𝐴 = 𝐶𝑖𝑗
Example:
1 2 3
If 𝐴 = 0 4 5 , find the inverse of A
1 0 6
Solution:
𝐴 =1 4∗6 − 5∗0 −2 0∗6 − 5∗1 +3 0∗0 − 4∗1
= 1 24 − 0 − 2 0 − 5 + 3 0 − 4 = 24 + 10 − 12 = 22
12/19/2020 shrooq.azoo@uoz.edu.krd 23
Inverse of matrix:
24 5 −4
𝐶𝑖𝑗 = −12 3 2
−2 −5 4
𝑇
24 − 12 −2
and 𝑎𝑑𝑗 𝐴 = 𝐶𝑖𝑗 = 5 3 −5
−4 2 4
24 −12 −2
5 3 −5 24 − 12 −2
𝑎𝑑𝑗 𝐴 −4 2 4 1
𝐴−1 = = = 5 3 −5
𝐴 22 22
−4 2 4
12/19/2020 shrooq.azoo@uoz.edu.krd 24
Some operation of matrix:
𝑎 𝑏 𝑒 𝑓
Let 𝐴 = , 𝐵= , be any two matrices, then:
𝑐 𝑑 𝑔 ℎ
𝑎±𝑒 𝑏±𝑓
1) 𝐴 ± 𝐵 =
𝑐±𝑔 𝑑±ℎ
𝑎𝑒 + 𝑏𝑔 𝑎𝑓 + 𝑏ℎ
2) 𝐴 ∗ 𝐵 =
𝑐𝑒 + 𝑑𝑔 𝑐𝑓 + 𝑑ℎ
𝑘𝑎 𝑘𝑏
3) 𝑘 ∗ 𝐴 = , where k is any scalar.
𝑘𝑐 𝑘𝑑
12/19/2020 shrooq.azoo@uoz.edu.krd 25
Some operation of matrix:
Notes:
1) 𝐴2 = 𝐴 ∗ 𝐴, 𝐴3 = 𝐴 ∗ 𝐴 ∗ 𝐴
2) 𝐴 + 𝐵 = 𝐵 + 𝐴
3) 𝐴 − 𝐵 ≠ 𝐵 − 𝐴
4) 𝐴 ∗ 𝐵 ≠ 𝐵 ∗ 𝐴
5) 𝐴−𝑛 = 𝐴𝑛 −1
, 𝐴−2 = 𝐴2 −1
, 𝐴−3 = 𝐴3 −1
12/19/2020 shrooq.azoo@uoz.edu.krd 26
Example
1 2 1 0
If 𝐴 = and 𝐵 = , find
3 4 2 1
1) 𝐴 + 𝐵
2) 𝐴 − 𝐵
3) 𝐴 ∗ 𝐵
4) 𝐴−3
5) 𝐴−1 + 2𝐴 + 𝐼2×2
12/19/2020 shrooq.azoo@uoz.edu.krd 27