<<

MATH BACKGROUND FOR

A. Partial Derivatives and Total Differentials

Partial Derivatives Given a function f(x1,x2,...,xm) of m independent variables, the  ∂ f  of f with respect to x , holding the other m-1 independent variables constant,   , is defined by i  ∂  xi xj≠i  ∂ f   fx( , x ,..., x+ ∆ x ,..., x )− fx ( , x ,..., x ,..., x )   =  12ii m 12 i m  ∂  lim ∆ xi x →∆ 0  xi  xj≠i i

nRT Example: If p(n,V,T) = , V  ∂ p RT  ∂ p  nRT  ∂ p nR   =   = −   =  ∂ n V  ∂V  2  ∂T  V VT,, nTV nV ,

Total Differentials Given a function f(x1,x2,...,xm) of m independent variables, the total differential of f, df, is defined by

m  ∂ f  df = ∑  dx  ∂  i i=1 xi xji≠  ∂ f   ∂ f   ∂ f  =   dx +   dx + ... +   dx ,  ∂  1  ∂  2  ∂  m x1 x2 xm xx2131,...,mm xxx , ,..., xx ,..., m-1 where dxi is an infinitesimally small but arbitrary change in the variable xi.

nRT Example: For p(n,V,T) = , V  ∂ p  ∂ p   ∂ p  dp =   dn +   dV +   dT  ∂ n  ∂ V   ∂ T  VT,,, nT nV RT nRT nR = dn − dV + dT V V 2 V

B. Some Useful Properties of Partial Derivatives

1. The order of differentiation in mixed second derivatives is immaterial; e.g., for a function f(x,y),   ∂  ∂ f   ∂  ∂ f   ∂ 22f ∂ f     =     or = ∂ y  ∂ xx  ∂  ∂ y   ∂∂yx ∂∂xy  y   x  x y 2

in the commonly used short-hand notation. (This relation can be shown to follow from the definition of partial derivatives.)

2. Given a function f(x,y):

 ∂ y  1 a.   = etc.  ∂ f   ∂ f  x    ∂ y  x

 ∂ f   ∂ y   ∂ x b.       = −1 (the cyclic rule)  ∂ x   ∂ f   ∂ y yxf

Proof: The total differential of f is

 ∂ f   ∂ f  df =   dx +   dy  ∂ x   ∂ y  yx We could, in principle, solve the equation f = f(x,y) for y in terms of x and f; i.e., we could obtain the function y(x,f). Its total differential would be given by

 ∂ y  ∂ y  dy =   dx +   df  ∂ x  ∂ f  fx Substituting the above expression for df into the right-hand side of the expression for dy, we obtain    ∂ y  ∂ y   ∂ f   ∂ f  dy =   dx +     dx +   dy  ∂ x  ∂ f   ∂ x   ∂ y   fxyx  or

   ∂ y   ∂ f   ∂ y  ∂ y   ∂ f   0 =     +   dx +     - 1dy (I)  ∂ f   ∂ x   ∂ x   ∂ f   ∂ y    xy f  xx

Since dx and dy are arbitrary infinitesimal changes, the only way that the right-handside of (I) can be zero for all choices of dx and dy is if the coefficients of dx and dy are each separately equal to zero. Setting the coefficient of dy equal to zero gives

 ∂ y   ∂ f   ∂ y  1     = 1 or   = q.e.d.  ∂ f   ∂ y   ∂ f   ∂ f  xx x   ∂ y  x 3

Moreover, since any of the three variables f, x, and y could have been chosen as the dependent variable, it must also be true that

 ∂ x  1  ∂ x 1   = and   =  ∂ f   ∂ f   ∂ y  ∂ y y   f    ∂ x   ∂ x y f

Setting the coefficient of dx equal to zero in eqn. (I) gives

 ∂ y   ∂ f   ∂ y       = -  ∂ f   ∂ x   ∂ x xy f Thus,  ∂ y   ∂ f       ∂ f   ∂ x  xy 1  ∂ x = -1 or since =   ,  ∂ y  ∂ y  ∂ y     f  ∂ x  ∂ x ff

 ∂ f   ∂ y   ∂ x      − = 1 q.e.d.  ∂ x   ∂ f   ∂ y yxf

