You are on page 1of 21

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 , x 2 , x 3 ,...., x n ) f ( x1 , x2 ,...x i  x i ,.. x n )  f ( x1 , x 2 ,...xi ,...x n )
 lim
x i x i  0 x i

 second partial derivatives of two-variable function f(x,y)


 f 2 f  f 2 f
( )  f xx ( )  f yy
x x x 2
y y y 2

 f 2 f  f 2 f
( )  f xy ( )  f yx
 x y xy 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 differential df is
f f
df  dx  dy
x y
for n - variable function f ( x1 , x 2 ,... x n )
f f f
df  dx1  dx2  .......... ....  dxn
x1 x 2 x n
variables xi , i  1,2,3,......, n, for a given x i  x i ( x1 )
the total derivative of f ( x1 , x 2 ,... x i ... x n ) with respect to x1 is
df f f dx2 f dxi f dxn
 ( )  .........  ( )  .....  ( )
dx1 x1 x 2 dx1 x i dx1 x n dx1
Chapter 5 Partial differentiation
Ex: Find the total derivative of f ( x , y )  x  3 xy with respect to x , given
2

1
that y  sin x
f f dy 1
 2 x  3 y,  3 x; 
x y dx (1  x 2 )1 / 2
df 1 1 3x
 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 differential


(2) df  xdy  3 ydx
 function f ( x , y ) doesnot exist  inexact differential
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
f f
differentials:
A( x , y )dx  B( x , y )dy  df 
x
 A( x , y ) and
y
 B( 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 )dxi is exact, if
i 1

g i  g j 1
 for all pairs i , j  n( n  1) relationships
 x j x i 2
Ex: Show that (y+z)dx+xdy+xdz is an exact differential
g1 ( x , y , z )  y  z , g2  x , g 3  x
g 1  g g 3  g g 2 g
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
x  x ( y , z )  dx  ( ) z dy  ( ) y dz
y z
y y
y  y( x , z )  dy  ( ) z dx  ( ) x dz
x z
z z
z  z ( x , y )  dz  ( ) y dx  ( ) x dy
x y
Chapter 5 Partial differentiation
 x y x  y x
dx  ( ) z ( ) z dx  [( ) z ( ) x  ( ) y ]dz
y x y  z z

if z is a constant  dz  0 if x is a constant  dx  0
x y y  z  x
( ) z  ( ) z 1 reciprocity relation ( ) x ( ) y ( ) z  1 cyclic relation
y x z  x  y

5.5 The chain rule


for f  f ( x , y ) and x  x ( u), y  y( u)
f f df f dx f dy
df  dx  dy   
x y du x du y du
for many variables f ( x1 , x 2 ,...., x n ) and x i  x i ( u)
df n
f dxi f dx1 f dx2 f dxn
     ........ 
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 ,...., xn ) and xi  xi ( u1 , u2 ,..., um )
f n
f x i
  j  1,2,..., m
u j i  1  x i u j

Ex: Polar coordinates ρ and ψ, Cartesian coordinates x and y, x=ρcosφ,


f ( x , y )  g (  ,  ) transform  2
f  2
f
y=ρsinφ,  2into one in ρ and φ
x 2
y
 x 
 2  x2  y2 ,  2  cos  ,  sin
x ( x  y 2 )1 / 2 y
φ  y / x2 y   sin   sin  φ cos φ
  tan (y/x ),
1
    , 
x 1  ( y / x ) 2
x y
2 2
 2
 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
 ( ) and  ( )   f ( x, y) 
2
   
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
f ( x , y )  f ( x0 , y0 )  x  y  [ 2 x  2
2
 x y  2  y 2 ]
x y 2! x xy y
x  x  x 0 , y  y  y0
all the derivatives are to be evaluated at ( x0 , y0 )
* full Taylor' s series for two variables is :

1  
f ( x, y)   [(x  y ) n f ( x , y )]x0 , y0
n  0 n! 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
f ( x , y )  f ( x0 , y0 ) 
[x 2 f xx  2xyf xy  y 2 f yy ]
2!
x  x  x0 , ΔΔ  y-y0 , rearranging
1 f xy y 2 f 2
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 ( 3 / 2 ,0)
minimum at and a stationary point at the origin
whose 2
Sol:f nature
 ( 3 x cannot
2 x 4 ) exp( x 2
 y 2
be determined)  0 by
x the
0 or x  procedures.
above 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 derivatives 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 undetermined stationary point
( 3 / 2 ,0) : a maximum (  3 / 2 ,0) : a minimum
Chapter 5 Partial differentiation
f
 for a n-variable function f ( x1 , x 2 ,....... x n ) at all stationary  0 for all x i
points x i
  1 2 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 eigenvalues r and n orthogonaleigenvectors er
Mer   r er and erT e s   rs  x   a r er
r

1 1 1 1
 f  
2 r
a e
r r
T
M 
m
a e
m m   
2 r m
a a e T

r m r m me   
2 r m
a a  
r m m rm  
2 r
a r2  r

1
(1) minimum : f    r a r2  0 all eigenvalues are greater than zero
2 r
1
(2) maximum : f    r a r2  0 all eigenvalues are less than zero
2 r
(3) saddle point : all eigenvalues have mixed signs
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 xx f xy  f  f xy
M     xx
  0  ( f   )( f   )  f xy  0
2

 f yx f yy  f yx f yy   xx yy

1
   [( f xx  f yy )  ( f xx  f yy ) 2  4 f xy2 ]
2
(1) minima : two eigenvalues 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 eigenvalues 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 
f
dx 
f
dy  0 and dg 
g
dx 
g
dy  0
x y x y
f g f g
 d ( 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 constraints
(d) x , y and z are all different  inconsistent
Chapter 5 Partial differentiation
5.11 Thermodynamic relations

Maxwell’s thermodynamic relations:


P: pressure V: volume T: temperature S: entropy U: internal energy
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
TdS  PdV  dU  ( )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
Chapter 5 Partial differentiation
Ex: Show that (S / V )T  (P / T )V
consider total differenti al dS and dU with two independen t variablesV 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 )   f ( x , t )dt   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

 definite integral
t v
I ( x)   f ( x , t )dt  F ( x , v )  F ( x , u)
t u

dI ( x ) F ( x , v ) F ( x , u) v f ( x , t ) u f ( x , t )
   dt   dt
dx x x x x
dI v f ( x , t )

dx u x
  dt
Chapter 5 Partial differentiation
(2) The integral’s limits are function of x
t v( x )
I f ( x , t )dt  F ( x .v ( x ))  F ( x , u( x ))
t  u( x )

I I
 f ( x , v ( x )),   f ( x , u( x ))
v u
dI I dv I du I dv du  v ( x )
dx x u( x )
    f ( x , v ( x ))  f ( x , u( x ))  f ( x , t )dt
dx v dx u dx x dx
dI dv du v ( x ) f ( x , t )
  f ( x , v ( x )) - f ( x,u( x ))   dt
dx dx dx u ( x ) x

Ex: Find the derivative with respect to x of the integral


x 2 sin xt
I ( x)   dt
x t

dI sin x 3 sin x 2 x 2 t cos xt


 2
(2 x )  (1)   dt
dx x 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

You might also like