lecture 13 – appendix: divergences in curvilinear coordinates

15
Physics 227 Lecture 11 Appendix B 1 Autumn 2008 Lecture 11 Appendix B: Some sample problems from Boas Here are some solutions to the sample problems assigned for Chapter 4. §4.1: 3 Solution : Consider a function of 3 (independent) variables 2 2 2 ,, ln zuvw u v w . Using the chain rule we find the partial derivatives are given by 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 , 2 1 2 , 2 1 2 . 2 u v w z dz u u u u du v w u v w u v w u v w z dz v v v v du v w u v w u v w u v w z dz w w w w du v w u v w u v w §4.1: 4 Solution : Now consider a problem in 2-D where we want the second derivatives at points where the first derivatives vanish. First consider the vanishing first derivatives to find 3 3 2 2 2 4 3 3 , 2 6 3 2, 3 2, 3 27 27 0 2 2 1 0 2 4 8 8 2 0 or treating as real . 27 3 wxy x y xy w w x y y x x y w w y x x x x x x y x x x

Upload: others

Post on 29-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Physics 227 Lecture 11 Appendix B 1 Autumn 2008

Lecture 11 – Appendix B: Some sample problems from Boas

Here are some solutions to the sample problems assigned for Chapter 4.

§4.1: 3

Solution: Consider a function of 3 (independent) variables

2 2 2, , lnz u v w u v w . Using the chain rule we find the partial derivatives are

given by

2 2 2

2 2 2 2 2 2 2 2 2

2 2 2

2 2 2 2 2 2 2 2 2

2 2 2

2 2 2 2 2 2 2 2 2

12 ,

2

12 ,

2

12 .

2

u v wz dz uu

u ud u v w u v w u v w

u v wz dz vv

v vd u v w u v w u v w

u v wz dz ww

w wd u v w u v w u v w

§4.1: 4

Solution: Now consider a problem in 2-D where we want the second derivatives at

points where the first derivatives vanish. First consider the vanishing first derivatives

to find

3 3

2 2

2 4 3

3

, 2 6

3 2 , 3 2 ,

3 27 270 2 2 1 0

2 4 8

8 20 or treating as real .

27 3

w x y x y xy

w wx y y x

x y

w wy x x x x x

x y

x x x

Physics 227 Lecture 11 Appendix B 2 Autumn 2008

Thus the first derivatives both vanish at the points 0 0, 0,0 , 2 3,2 3x y . (Note

that the x y symmetry of the initial expression guarantees the symmetry for these

zeros.) Now we can evaluate the second derivatives at these 2 points,

2

22

0,0

2 2

2

2 3,2 3

2

22

0,0

2 2

2

2 3,2 3

0

6 ,

4

0

6 .

4

w

xwx

x w

x

w

ywy

y w

y

§4.1: 9

Solution: If we have 2 22z x y , cosx r and siny r , then to obtain the

desired partial derivative we need to express z in terms of x and . Then we find

2 2 2

22

sin, tan , 2 tan

cos cos

2 1 2 tan 2 2 .

xr y x x z x x x

z yx x

x x

§4.1: 15

Solution: This is similar to the previous exercise but now treating r and as

independent. We have in this case

Physics 227 Lecture 11 Appendix B 3 Autumn 2008

2 2 2 2 2

2 2

cos , sin , cos 2sin 1 sin

2sin cos sin 2 2 .r

x r y r z r r r

zr r xy

§4.2: 5

Solution: We want to perform a two-variable expansion of 1 xy about the origin.

Proceeding straightforwardly, and using the fact that only the combination xy

appears, we find the familiar expansion of a square root

2 3 4

2 3 4

1 1 1 3 1 3 5 11 1

2 4 2! 8 3! 16 4!

1 1 1 51 1

2 8 16 128

z z z z z

xy xy xy xy xy

§4.2: 8

Solution: Now we try using our knowledge of complex variables to simplify finding

a 2-variable expansion. We start with

0

.!

n

x iy

n

x iye

n

Now take the real and imaginary parts to find

Physics 227 Lecture 11 Appendix B 4 Autumn 2008

0

2 2 3 2

0

3 2

ReRe cos

!

31 ,

2 6

ImIm sin

!

3

6

n

x iy x

n

n

x iy x

n

x iye e y

n

x y x xyx

x iye e y

n

