Chapter 5 Partial differentiation Chapter 5 Partial differentiation

advertisement
Chapter 5 Partial differentiation
5.1 Definition of the partial derivative
 the partial derivative of f(x,y) with respect to x and y are
f
f ( x  x , y )  f ( x , y )
f
 lim
 ( )y  fx
x x 0
x
x
f
f ( x , y  y )  f ( x , y )
f
 lim
 ( )x  f y
y y 0
y
y
 for general n-variable
f ( x1 , x2 , x3 ,...., xn )
f ( x1 , x2 ,... xi  xi ,.. xn )  f ( x1 , x2 ,... xi ,... xn )
 lim
xi 0
xi
xi
 second partial derivatives of two-variable function f(x,y)
 f
2 f
( )
 f xx
2
x x
x
 f
2 f
( )
 f yy
2
y y
y
 f
2 f
( )
 f xy
x  y
xy
 f
2 f
( )
 f yx
y  x
yx
Chapter 5 Partial differentiation
5.2 The total differential and total derivative
x  x  x and y  y  y  f  f  f
f  f ( x  x , y  y )  f ( x , y )
 f ( x  x , y  y )  f ( x , y  y )  f ( x , y  y )  f ( x , y )
f ( x   x , y  y )  f ( x , y  y )
f ( x , y  y )  f ( x , y )
[
]x  [
]y
x
y
Re z
as x  0 and y  0, the total differenti al df is
f
f
df 
dx 
dy
x
y
for n - variable function f ( x1 , x 2 ,... x n )
df 
f
f
f
dx1 
dx 2  .............. 
dx n
x1
x 2
x n
variables xi , i  1,2,3,......, n, for a given xi  xi ( x1 )
the total derivative of f ( x1 , x2 ,... xi ... xn ) with respect to x1 is
df
f
f dx2
f dxi
f dxn

(
)
 .........  (
)
 .....  (
)
dx1 x1
x2 dx1
xi dx1
xn dx1
Chapter 5 Partial differentiation
2
Ex: Find the total derivative of f ( x, y )  x  3 xy with respect to x , given
that y  sin 1 x
f
f
dy
1
 2 x  3 y,
 3 x;

x
y
dx (1  x 2 )1 / 2
df
1
3x
1
 2x  3 y  3x

2
x

3
sin
x

dx
(1  x 2 )1 / 2
(1  x 2 )1 / 2
5.3 Exact and inexact differentials
 If a function can be obtained by directly integrating its total differential,
the differential of function f is called exact differential, whereas those that
do not are inexact differential.
(1) df  xdy  ( y  1)dx  f ( x , y )  xy  x
exact differenti al
(2) df  xdy  3 ydx
 function f ( x , y ) doesnot exist  inexact differenti al
Chapter 5 Partial differentiation
Ex: Show that the differential xdy+3ydx is inexact.
f
f
df  xdy  3 ydx 
dx 
dy
x
y
f
f
 3 y   dx   3 ydx  f ( x , y )  3 xy  h( y ) - - - -(1)
x
x
f
f
 x   dy   xdy  f ( x , y )  xy  g( x ) - - - -(2)
y
y
for (1)  (2), no suitable h( y ), g(x) exist

Inexact differential can be made exact by multiplying a suitable function
called an integrating factor
Properties of exact differentials:
A( x , y )dx  B( x , y )dy  df 
f
f
 A( x , y ) and
 B( x , y )
x
y
2 f
A  2 f
B
A( x , y ) B( x , y )






yx y xy x
y
x
Chapter 5 Partial differentiation

for n variables
n
df   g i ( x1 , x 2 ,......., x n )dx i is exact, if
i 1
g i g j
1

for all pairs i , j  n( n  1) relationsh ips
x j x i
2
Ex: Show that (y+z)dx+xdy+xdz is an exact differential
g1 ( x , y , z )  y  z , g 2  x , g 3  x
g
g 1
g g 3
 g g 2