1  ∂ V  1  ∂ V  Example: Using the cyclic rule and the definitions α =   and β = -   , V  ∂ T  V  ∂ p  p T  ∂ p α show that   = .  ∂T  β V

Solution: From the cyclic rule,  ∂ p  ∂ V   ∂T        = − 1.  ∂T   ∂ p   ∂ V  VTp Thus,  ∂ V  -   ∂ T   ∂ p -1 p -Vα α   = = = = q.e.d.  ∂T   ∂ V   ∂T   ∂ V  -Vβ β V        ∂ p   ∂ V   ∂ p  Tp T

3. Given two functions of x and y: f(x,y) and g(x,y),

 ∂ f   ∂ f   ∂ y       a. = ()  ∂ g   ∂ y   ∂ g xxx 4

 ∂ f   ∂ f   ∂ f   ∂ y         b. = +  ∂ x   ∂ x   ∂ y   ∂ x gxgy

Proof: The total differential of f considered to be a function of x and y is

 ∂ f   ∂ f  df =   dx +   dy ,  ∂ x   ∂ y  yx while the total differential of y considered to be a function of x and g is

 ∂ y  ∂ y dy =   dx +   dg .  ∂ x  ∂ g gx Substituting this expression for dy into the expression for df above gives    ∂ f   ∂ f   ∂ y  ∂ y df =   dx +     dx +   dg  ∂ x   ∂ y   ∂ x  ∂ g  yxgx     ∂ f   ∂ f   ∂ y  ∂ f   ∂ y =   +     dx +     dg.  ∂ x   ∂ y   ∂ x   ∂ y   ∂ g  yxg xx

But if f is considered to be a function of x and g, rather than of x and y, its total differential is given by

 ∂ f   ∂ f  df =   dx +   dg.  ∂ x   ∂ g  gx

These two expressions for df must be identical for any choice of the arbitrary infinitesimal changes dx and dg. Therefore, it must be true that

 ∂ f   ∂ f   ∂ f   ∂ y  ∂ f   ∂ f   ∂ y               = + and = q.e.d.  ∂ x   ∂ x   ∂ y   ∂ x  ∂ g   ∂ y   ∂ g gxgy xxx

Examples: 1. For a van der Waals gas (i.e., a model system which obeys the van der Waals ), the p and the U, as functions of n, V, and T, are given by

2 2 nRT na 3 na p = − and U = nRT − Vnb− V 2 2 V respectively, where a and b are constants. Use these equations and the chain rule to derive an  ∂ U  equation for   in terms of n, V, and T.  ∂ p  nT, 5

 ∂ U     ∂ V   ∂ U   ∂ U   ∂ V  nT, Solution:   =     =  ∂ p   ∂ V   ∂ p   ∂ p  nT,,, nT nT    ∂ V  nT, naV22/ na = = 22na2 nRT na RTV 2 − − V 32()Vnb− V ()Vnb− 2

 ∂ U  2. Given that the constant- capacity C ≡   , show that V  ∂ T  V  ∂U   ∂U    = CV + α   .  ∂T  V  ∂V  p T

 ∂ U   ∂ U   ∂ U   ∂ V  Solution:   =   +      ∂T   ∂T   ∂ V   ∂ T  pVTp

 ∂ U   ∂ V  But   = C and   = Vα. Therefore,  ∂ T  V  ∂T  V p

 ∂ U   ∂ U    = CV + α   q.e.d.  ∂ T  V  ∂ V  p T ------Note: In this section, we have considered functions of two independent variables. However, all the relations derived hold for functions of more than two variables provided all the additional independent variables are held constant; e.g., for a function f(w,x,y,z),     ∂  ∂ f  ∂  ∂ f      =     , ∂x  ∂ yy  ∂  ∂ x    wxz,,  wyz,, wyz,, wxz,,

 ∂ f   ∂ y   ∂ x       = − 1, etc.  ∂ x   ∂ f   ∂ y wyz,, wxz ,, f ,, wz 6