y x yy xy

We could also use polar notation, iz re , to obtain

0

22 2

0

2

0

,!

coscos 1 cos cos sin

! 2

sinsin sin sin cos ,

!

n inx iy

n

nx

n

nx

n

r ee

n

r n re y r

n

r ne y r r

n

i.e., the same result.

§4.4: 4

Solution: We want to use our understanding of expansions to approximately solve

the thin lens formula when we slightly change one of the parameters. The focal

length of the given lens is fixed by

1 1 1 1 1.

12 18f i o

Now consider a slightly different situation with o = 17.5. To first order in the change

we have (note that the focal length does not change)

Physics 227 Lecture 11 Appendix B 5 Autumn 2008

22 2

2 2

2 2

0.51 1 1 1, ,

18

12 4 20.5 0.5 0.22

18 9 9

12 12.22.

o i

o o i i o i

ii o

o

i i

§4.4: 6

Solution: This exercise is similar to the last one where we use expansions to find

first-order relative uncertainties. We have

22 2

22 22

4 14 41 2

1

2 5% 2 2% 9%.

l l ll lg l l T T

T TT T T

gl l T T

g

The fact that we simply added the 2 uncertainties (as if they had the same sign) is

why this is a “worse-case” estimate. If the uncertainties in the length and the tension

are independent, a more sensible estimate would be to add them in quadrature,

2 2

2 6.4%g g l l T T .

§4.5: 3

Solution: We want to use the chain rule to find

2 2

2 2 2 2

2 2

2 2

2 2 2 2

2 2

2 2 2

2 2 .s s

p q

p q s s p q

e e s s

dr r dp r dq dp dqe p q

ds p ds q ds ds ds

e pe qe e p q

r p q e e e

Physics 227 Lecture 11 Appendix B 6 Autumn 2008

§4.6: 2

Solution: Let’s practice with implicit differentiation. We simply take derivatives

and solve for the desired form. We find

22

22

2

22

2

2 3

cossin cos

1

sin 1 cos

1 2 2

sin 2

xyxy xy xy xy

xy

xy xy xy

xy xy xy

xy xy

d dy dy dy x y eye x e x ye y e x

dx dx dx dx e xy

d d dyye x e xy x y e

dx dx dx

d y dy dye xy xe xy ye xy

dx dx dx

dyx y xy e y e

dx

2

3

2

2

2 2 2 sin

.1

xy xy xy

xy

dy dyxe xy ye xy x y e

d y dx dx

dx e xy

So evaluating these expressions at the origin we find

2

0,0 0,0

2

3

2

2

0,0

0,0

cos 1 01,

1 1 1 0

2 2 2 sin

1

1 0 1 2 0 2 1 0 1 2 0 0 00.

1 1 0

xy

xy

xy xy xy

xy

dy x y e

dx e xy

dy dyxe xy ye xy x y e

d y dx dx

dx e xy

Physics 227 Lecture 11 Appendix B 7 Autumn 2008

10 5 5 10x

10

5

5

10y

§4.6: 5

Solution: Again we can use implicit differentiation to find

3 3 3 2 3 2

2 3

2 3

2 3

2 3

1,2 1,2

6 3 3 0

3

3

3 6 8 2.

3 12 1 11

d dy dyxy yx y xy x yx

dx dx dx

dy yx y

dx xy x

dy yx y

dx xy x

Thus the tangent line passes through the point (1,2) and is

parallel to the line 11y +2x = 0 and thus is given by 11(y –

2) +2(x – 1) = 0 (or 11y + 2x = 24). Using ContourPlot in

Mathematica we find the indicated plot

ContourPlot[{x y^3 - y x^3 6,11 y+2 x24},{x,-10,10},{y,-10,10}, Axes->True, FrameFalse, AxesLabel{x,y}, LabelStyleDirective[Large]]

§4.7: 4

Solution: Now we use the chain rule with two independent variables. We have (just

following our noses)

2 2

,2

2 2 2

2 2 2 2 2 .

r sr uv

w r s es u v

w w r w sw r v s w rv s

u r u s u

w w r w sw r u s w ru s

v r v s v

Physics 227 Lecture 11 Appendix B 8 Autumn 2008

§4.9: 4

Solution: Now some practice with Lagrange multipliers. This exercise is a specific

version of Example 3, with a = 2, b = 3 and c = 5 describing the ellipsoid within

