HW #1 Solutions

advertisement
PHYS 301
HOMEWORK #1
Solutions
Due : 22 Jan 2016
Homework is due in class on the due date noted. Review carefully the syllabus for proper format
(complete, legible solutions; write on only one side of the paper, staple multiple sheets).
1. The transformation equations between the Cartesian and spherical polar coordinate systems are :
x = r sin Θ cos Φ
y = r sin Θ sin Φ
z = r cos Θ
where r is the distance from the origin, Θ is the polar angle and Φ is the azimuthal angle. Use these
equations to determine expressions for the total differentials dx, dy and dz in terms of r, Θ, Φ, dr, dΘ
and dΦ.
Solution : Recall from multivariable calculus that the total differential of a function of several
variables is :
df Hx, y, zL =
¶f
¶x
dx +
¶f
dy +
¶y
¶f
dz
¶z
Applying this definition to our transformation equations yields :
dx = sin Θ cos Φ dr + r cos Θ cos Φ dΘ - r sin Θ sin Φ dΦ
dy = sin Θ sin Φ dr + r cos Θ sin Φ dΘ + r sin Θ cos Φ dΦ
dz = cos Θ dr - r sin Θ dΘ
2. The Pythagorean theorem can be written in terms of the incremental distance between any two
points in space as :
ds2 = dx2 + dy2 + dz2
where ds is the differential distance between any two points. Use the expressions for dx, dy and dz
above to write ds2 in terms of spherical polar coordinates. What are the coefficients of the mixed
terms (dr dΘ, dr dΦ and dΘ dΦ)?
Solution : You can always plug and chug and combine terms. We can try a slightly more elegant
approach by realizing the square of a trinomial is :
Ha + b + cL2 = a2 + b2 + c2 + 2 Hab + ac + bcL
This tells us that three of our terms will involve the squares of the differntials, i.e., terms in HdrL2 ,
HdΘL2 and HdΦL2 , and these terms will be positive (since the square of a real number is always positive). You should find that the mixed terms all equal zero. As an example, let’s find the coefficient
for the dr dΘ ; multiplying appropriate factors we get:
2
phys301-2016hw1s.nb
This tells us that three of our terms will involve the squares of the differntials, i.e., terms in HdrL2 ,
HdΘL2 and HdΦL2 , and these terms will be positive (since the square of a real number is always positive). You should find that the mixed terms all equal zero. As an example, let’s find the coefficient
for the dr dΘ ; multiplying appropriate factors we get:
2 Isin Θ cos Φ × r cos Θ cos Φ + r sin Θ cos Θ sin2 Φ - r sin Θ cos ΘM dr dΘ
The expression in parentheses becomes :
r sin Θ cos Θ cos2 Φ + r sin Θ cos Θ sin2 Φ - r sin Θ cos Θ =
r sin Θ cos Θ - r sin Θ cos Θ = 0.
Expanding the other mixed terms and using trig identities will similarly produce mixed terms of
zero. Even though we have not formally started our study of Mathematica, let me write a short
Mathematica program that will demonstrate the utility and power of the language :
Clear@x,y,z,r,Θ,Φ,dx,dy,dzD
x = r Sin@ΘDCos@ΦD;
y = r Sin@ΘD Sin@ΦD;
z = r Cos@ΘD;
dx = D@x,rDdr+D@x,ΘDdΘ+D@x,ΦDdΦ;
dy=D@y,rDdr+D@y,ΘDdΘ+D@y,ΦDdΦ;
dz = D@z,rDdr+D@z,ΘDdΘ;
Collect@dx^2+dy^2+dz^2,8dr,dΘ,dΦ<,SimplifyD
dr2 + dΘ2 r2 + dΦ2 r2 Sin@ΘD2
The output line shows that the only surviving terms are the squares of the differentials, and that the
coefficients of these terms are 1, r2 and r2 sin2 Θ. This is actually a klunky way to write this code; as
we learn more about Mathematica I can show you more elegant approaches.
3. Consider the function
f = x2 + y2 + z2
Find :
aL Ñf Hgrad fL
bL Ñ × HÑfL Hdiv grad fL
cL Ñ ‰HÑfL Hcurl grad fL
Solution : We make use of the definitions of grad, div and curl in Cartesian coordinates :
aL Ñf =
¶f ` ¶f ` ¶f `
`
`
`
x+
y+
z = 2xx + 2yy +2zz = 2r
¶x
¶y
¶z
where r is the position vector.
b) If v is a vector with components in the x, y and z directions, then div v is :
bL Ñ × v =
¶vx
¶x
+
¶vy
¶y
+
¶vz
¶z
phys301-2016hw1s.nb
3
In our case, div (grad f) is :
¶
¶x
H2 xL +
¶
¶y
H2 yL +
¶
¶z
H2 zL = 6
c) The curl of a vector can be computed from the determinant :
`
`
`
x
y
z
Ñ ‰v = ¶  ¶x ¶  ¶y ¶  ¶z
vx
vy
vz
In the present case, the curl becomes :
`
`
`
x
y
z
Ñ ‰HÑfL = ¶  ¶x ¶  ¶y ¶  ¶z = 0
2x
2y
2z
We will learn that it is a general result that the curl of any gradient is zero; this result is important in
the study of vector fields.
4. Compute the line integral for the function
`
`
f = -y x + x y
`
`
along the circle of radius 3 centered on the origin. The symbols x and y indicate unit vectors in the
x and y directions respectively.
Solution : The line integral of a function around a contour is given by :
à f × dl
C
where we integrate the dot product of f and dl, and dl, the element of arc length, is written in Cartesian coordinates as :
`
`
`
dl = dx x + dy y + dz z
Since this integral lies in the x - y plane, z = dz = 0, so we have :
à Ifx dx + fy dyM
C
You should recall from multivariable calculus that when your contour is a circle, the best approach
is to use the parameterization :
x = r cos Θ
y = r sin Θ
Then, dx and dy become :
dx = - r sin Θ d Θ, dy = r cos Θ dΘ
(Remember that since our contour is a circle the radius is constant so that dr = 0.)With parameterization, the line integral becomes :
à f × dl = à
C
0
2Π
8-r sin Θ H-r sin Θ dΘL + r cos Θ Hr cos Θ dΘL< =
4
phys301-2016hw1s.nb
à
0
2Π
Ir2 sin2 Θ + r2 cos2 ΘM dΘ = à
2Π
r2 dΘ
0
Since r is constant along the circle, this simply yields the value 2 Π r2 . Since r = 3 in this case, the
line integral is 18Π.
Download