C. Exact and Inexact Differentials; Line Integrals

Linear Differentials An infinitesimal quantity

m

dz = ∑ Mi (, x12 x ,...,) xmi dx i=1

= M11 dx + M 2 dx 2 + ... + Mmm dx is called a linear differential; the right-hand side of the equation is called a linear in m variables. We shall be concerned primarily with linear differentials in two variables; in this case, let us write dz = Mdx + Ndy where M and N are, in general, functions of x and y.

Exact Differentials: dz = Mdx + Ndy is an if and only if there exists a function of x and y, F(x,y), such that dF = dz for all values of x and y.

A more practically useful test for exactness is the following: dz = Mdx + Ndy is an exact differential  ∂ M   ∂ N  if and only if   =   .  ∂ y   ∂ x  xy It is easy to see that this relation must be true for an exact differential dz because in that case  ∂ F   ∂ F  M =   and N =   and  ∂ x   ∂ y  y x    ∂ M  ∂  ∂ F   ∂  ∂ F    ∂ N    =     =     =   .  ∂ yy ∂  ∂ xx  ∂  ∂ y    ∂ x  xy   x  y x y

 ∂ M   ∂ N  It can also be shown that the converse is true; i.e., if   =   , then dz is exact.  ∂ y   ∂ x  xy

Inexact Differentials dw = M′dx + N′dy is an if and only if there exists no function F(x,y), such that dF = dw for all values of x and y. Equivalently, dw is inexact if and only if  ∂ M ''  ∂ N    ≠   .  ∂ y   ∂ x  xy

Examples: The linear differential dz = xy2dx + x2ydy is an exact differential because it is the total differential of the function F = ½ x2y2 + C, where C is an arbitrary constant. Here,

 ∂ M   ∂   ∂   ∂ N    =  ()xy22 = 2. xy =  ()xy =    ∂ yy ∂ ∂ x  ∂ x  xx    yy 7

2 2 On the other hand, the linear differential dw = x y dx + xy dy is inexact, as can most easily be demonstrated by noting that

 ∂ M   ∂   ∂ N   ∂    =  ()xy222 = x2 while   =  ()xy = y  ∂ yy ∂   ∂ xx ∂  xx y y

Line Integrals Consider a curve C in the X-Y plane connecting two points (x′,y′) and (x′′,y′′) and

imagine that we chop the curve up into n segments as shown at the left. Then the line integral I of the linear differential dz = Mdx + Ndy on the curve C is defined by

n []∆∆+ I = lim∑ MxyxNxyy(,ii ) i (, ii ) i n→∞ i=1 where M(x,y) and N(x,y) are given functions and M(xi,yi) and N(xi, yi) are the values of these functions at the midpoint of the ith segment. The notation we shall use for this integral is

('','')xy I =[∫ Mdx+ Ndy] (',')xy C

In order to carry out this integration, one must eliminate one of the variables x or y, which are related via the equation for the curve C, and then evaluate the resulting ordinary definite integral.

Examples: 1. Calculate the line integral of the inexact differential dw = x2ydx + xydy along the curve y = x from (0,0) to (1,1).

(,)11 Solution: I =[∫ x2 dx+ xydy] But y = x and dy = dx. Therefore, (,)00 yx=

1 1 2 2 3 2 I = 2∫ x dx = 3 x = 3 0 0

2. Calculate the line integral of dw = x2ydx + xydy along the curve y = x2 from (0,0) to (1,1).

(,)11 Solution: I =[∫ x2 dx+ xydy] But y = x2 and dy = 2xdx. Therefore, (,)00 yx= 2

1 1 2 +++4 1 352 1 2 11 () = Ixxdxxx = ∫ ()2 = 3 5 = 3 5 15 0 0 8

Cyclic Integrals The cyclic integral Idz =∫ is a line integral of the linear differential dz in which C the path of integration is a closed curve; i.e., in which the initial and final points on C are the same.

Important Properties of Exact Differentials

1. If dz is an exact differential, then ∫ dz = 0 for any closed curve C. C