which we want to inscribe a box. With the coordinates x, y, z given the corner of the

box in the first octant we want to maximize the volume V = 8xyz subject to the

ellipsoid constraint. In Langrage notation we maximize the function

2 2 2

84 9 25

0 8 02

20 8 0

9

20 8 0.

25

x y zF xyz

F xyz

x

F yxz

y

F zxy

z

Solving these 3 simultaneous equations as in the example (multiply the first by x, the

second by y and the third by z, add, and use the equation for the ellipsoid) we find

12xyz and thus (from the x equation)

2 28 6 0 0, 0 .

3yz x yz x y z

Correspondingly 3 3 3y and 5 3z . Hence the desired volume is given by

2 5 80

8 8 3 .3 3 3

V xyz

§4.9: 6

Solution: This is a similar problem to maximize the volume in a box but the x,y,z

vertex is in the plane 2x +3y + 4z = 6 and the opposite 3 faces are in the coordinate

planes (x =0, y = 0, z =0). So now we want to maximize (using Lagrange)

Physics 227 Lecture 11 Appendix B 9 Autumn 2008

2 3 4

0 2 0

0 3 0

0 4 0.

F xyz x y z

Fyz

x

Fxz

y

Fxy

z

As above we multiply the first equation by x, the second by y and the third by z, add,

and use the equation for the (flat) plane to obtain

23 2 3 4 23 6 0

1

2

1: 2 0 1

2

1 2: 3 0

2 3

1 1: 4 0 .

2 2

xyz x y z xyz

xyz

x yz xyz x

y xz xyz y

z xy xyz z

Thus the volume is

1

.3

V xyz

§4.10: 10

Solution: Here we want to practice finding extrema in situations where the

boundaries matter. Consider a unit sphere (ball) in 3-D, 2 2 2 1x y z , whose

interior temperature is given by the distribution 2T y xz . We want to find the

maximum and minimum temperatures in the following regions.

Physics 227 Lecture 11 Appendix B 10 Autumn 2008

a) On the circle 2 20, 1y x z we have 21 1 1T xz x x x , a 1-D

problem. The temperature clearly vanishes at the points where the axes

intersect the circle, 0 1, 0; 0, 1 .T x z x z In between the extremal

values occur where the derivative vanishes

22 2 2

2

11 0

21

1 1 1 1, .

2 22 2MAX MIN

dT xx x z

dx x

T x z T x z

The former corresponds to the maximum on the circle, while the latter is the

minimum.

b) On the surface of the sphere, 2 2 2 1x y z , we have a 2-D problem that we

can write as 2 2 2 21 1 1, 1 1, 1T x z xz x z x z . In terms of

derivatives we have

2 2 2 2

2 2 2 2

0,0 0,0

2 0 2

0 0

2 0 2

2, 2 2

0, 0, 1 1.MAX

Tx z z x

T Txx z

T x zz x x z

z

T T T T

x z x z

T x z y

Thus we conclude that the temperature is a maximum (with value 1) at the 2

antipodal points 1y . We also know from part a) that on the corresponding

equator (y = 0), which is also part of the surface of the sphere, there are 2

points, 1 2x z , where the temperature takes on its minimum value

1 2T , but where these individual 2-D derivatives do not vanish.

Physics 227 Lecture 11 Appendix B 11 Autumn 2008

c) Finally consider the full surface and interior of the sphere. Now we have a 3-D

problem with 3 derivatives. We have

2 2 2

2 2 2

0, 2 0, 0

0, 2.

T T Tz y x

x y z

T T T

x z y

From this we conclude that there are no true extrema inside the sphere and that

the extrema must occur on the surface, i.e., we are back to the results of part b),

1MAXT , 1 2MINT .

§4.13: 2

Solution: Here we are back to finding the distance from a point, 0ˆ ˆ2r x y

, to a

line, 3x + 2y = 4, in 2-D. In part a) we use the previous geometry method. With the

line parallel to the vector ˆ ˆ2 3v x y

and going through the point 1ˆ ˆ0 2r x y

(by

inspection), we have

1 0 1 1 4

ˆ ˆ ˆ ˆ2 2 3 6 2 .13 13 13

r r vd x y x y

v

Now in b) we use the methods of Lagrange. We combine the distance from the point

and the line constraint to find the minimum of

