CHANGE OF VARIABLES

11. CHANGE OF VARIABLES

One important use of partial differentiation is in making changes of variables (for example, from rectangular to polar coordinates). This may give a simpler expression or a simpler differential equation or one more suited to the physical problem one is doing. For example, if you are working with the vibration of a circular membrane, or the flow of heat in a circular cylinder, polar coordinates are better; for a problem about sound waves in a room, rectangular coordinates are better. Consider the following problems.

Example 1. Make the change of variables r = x + vt, s = x − vt in the wave equation

2 ∂x − v 2 ∂t 2 = 0,

and solve the equation. (Also see Chapter 13, Sections 1, 4, and 6.) We use the equations

and equations like (7.2) to find ∂F

∂s (11.3) ∂F

∂r ∂s It is helpful to say in words what we have written in (11.3): To find the partial of a

function with respect to x, we find its partial with respect to r plus its partial with respect to s; to find the partial with respect to t, we find the partial with respect to r minus the partial with respect to s and multiply by the constant v. It is useful to write this in operator notation (see Chapter 3, Section 7):

=v

∂x

∂r

∂s

∂t

∂r

∂s

Section 11 Change of Variables 229

Then from (11.3) and (11.4) we find (11.5)

∂r 2 ∂r∂s ∂s 2 ∂ 2 F ∂

∂r 2 −2 ∂r∂s ∂s 2 Substitute (11.5) into (11.1) to get

2 − 2 ∂x = 0. ∂t 2 v =4 ∂r∂s

We can easily solve (11.6). We have

that is, the r derivative of ∂F/∂s is zero. Then ∂F/∂s must be independent of r, so ∂F/∂s = some function of s alone. We integrate with respect to s to find

F = f (s)+“const.”; the “constant” is a constant as far as s is concerned, but it may be any function of r, say g(r), since (∂/∂s)g(r) = 0. Thus we find that the solution of (11.6) is

F = f (s) + g(r).

Then, using (11.2), we find the solution of (11.1): (11.8)

F = f (x − vt) + g(x + vt),

where f and g are arbitrary functions. This is known as d’Alembert’s solution of the wave equation. Also see Problem 7.23 and Chapter 13, Problem 1.2.

Example 2. Write the Laplace equation

in terms of polar coordinates r, θ, where

Note that equations (11.10) give the old variables x and y in terms of the new ones, r and θ, whereas (11.2) gave the new variables r and s in terms of the old ones. In this situation, there are several ways to get equations like (11.3). One way is to write

∂y (11.11) ∂F

∂x ∂r

∂y ∂r

∂x

∂F ∂x

∂F ∂y

∂F

∂F

+ r cos θ , ∂θ

∂y ∂θ = −r sin θ ∂x

∂x ∂θ

∂y

230 Partial Differentiation Chapter 4

and then solve (11.11) for ∂F/∂x and ∂F/∂y (Problem 5). Another way is to find the needed partial derivatives of r and θ with respect to x and y [for methods and results, see Section 7, Example 6, equation (7.16) and Problem 7.9] and then write as in (11.3), using (7.16),

r ∂θ (11.12) ∂F

r ∂θ In finding the second derivatives, it will be convenient to use the abbreviations

G = ∂F/∂x and H = ∂F/∂y. Thus,

Then ∂ 2 F ∂G

∂ 2 F ∂ 2 F ∂G ∂H (11.14)

∂y Now equations (11.12) are correct for any function F ; in particular they are correct

if we replace F by G or by H. Let us replace F by G in the first equation (11.12) and replace F by H in the second equation. Then we have

Substituting (11.15) into (11.14), we get

1 ∂H ∂G (11.16)

∂ 2 F ∂ 2 F ∂G

∂H

∂θ − sin θ ∂θ We find the four partial derivatives of G and H which we need in (11.16), by

differentiating the right-hand sides of equations (11.13). ∂G

r ∂r∂θ

∂r 2 r ∂r∂θ

r ∂θ 2 r ∂θ We combine these to obtain the expressions needed in (11.16):

∂θ∂r

∂r

∂G

∂H

cos θ

+ sin θ

∂r

∂r

∂r 2

1 1 ∂ 2 F cos θ

1 ∂H

∂G