(,)xy22 2. If dz is an exact differential, then I = ∫ dz is independent of the path C between the initial (,)xy11 C point (x1,y1) and the final point (x2,y2).

These properties are fairly obvious intuitively. Clearly, if dz is exact, it is the total differential of

(,)xy22 some function F(x,y) and, therefore, I = ∫ dF = F(x2,y2) - F(x1,y1) independent of the path C. (,)xy11 C Furthermore, if (x2,y2) = (x1,y1), then I is clearly equal to zero. Rigorous proofs of properties 1 and 2 are given at the end of this section for anyone interested. First, however, I’d like to preview the thermodynamic significance of exact and inexact differentials and line integrals.

Thermodynamic Significance As we shall see shortly, the properties of exact and inexact differentials and of line integrals are of very great importance in thermodynamics. For any infinitesimal thermodynamic transformation (change of state), the changes dp, dV, dU, dH, dS, dG, etc. in the various functions are exact differentials, while the done on the system dw and the heat absorbed by the system dq during the process are inexact differentials. For a finite thermodynamic transformation from state 1 to state 2, the change ∆F in any F is given by ∆F = F2 - F1. On the other hand, q and w must be determined by evaluating line integrals whose value depends on the path of the transformation.

Proof of Property 1 It has been shown that the line integral of any linear differential around a closed curve C can be expressed in terms of a surface integral as follows:    ∂ M   ∂ N  ∫ []Mdx+ Ndy = - ∫∫   −    dxdy (Stokes' Theorem) C  ∂ y   ∂ x   A  xy

where the integration on the right is over the area enclosed by the curve C. But (∂ M/∂ y)x = (∂ N/∂ x)y. since this is a necessary and sufficient condition for dz to be an exact differential. Hence,

∫ []Mdx+ Ndy = 0 q.e.d. C 9

Proof of Property 2 Consider the closed curve C shown at the left. If dz is an exact differential,

(,)xy22 (,)xy11 0 = ∫ dz = dz+ dz C ∫∫ (,)xy11 (,)xy22 C1 C2

(,)xy22 (,)xy11 or ∫∫dz = - dz (,)xy11 (,)xy22 C1 C2

As is true for any definite integral, if we interchange its limits of integration, the integral on the right will change sign; i.e.,

(,)xy11 (,)xy22 ∫∫dz = - dz (,)xy22 (,)xy11 C2 C2 Thus

(,)xy22 (,)xy22 ∫∫dz = dz (,)xy11 (,)xy11 C1 C2

But C1 and C2 could be any arbitrary curves connecting the points (x1,y1) and (x2,y2). Hence it must (,)xy22 be true that ∫ dz is independent of the path C. (,)xy11 C q.e.d.

Exercises

1. Determine the total differential of each of the following functions: a. ze = xy 1 b. z = xy+

c. z = ln (xy)

d. z = x sin y + y sin x 10

2. A useful equation of state for a at low pressure and low is the following:

RT − RTa pV(,T)m = 2 Vm Vm

where Vm is the molar volume of the gas and a is a constant. Using this equation and the properties of partial derivatives, derive expressions for each of the following:  ∂ p  ∂ p   ∂ V   ∂ V    ,,,    m   m   ∂   ∂   ∂   ∂  T Vm p T Vm T T p

22 3. Given the functions f(x,y) = x2y + xy2 and g(x,y) = e−+()xy, derive expressions for the  ∂ f   ∂ f  partial derivatives   and   .  ∂ g   ∂ x xg

4. Determine whether or not each of the following linear differential forms is an exact differential. dx dy a. + xy22xy dx dy b. + xy 22xy

2 3 c. 2 x y dx + x dy x d. ln ydx + dy y

5. Evaluate each of the following line integrals:

(,)22 dx dy  (,)11   a. ∫ 22 + b. ∫ [xsin y dx + y sin x dy ] (,)11  xy xy (,)00 yx= 2 yx=

c. ∫ []x322 y dx + x y dy over the triangular C' path C′ shown at the right, which begins and ends at (x,y) = (0,0).