2 22 1 3 2

32 2 3 0 2

2

2 1 2 0 1 .

F x y x y

Fx x

x

Fy y

y

Satisfying the equation for the line means

Physics 227 Lecture 11 Appendix B 12 Autumn 2008

3 13

3 2 2 1 8 42 2

12 142

8 13 13.

8 5131

13 13

x

y

Thus the distance from the point, as in a), is

2 212 8 144 64 208 4 13 4

.13 13 13 13 13 13

d

c) Finally let us consider the general case of the point 0 0,x y and the line ax by c .

Then the vector parallel to the line is ˆ ˆv bx ay

and a point on the line can be

chosen as 0,c b . Thus, using vector methods the distance can be written as

0 0

2 2

0 0 0 0

2 2 2 2

ˆ ˆ ˆ ˆ

,

x x c b y y bx ayd

a b

ax c by ax by c

a b a b

as desired. Using the same general expressions in the Lagrange multiplier case we

obtain the same result,

Physics 227 Lecture 11 Appendix B 13 Autumn 2008

2 2

0 0

0 0

0 0

0 0

0 0 2 2

0 0 0 0 0 02 2 2 2

2 22 2 0

0 0 0 02 2

2 02

2 02

2

2 2

,

F x x y y ax by

F ax x a x x

x

F by y b y y

y

ax by ca ba x b y c

a b

a bx x ax by c y y ax by c

a b a b

ax ba bd x x y y ax by c

a b

0

2 2.

y c

a b

§4.13: 9

Solution: Here we again practice using the chain rule and implicit differentiation.

Our starting point yields

3 3 2 2 2

2 2

2 2 3 6 6 6

.

3 3 6 6 6 6

dx dyx y t x y t

dt dtz xy

dx dyx y t x y

dt dt

Solving the 2 simultaneous equations for the derivatives of x and y we find

2

2 .

dx dx t yx xy t y

dt dt x x y

dy dy t xy xy t x

dt dt y y x

Thus the desired derivative is given by (assuming 0z )

Physics 227 Lecture 11 Appendix B 14 Autumn 2008

2 22 21

1 11 1 2

1 2 .

dz z dx z dy t y t xy x

dt x dt y dt x x y y y x

t x y x xy yy t y x t x

xy x y z z

x x t y y t t t x yz z

tx y

z

§4.13: 18

Solution: Now we want a minimum distance from the origin to the line defined by

the intersection of two planes. a) Using vector methods we find the direction of the

line of intersection by taking the cross product of the normal to the two planes. We

find

1 2

1 2

ˆ ˆ ˆ ˆˆ ˆ2 3 , 3 2

ˆ ˆ ˆ

ˆ ˆ ˆ2 3 1 6 1 3 4 2 9

3 1 2

ˆ ˆ ˆ7 .

N x y z N x y z

x y z

v N N x y z

x y z

By inspection the point (0,-3,-4) is on both planes and thus on the line of intersection.

Thus the distance from the origin is given by

ˆ ˆ ˆˆ ˆ ˆˆ ˆ3 4 1

0 3 4ˆ ˆ ˆ 3

1 1 1

1 1 16 9 26ˆ ˆ ˆ3 4 4 3 .

3 33

x y zy z x y z

dx y z

x y z

Physics 227 Lecture 11 Appendix B 15 Autumn 2008

b) Now consider solving this exercise using Lagrange multipliers, where here we

need 2 to ensure having a point on both planes. We want to find an extreme value of

2 2 2

1 2

1 2 1 2

1 2 1 2

1 2 1 2

2 3 3 2

3: 2 2 3 0

2

3 1: 2 3 0

2 2

1: 2 2 0 .

2

F x y z x y z x y z

Fx x x

x

Fy y y

y

Fz z z

z

The two equations for the planes tell us that

1 2 1 2 1 2 1 2

1 2 1 2 1 2 1 2

1 2

3 3 1 1 72 3 7 5

2 2 2 2 2

3 3 1 1 73 2 7 11

2 2 2 2 2

2 34, .

21 21

So finally we have (the same result)

2 51 7 3 17 2 1 34 5, ,

21 21 3 21 21 3 21 21 3

1 1 2649 4 25 78 .

3 3 3

x y z

d

Which approach is easier and quicker? In fact Mathematica is very handy here. See

the notebook.