1 2 ,
1 1 ,
0 3
y
x  x
z z
y
by inspection  f ( x , y , z )  x( y  z )  c
5.4 Useful theorems of partial differentiation
x  x ( y , z )  dx  (
x
x
) z dy  ( ) y dz
y
z
y
y
) z dx  ( ) x dz
x
z
z
z
z  z ( x , y )  dz  ( ) y dx  ( ) x dy
x
y
y  y( x , z )  dy  (
Chapter 5 Partial differentiation
dx  (
x  y
x  y
x
) z ( ) z dx  [( ) z ( ) x  ( ) y ]dz
y  x
y z
z
if z is a constant  dz  0
x
y
( ) z  ( ) z 1 reciprocit y relation
y
x
if x is a constant  dx  0
 y  z x
( ) x ( ) y ( ) z  1 cyclic relation
 z x  y
5.5 The chain rule
for f  f ( x , y ) and x  x ( u), y  y( u)
df 
f
f
df f dx f dy
dx 
dy 


x
y
du x du y du
for many variables f ( x1 , x 2 ,...., x n ) and x i  x i ( u)
n
df
f dx i
f dx1 f dx 2
f dx n




 ........ 
du i 1 x i du x1 du x 2 du
x n du
Chapter 5 Partial differentiation
5.6 Change of variables
f  f ( x1 , x 2 ,...., x n ) and x i  x i ( u1 , u2 ,..., um )
n
f
 f x i


 u j i  1 x i u j
j  1,2,..., m
Ex: Polar coordinates ρ and ψ, Cartesian coordinates x and y, x=ρcosφ,
2
2

f

f
f ( x , y )  g(  ,  ) transform
y=ρsinφ,
into
one in ρ and φ

2
2
x
y
 2  x2  y2 ,
  tan
1

x

 2

cos

,
 sin
x ( x  y 2 )1 / 2
y
φ
 y / x2
y
  sin   sin  φ cos φ
(y/x ),




,

2
2
2
2
x 1  ( y / x )
x y


y
ρ

    
 sin  

 cos  


 cos 

,
 sin 

x x  x  

  y

 
2 f
 f
2
 f
 2 f  2 f  2 g 1 g 1  2 g
2

( ) and

( )   f ( x, y) 




x 2  x x
y 2 y y
 x 2 y 2  2     2  2
Chapter 5 Partial differentiation
5.7 Taylor’s theorem for many-variables functions
for two variables :
f
f
1 2 f
2 f
2 f
2
f ( x , y )  f ( x 0 , y0 ) 
x 
y  [ 2 x  2
xy  2 y 2 ]
x
y
2! x
xy
y
x  x  x 0 , y  y  y 0
all the derivative s are to be evaluated at ( x0 , y0 )
* full Taylor' s series for two variables is :
1


[( x
 y ) n f ( x , y )] x0 , y0
x
y
n  0 n!

f ( x, y)  
Ex: The Taylor’s expansion of f(x,y)=yexp(xy) about x=2, y=3.
f / x  y 2 e xy , f / y  e xy  xye xy
 2 f / x 2  y 3 e xy ,  2 f / y 2  2 xe xy  x 2 ye xy ,  2 f / xy  2 ye xy  xy 2 e xy
 f ( x , y )  3e 6  9e 6 ( x  2)  7e 6 ( y  3)

1 6
e [27( x  2) 2  48( x  2)( y  3)  16( y  3) 2 ]
2!
Chapter 5 Partial differentiation
5.8 Stationary points of many-variables functions
 two-variable function about point ( x0 , y0 )
f
f
 0 and
0
x
y
1
[x 2 f xx  2xyf xy  y 2 f yy ]
2!
x  x  x0 , ΔΔ  y-y 0 , rearrangin g
f ( x , y )  f ( x 0 , y0 ) 
2
f xy y 2
f
1
xy
f ( x , y )  f ( x0 , y0 )  [ f xx ( x 
)  y 2 ( f yy 
)]
2
f xx
f xx
(1) minimum : if both f xx and f yy are positive and f xy2  f xx f yy
(2) maximum : if both f xx and f yy are negative and f xy2  f xx f yy
(3) saddle point : if f xx and f yy have opposite sign or f xy2  f xx f yy
Chapter 5 Partial differentiation
Ex: f ( x, y )  x 3 exp( x 2  y 2 ) has a maximum at the point ( 3 / 2 ,0) , a
minimum at ( 3 / 2 ,0) and a stationary point at the origin whose
nature cannot be determined by the above procedures.
Sol: f
 ( 3 x 2  2 x 4 ) exp( x 2  y 2 )  0  x  0 or x   3 / 2
x
f
 2 yx 3 exp( x 2   y 2 )  0  x  0 or y  0
y
the stationary points are at (0,0), ( 3 / 2 ,0), (  3 / 2 ,0)
the second derivative s are f xx  (4 x 5  14 x 3  6 x ) exp( x 2  y 2 )
f yy  x 3 (4 y 2  2) exp( x 2  y 2 )
f xy  2 x 2 y( 2 x 2  3) exp( x 2  y 2 )
(1) at point (0 ,0)  f xx  f yy  f xy  0
(2) at points (  3 / 2 ,0)  f xx  6 3 / 2 exp(3 / 2), f yy  3 3 / 2 exp(3 / 2), f xy  0
(0,0)
: an undetermin ed stationary point
( 3 / 2 ,0) : a maximum
(  3 / 2 ,0) : a minimum
Chapter 5 Partial differentiation
for a n-variable function f ( x1 , x2 ,....... xn ) at all stationary points f  0 for all xi
xi
2
1
 f


Taylor' s expansion : f  f ( x )  f ( x0 )   
x i x j
2 i j  x i x j

2 f
define a matrix with elements M ij 
  f   x T M x / 2
x i x j
M is real and symmetric, it has n real eigenvalue s  r and n orthogonal eigenvectors er
Me r   r er and erT e s   rs  x   a r er
r
1
1
1
1
a r erT M  a m em    a r a m erT  m em    a r a m  m rm   a r2  r

2 r
2 r m
2 r m
2 r
m
1
(1) minimum : f    r a r2  0 all eigenvalue s are greater than zero
2 r
1
(2) maximum : f    r a r2  0 all eigenvalue s are less than zero
2 r
(3) saddle point : all eigenvalue s have mixed signs
 f 
Chapter 5 Partial differentiation
Ex: Derivative the conditions for maxima, minima and saddle points for a
function of two variables, using the above analysis.
f 
f xy
 f xx f xy 
2
  xx
M  

0

(
f


)(
f


)

f
xx
yy
xy  0

f
f
f
f


yy 
yx
yy
 yx
1
   [( f xx  f yy )  ( f xx  f yy ) 2  4 f xy2 ]
2
(1) minima : two eigenvalue s are real and positive
f xx  0 , f yy  0 and f xx  f yy  ( f xx  f yy ) 2  4 f xy2  f xy2  f xx f yy
(2) maxima : f xx  0 and f yy  0  f xx  f yy  0
( f xx  f yy ) 2  ( f xx - f yy ) 2  4 f xy2  f xy2  f xx f yy
(3) saddle point : two eigenvalue s have mixed sign
if f xx  f yy  0  ( f xx  f yy )  ( f xx  f yy ) 2  4 f xy2  0  f xy2  f xx f yy
if f xx  f yy  0  ( f xx  f yy )  ( f xx  f yy ) 2  4 f xy2  0  f xy2  f xx f yy
Chapter 5 Partial differentiation
5.9 Stationary values under constraints

Find the maximum value of the differentiable function f ( x , y )
subject to the constraint g( x , y )  c
Lagrange undetermined multipliers method
maximize f  df 
 d ( f  g )  (
f
f
g
g
dx 
dy  0 and dg 
dx 
dy  0
x
y
x
y
f
g
f
g
  )dx  (   )dy  0
x
x
y
y
 : Lagrange undetermin ed multiplier
dx and dy are dependent, we can choose  such that
f
g

0
x
x
f
g

 0  find  and the values of x and y at the stationary points
y
y
g( x , y )  c
Chapter 5 Partial differentiation
Ex: The temperature of a point (x,y) on a circle is given by T(x,y)=1+xy. Find
the temperature of the two hottest points on the circle.
constraint g( x , y )  c  x 2  y 2  1 - - - - - (1)


(1  xy )  
( x 2  y 2 )  0  y  2x  0 - - - -(2)
x
x


(1  xy )   ( x 2  y 2 )  0  x  2y  0 - - - -(3)
y
y
from (1) and (2)    1 / 2 and y   x put into (1)
y  x  x  1 / 2 , y  1 / 2  Tmax  3 / 2
y   x  x  1 / 2 , y  1 / 2  Tmin  1 / 2
 the stationary points of f(x,y,z) subject to the constraints g(x,y,z)=c1, h(x,y,z)=c2.

f
g
h
( f  g  h) 


0
x
x
x
x

f
g
h
( f  g  h) 


0
y
y
y
y

f
g
h
( f  g  h) 


0
z
z
z
z
Chapter 5 Partial differentiation
Ex: Find the stationary points of f ( x, y, z )  x 3  y 3  z 3 subject to the
following constraints:
(i) g( x , y, z )  x 2  y 2  z 2  1
(ii) g( x , y, z )  x 2  y 2  z 2  1 and h( x , y, z )  x  y  z  0
(i)

( f  g )  3 x 2  2x  0
x

( f  g )  3 y 2  2y  0
y

( f  g )  3 z 2  2z  0
z
 x  y  z  2 / 3 put into x 2  y 2  z 2  1     3 / 2
stationary points occur at x  y  z  1 / 3
* note : another condition : for some of x , y and z is zero :
(a) x  0, y  0 and z  0
3 y 2  2y  0, 3 z 2  2z  0, y 2  z 2  1  y  z  2 / 3  1 / 2
Chapter 5 Partial differentiation
(b) x  y  0, z  0  3 z 2  2 λz  0, z 2  1  z  1
(c) x  z  0, y  0  3 y 2  2 λy  0, y 2  1  y  1
 stationary points : (0,1 / 2 ,1 / 2 ), (0,0,1), (0,1,0)
Similarily , for the case y  0 and z  0
stationary points for y  0 : ( 1 / 2 ,0,1 / 2 ), (0,0,1), ( 1,0,0)
z  0 : ( 1 / 2 ,1 / 2 ,0), ( 1 ,0 ,0) , (0,1,0)
(ii)

( f  g  h)  3 x 2  2x    0 - - - (1)
x

( f  g  h)  3 y 2  2y    0 - - - (2)
y

( f  g  h)  3 z 2  2z    0 - - - (3)
z
(1)  ( 2)  3( x 2  y 2 )  2 ( x  y )  0  3( x  y )  2 ( x  y )  0
(a) if x  y , from x  y  z  0  z  2 x
from x 2  y 2  z 2  1  6 x 2  1  x  1 / 6 , y  1 / 6 , z  2 / 6
Chapter 5 Partial differentiation
similarily , if x  z  x  1 / 6 , y  2 / 6 , z  1 / 6
if y  z  x  2 / 6 , y  1 / 6 , z  1 / 6
(b) if x  y  3( x  y )  2  0
y  z  3( y  z )  2  0
x  z  3( x  z )  2  0
included in condition (a)
(c) x  y  z prohibited by constraint s
(d) x , y and z are all different  inconsiste nt
Chapter 5 Partial differentiation
5.11 Thermodynamic relations
Maxwell’s thermodynamic relations:
P: pressure
V: volume
T: temperature
S: entropy
the first law of thermodyna mics
dU  TdS  PdV
for two variables of X and Y :
U
U
 2U
 2U
dU  (
)Y dX  (
) X dY and

X
Y
XY YX
Ex: Show that (T / V ) S  (P / S )V
U
U
)V dS  (
) S dV
S
V
U
U
(
)V  T and (
)S   P
S
V
 2U
 2U