− sin θ

∂r

r ∂θ 2

Section 11 Change of Variables 231

Finally, substituting (11.18) into (11.16) gives

We next discuss a simple kind of change of variables which is very useful in thermodynamics and mechanics. This process is sometimes known as a Legendre transformation . Suppose we are given a function f (x, y); then we can write

Let us call ∂f /∂x = p, and ∂f /∂y = q; then we have (11.21)

df = p dx + q dy.

If we now subtract from df the quantity d(qy), we have

df − d(qy) = p dx + q dy − q dy − y dq or (11.22) d(f − qy) = p dx − y dq.

If we define the function g by (11.23)

g = f − qy,

then by (11.22) (11.24)

dg = p dx − y dq.

Because dx and dq appear in (11.24), it is convenient to think of g as a function of x and q. The partial derivatives of g are then of simple form, namely,

Similarly, we could replace the p dx term in df by −x dp by considering the function

f − xp. This sort of change of independent variables is called a Legendre transfor- mation. (For applications, see Problems 10 to 13.) For a discussion of Legendre transformations, see Callen, Chapter 5.

From the equations above, we can find useful relations between partial deriva- tives. For example, from equations (11.24) and (11.25) we can write

. ∂q∂x

Assuming = (reciprocity relations, see end of Section 1), then we have ∂q∂x

∂x∂q (11.27)

Many equations like these appear in thermodynamics (see Problems 12 and 13).

232 Partial Differentiation Chapter 4

PROBLEMS, SECTION 11

1. In the partial differential equation

put s = y + 2x, t = y + 3x and show that the equation becomes ∂ 2 z/∂s∂t = 0. Following the method of solving (11.6), solve the equation.

2. As in Problem 1, solve

2 ∂x − 10 ∂x∂y ∂y 2 =0

by making the change of variables u = 5x − 2y, v = 2x + y. 3. Suppose that w = f (x, y) satisfies

2 − 2 ∂x = 1. ∂y

Put x = u + v, y = u − v, and show that w satisfies ∂ 2 w/∂u∂v = 1. Hence solve the equation.

4. Verify the chain rule formulas

and similar formulas for

using differentials. For example, write

and substitute for dr and dθ:

(and similarly dθ).

∂x

∂y

Collect coefficients of dx and dy; these are the values of ∂F/∂x and ∂F/∂y. 5. Solve equations (11.11) to get equations (11.12). 6. Reduce the equation

to a differential equation with constant coefficients in d 2 y/dz 2 , dy/dz, and y by the change of variable x = e z . (See Chapter 8, Section 7d.)

7. Change the independent variable from x to θ by x = cos θ and show that the Legendre equation

dy

(1 − x ) dx 2 − 2x

+ 2y = 0

dx

becomes

dy

+ cot θ

+ 2y = 0.

dθ 2

Section 12 Differentiation of Integrals; Leibniz’ Rule 233

8. Change the independent variable from x to u = 2 √ x in the Bessel equation

and show that the equation becomes

9. If x = e s cos t, y = e s sin t, show that

=e −2s

„∂ 2 u

. 10. Given du = T ds − p dv, find a Legendre transformation giving

(a) a function f (T, v); (b)

a function h(s, p); (c)

a function g(T, p). Hint for (c): Perform a Legendre transformation on both terms in du. 11. Given L(q, ˙q) such that dL = ˙p dq + p d ˙q, find H(p, q) so that dH = ˙q dp − ˙p dq.

Comments: L and H are functions used in mechanics called the Lagrangian and the Hamiltonian. The quantities ˙q and ˙p are actually time derivatives of p and q, but you make no use of the fact in this problem. Treat ˙p and ˙q as if they were two more variables having nothing to do with p and q. Hint: Use a Legendre transformation. On your first try you will probably get −H. Look at the text discussion of Legendre transformations and satisfy yourself that g = qy − f would have been just as satisfactory as g = f − qy in (11.23).

12. Using du in Problem 10, and the text method of obtaining (11.27), show that „ ∂T «

„ ∂p « ∂v

=− . (This is one of the Maxwell relations in thermodynamics.)

∂s v 13. As in Problem 12, find three more Maxwell relations by using your results in Problem

10, parts (a), (b), (c).