Beruflich Dokumente
Kultur Dokumente
DIFFERENTIATION
Lec. 3.1: Differentiation in Single Variable
Dr. Niket Kaisare
Department of Chemical Engineering
IIT–Madras
Numerical Differentiation
Example
tan −1 (1+10 −4 ) − tan −1 (1) ε = 5e-5
−4
10
"d −1 %
$# tan (x)'& tan −1 (1+10 −4 ) − tan −1 (1−10 −4 )
dx x=1 ε = 2e-9
2 ×10 −4
• Order of accuracy:
• Previous example was done for ℎ = 1067
NUMERICAL DIFFERENTIATION
Lec. 3.2: Differentiation in Single Variable
Dr. Niket Kaisare
Department of Chemical Engineering
IIT–Madras
f ( xi + 2 ) − 2 f ( xi +1 ) + 2 f ( xi −1 ) − f ( xi − 2 )
f ʹʹʹ( xi ) =
h 2
( )
+ O h2
Example-1
• Solve the above using central differences to find ! " # and ! "" #
Example-2
Physical Example
• Consider:
6B
? = @A CD E8./;, @ = 1000, BC = 2500
NUMERICAL DIFFERENTIATION
Lec. 3.3: Partial Derivatives
Dr. Niket Kaisare
Department of Chemical Engineering
IIT–Madras
• Consider:
6B
? = @A CD E8./;, @ = 1000, BC = 2500
X!
= cos #8 A 6[\
X#8
X!
= − sin #8 A 6[\
X#/
A Function of Multiple Variables
• Consider the following function:
#
! S = sin #8 exp −#/ , # = #8
/
• The partial differential (è gradient in Transport Phenomena):
X! X!
]! S = = cos #8 A 6[\ − sin #8 A 6[\
X#8 X#/
hi k8 ℎ k8 ℎ
• To obtain è compute r at: k + 8 and k − 8
hD / 0 / 0
hi k8 0 k8 0
• To obtain è compute r at: k + and k −
hj / ℎ/ / ℎ/