T
P


(
) S  ( )V
VS SV
V
S
TdS  PdV  dU  (
U: internal energy
Chapter 5 Partial differentiation
Ex: Show that (S / V )T  (P / T )V
consider total differenti al dS and dU with two independen t variables V and T
S
S
dS  (
)T dV  ( )V dT
V
T
S
S
 dU  TdS  PdV  T [(
)T dV  ( )V dT ]  PdV
V
T
U
U
(
)T dV  (
)V dT
V
T
U
S
U
S
(
)T  T (
)T  P and (
)V  T ( )V
V
V
T
T
 2U
 2U
 U
 U
since


(
)T 
(
)V
TV VT
T V
V  T
S
2S
P

S
2S
(
)T  T (
)  ( )V 
[T ( )V ]T  T
V
TV
T
V
T
VT
S
P
(
)T  ( )V
V
T
Chapter 5 Partial differentiation
5.12 Differentiation of integrals
(1) The integral’s limits are constant:
 indefinite integral
F ( x , t )
 f ( x, t )
x
 2 F ( x, t )  2 F ( x, t )
 F ( x , t )
 F ( x , t )  f ( x , t )


 [
]
[
]
tx
xt
t
x
x
t
x
 F ( x , t )

F ( x , t )
f ( x , t )
 [
]dt  
f ( x , t )dt 

dt
t
x
x
x
x
F ( x , t )   f ( x , t )dt 
 definite integral
I ( x)  
t v
t u
f ( x , t )dt  F ( x , v )  F ( x , u)
v f ( x , t )
u f ( x , t )
dI ( x ) F ( x , v ) F ( x , u)



dt  
dt
dx
x
x
x
x
v f ( x , t )
dI


dt
dx u x
Chapter 5 Partial differentiation
(2) The integral’s limits are function of x
I
t v ( x )
t  u( x )
f ( x , t )dt  F ( x .v ( x ))  F ( x , u( x ))
I
I
 f ( x , v ( x )),
  f ( x , u( x ))
v
u
dI I dv I du I
dv
du  v ( x )



 f ( x , v ( x ))  f ( x , u( x ))

f ( x , t )dt

u
(
x
)
dx v dx u dx x
dx
dx x
v ( x ) f ( x , t )
dI
dv
du

 f ( x , v ( x )) - f ( x,u( x ))

dt
u
(
x
)
dx
dx
dx
x
Ex: Find the derivative
with respect to x of the integral
x 2 sin xt
I ( x)  
dt
x
t
x 2 t cos xt
dI sin x 3
sin x 2

(2 x ) 
(1)  
dt
2
x
dx
x
x
t
2 sin x 3 sin x 2 sin xt x 2 1



| x  ( 3 sin x 3  2 sin x 2 )
x
x
x
x
Download