HW 5 solution

Problem 3.36 Find the gradient of the following scalar functions:
(a) T = 3/(x2 + z2 ),
(b) V = xy2 z4 ,
(c) U = z cos φ /(1 + r2 ),
(d) W = e−R sin θ ,
(e) S = 4x2 e−z + y3 ,
(f) N = r2 cos2 φ ,
(g) M = R cos θ sin φ .
Solution:
(a) From Eq. (3.72),
∇T = −x̂
6x
(x2 + z2 )2
− ẑ
6z
(x2 + z2 )2
.
(b) From Eq. (3.72),
∇V = x̂y2 z4 + ŷ2xyz4 + ẑ4xy2 z3 .
(c) From Eq. (3.82),
∇U = −r̂
2rz cos φ
(1 + r2 )2
− φ̂φ
cos φ
z sin φ
+ ẑ
.
2
r(1 + r )
1 + r2
(d) From Eq. (3.83),
∇W = −R̂e−R sin θ + θ̂θ(e−R /R) cos θ .
(e) From Eq. (3.72),
S = 4x2 e−z + y3 ,
∂S
∂S
∂S
∇S = x̂
+ ŷ
+ ẑ
= x̂8xe−z + ŷ3y2 − ẑ4x2 e−z .
∂x
∂y
∂z
(f) From Eq. (3.82),
N = r2 cos2 φ ,
∂N
∂N
1 ∂N
+ ẑ
∇N = r̂
+ φ̂φ
= r̂2r cos2 φ − φ̂φ2r sin φ cos φ .
∂r
r ∂φ
∂z
(g) From Eq. (3.83),
M = R cos θ sin φ ,
1 ∂M
cos φ
∂M
1 ∂M
+ φ̂φ
= R̂ cos θ sin φ − θ̂θ sin θ sin φ + φ̂φ
.
∇M = R̂
+ θ̂θ
∂R
R ∂θ
R sin θ ∂ φ
tan θ
Problem 3.40 For the scalar function V = xy2 − z2 , determine its directional
derivative along the direction of vector A = (x̂ − ŷz) and then evaluate it at
P = (1, −1, 4).
Solution: The directional derivative is given by Eq. (3.75) as dV /dl = ∇V · âl , where
the unit vector in the direction of A is given by Eq. (3.2):
x̂ − ŷz
âl = √
,
1 + z2
and the gradient of V in Cartesian coordinates is given by Eq. (3.72):
∇V = x̂y2 + ŷ2xy − ẑ2z.
Therefore, by Eq. (3.75),
y2 − 2xyz
dV
= √
.
dl
1 + z2
At P = (1, −1, 4),
µ
¶¯
9
dV ¯¯
= √ = 2.18 .
¯
dl (1,−1,4)
17
Problem 3.41 Evaluate the line integral of E = x̂ x − ŷ y along the segment P1 to P2
of the circular path shown in the figure.
y
P1 = (0, 3)
x
P2 = (−3, 0)
Solution: We need to calculate:
Z P2
P1
E · dℓℓ.
Since the path is along the perimeter of a circle, it is best to use cylindrical
coordinates, which requires expressing both E and dℓℓ in cylindrical coordinates.
Using Table 3-2,
E = x̂ x − ŷ y = (r̂ cos φ − φ̂φ sin φ )r cos φ − (r̂ sin φ + φ̂φ cos φ )r sin φ
= r̂ r(cos2 φ − sin2 φ ) − φ̂φ2r sin φ cos φ
The designated path is along the φ -direction at a constant r = 3. From Table 3-1, the
applicable component of dℓℓ is:
dℓℓ = φ̂φ r d φ .
Hence,
Z P2
P1
E · dℓℓ =
Z φ =180◦ h
φ =90◦
Z 180◦
¯
i
¯
r̂ r(cos2 φ − sin2 φ ) − φ̂φ 2r sin φ cos φ · φ̂φ r d φ ¯
r=3
¯
−2r2 sin φ cos φ d φ ¯r=3
=
90◦
¯ ◦ ¯
2 ¯180 ¯
¯
2 sin φ ¯
= −2r
= 9.
¯
2 ¯φ =90◦ ¯
r=3
Problem 3.46 For the vector field E = x̂xz − ŷyz2 − ẑxy, verify the divergence
theorem by computing:
(a) the total outward flux flowing through the surface of a cube centered at the
origin and with sides equal to 2 units each and parallel to the Cartesian axes,
and
(b) the integral of ∇ · E over the cube’s volume.
Solution:
(a) For a cube, the closed surface integral has 6 sides:
Z
E · ds = Ftop + Fbottom + Fright + Fleft + Ffront + Fback ,
n
Ftop =
Z 1
Z 1
x=−1 y=−1
=−
Z 1
Z 1
¡
¢¯
x̂xz − ŷyz2 − ẑxy ¯z=1 · (ẑ dy dx)
xy dy dx =
x=−1 y=−1
Fbottom =
Z 1
Z 1
=
Z 1
Z 1
Z 1
Z 1
x=−1 y=−1
õ
!¯1
¶¯1
¯
x2 y2 ¯¯
¯
¯
¯
4
y=−1 ¯
= 0,
x=−1
¡
¢¯
x̂xz − ŷyz2 − ẑxy ¯z=−1 · (−ẑ dy dx)
xy dy dx =
x=−1 y=−1
õ
!¯1
¶¯1
¯
x2 y2 ¯¯
¯
¯
4 ¯y=−1 ¯
= 0,
x=−1
¢¯
Fright =
x̂xz − ŷyz2 − ẑxy ¯y=1 · (ŷ dz dx)
x=−1 z=−1
à µ ¶¯1 !¯1
Z 1 Z 1
¯
xz3 ¯¯
¯
2
=−
z dz dx = −
¯
¯
3
x=−1 z=−1
z=−1 ¯
¡
x=−1
Fleft =
Z 1
Z 1
Ffront =
Z 1
Z 1
=
Z 1
Z 1
¡
¢¯
x̂xz − ŷyz2 − ẑxy ¯
=
−4
,
3
· (−ŷ dz dx)
à µ ¶¯1 !¯1
Z 1 Z 1
¯
−4
xz3 ¯¯
¯
=
z2 dz dx = −
=−
,
¯
¯
3
3
x=−1 z=−1
z=−1 ¯
x=−1 z=−1
y=−1
x=−1
y=−1 z=−1
y=−1 z=−1
¡
¢¯
x̂xz − ŷyz2 − ẑxy ¯x=1 · (x̂ dz dy)
z dz dy =
õ
¶¯1 !¯¯1
yz2 ¯¯
¯
¯
2 ¯z=−1 ¯
y=−1
= 0,
Fback =
Z 1
Z 1
=
Z 1
Z 1
y=−1 z=−1
¡
¢¯
x̂xz − ŷyz2 − ẑxy ¯x=−1 · (−x̂ dz dy)
z dz dy =
y=−1 z=−1
Z
E · ds = 0 + 0 +
n
õ
¶¯1 !¯¯1
yz2 ¯¯
¯
¯
¯
2
z=−1 ¯
= 0,
y=−1
−8
−4 −4
+
+0+0 =
.
3
3
3
(b)
ZZZ
∇·E dv =
=
Z 1
Z 1
Z 1
x=−1 y=−1 z=−1
Z 1 Z 1 Z 1
x=−1 y=−1 z=−1
Ã
=
∇·(x̂xz − ŷyz2 − ẑxy) dz dy dx
(z − z2 ) dz dy dx
¯1
¯
¯
¯
¯
y=−1 ¯
¶¶¯1 !¯¯1
µ µ 2
¯
z3
z
¯
¯
−
xy
¯
¯
2
3
z=−1 ¯
x=−1
=
−8
.
3
Problem 3.52 Verify Stokes’s theorem for the vector field B = (r̂r cos φ + φ̂φ sin φ )
by evaluating:
Z
(a)
B · dl over the semicircular contour shown in Fig. P3.52(a), and
n
ZC
(b)
S
× B) · ds over the surface of the semicircle.
(∇×
y
2
y
2
L2
1
-2 L3
0 L1
(a)
x
2
0
L2
L3
L4
L1
1
2
x
(b)
Figure P3.52: Contour paths for (a) Problem 3.52 and
(b) Problem 3.53.
Solution:
(a)
Z
B · dl =
n
Z
L1
B · dl +
Z
L2
B · dl +
Z
L3
B · dl,
B · dl = (r̂r cos φ + φ̂φ sin φ ) · (r̂ dr + φ̂φr d φ + ẑ dz) = r cos φ dr + r sin φ d φ ,
µZ 2
µZ 0
¶¯
¶¯
¯
¯
r cos φ dr ¯¯
B · dl =
+
r sin φ d φ ¯¯
r=0
L1
φ =0
φ =0, z=0
z=0
¡ 1 2 ¢¯2
= 2 r ¯r=0 + 0 = 2,
¶¯
¶¯
µZ π
µZ 2
Z
¯
¯
r sin φ d φ ¯¯
B · dl =
r cos φ dr ¯¯ +
L
φ =0
r=2
Z
2
Z
L3
Z
= 0+
µZ
B · dl =
z=0
π
(−2 cos φ )|φ =0 = 4,
¶¯
0
¯
+
r cos φ dr ¯¯
r=2
φ =π ,z=0
¡
¢¯0
= − 21 r2 ¯r=2 + 0 = 2,
B · dl = 2 + 4 + 2 = 8.
n
r=2, z=0
π
¶¯
¯
r sin φ d φ ¯¯
φ =π
µZ
z=0
(b)
∇×B = ∇×(r̂r cos φ + φ̂φ sin φ )
µ
¶
µ
¶
1 ∂
∂
∂
∂
= r̂
0 − (sin φ ) + φ̂φ
(r cos φ ) − 0
r ∂φ
∂z
∂z
∂r
¶
µ
∂
1 ∂
(r cos φ )
(r(sin φ )) −
+ ẑ
r ∂r
∂φ
¶
µ
1
1
= r̂0 + φ̂φ0 + ẑ (sin φ + (r sin φ )) = ẑ sin φ 1 +
,
r
r
µ
¶¶
ZZ
Z π Z 2 µ
1
∇×B · ds =
· (ẑr dr d φ )
ẑ sin φ 1 +
r
φ =0 r=0
Z π Z 2
³¡
¢¯2 ´¯¯π
sin φ (r + 1) dr d φ = − cos φ ( 12 r2 + r) ¯r=0 ¯
=
φ =0 r=0
φ =0
= 8.
Problem 3.56 Determine if each of the following vector fields is solenoidal,
conservative, or both:
(a) A = x̂x2 − ŷy2xy,
(b) B = x̂x2 − ŷy2 + ẑ2z,
(c) C = r̂(sin φ )/r2 + φ̂φ(cos φ )/r2 ,
(d) D = R̂¡/R,
¢
r
+ ẑz,
(e) E = r̂ 3 − 1+r
(f) F = (x̂y + ŷx)/(x2 + y2 ) ,
(g) G = x̂(x2 + z2 ) − ŷ(y2 + x2 ) − ẑ(y2 + z2 ),
(h) H = R̂(Re−R ).
Solution:
(a)
∇·A = ∇·(x̂x2 − ŷ2xy) =
∂ 2 ∂
x − 2xy = 2x − 2x = 0,
∂x
∂y
∇×A = ∇×(x̂x2 − ŷ2xy)
¶
µ
¶
µ
¶
µ
∂
∂
∂ 2
∂
∂
∂ 2
0 − (−2xy) + ŷ
(x ) − 0 + ẑ
(−2xy) − (x )
= x̂
∂y
∂z
∂z
∂x
∂x
∂y
= x̂0 + ŷ0 − ẑ(2y) 6= 0 .
The field A is solenoidal but not conservative.
(b)
∇·B = ∇·(x̂x2 − ŷy2 + ẑ2z) =
∂ 2 ∂ 2 ∂
x − y + 2z = 2x − 2y + 2 6= 0,
∂x
∂y
∂z
∇×B = ∇×(x̂x2 − ŷy2 + ẑ2z)
¶
µ
¶
µ
∂
∂
∂ 2
∂
(2z) − (−y2 ) + ŷ
(x ) − (2z)
= x̂
∂y
∂z
∂z
∂x
¶
µ
∂
∂
(−y2 ) − (x2 )
+ ẑ
∂x
∂y
= x̂0 + ŷ0 + ẑ0.
The field B is conservative but not solenoidal.
(c)
µ
¶
sin φ
cos φ
∇·C = ∇· r̂ 2 + φ̂φ 2
r
r
µ µ
¶¶
¶
µ
∂
1 ∂
1 ∂
sin φ
cos φ
=
r
+
+ 0
2
2
r ∂r
r
r ∂φ
r
∂z
−2 sin φ
− sin φ − sin φ
+
+0 =
,
=
r3
r3
r3
¶
µ
cos φ
sin φ
∇×C = ∇× r̂ 2 + φ̂φ 2
r
r
µ
µ
¶¶
µ µ
¶
¶
1 ∂
∂ cos φ
∂ sin φ
∂
φ
= r̂
+
φ̂
−
0
0−
r ∂φ
∂z
r2
∂z
r2
∂r
µ µ µ
¶¶
¶¶
µ
∂
1 ∂
cos φ
sin φ
+ ẑ
r
−
2
r ∂r
r
∂φ
r2
µ µ
¶ µ
¶¶
1
−2 cos φ
cos φ
cos φ
φ
= r̂0 + φ̂ 0 + ẑ
−
−
= ẑ
.
r
r2
r2
r3
The field C is neither solenoidal nor conservative.
(d)
à !
µ µ ¶¶
∂
∂
1
1 ∂
1
1
1
R̂
= 2
R2
+
∇·D = ∇·
(0 sin θ ) +
0= 2 ,
R
R ∂R
R
R sin θ ∂ θ
R sin θ ∂ φ
R
à !
R̂
∇×D = ∇×
R
µ
µ ¶
¶
¶
µ
1
1
1
∂
∂
∂
1 ∂
= R̂
(0 sin θ ) −
0 + θ̂θ
(R(0))
−
R sin θ ∂ θ
∂φ
R sin θ ∂ φ R
∂R
µ ¶¶
µ
1
∂
1 ∂
+ φ̂φ
(R(0)) −
= r̂0 + θ̂θ0 + φ̂φ0.
R ∂R
∂θ R
The field D is conservative but not solenoidal.
(e)
µ
¶
r
E = r̂ 3 −
+ ẑz,
1+r
1 ∂
1 ∂ Eφ ∂ Ez
+
∇·E =
(rEr ) +
r ∂r
r ∂φ
∂z
µ
¶
2
1 ∂
r
=
3r −
+1
r ∂r
1+r
¸
·
r2
1
2r
+1
+
=
3−
r
1 + r (1 + r)2
·
¸
1 3 + 3r2 + 6r − 2r − 2r2 + r2
2r2 + 4r + 3
=
+ 1 6= 0,
+
1
=
r
(1 + r)2
r(1 + r)2
¶
µ
¶
µ
µ
¶
1 ∂ Er
∂ Er ∂ Ez
1 ∂
1 ∂ Ez ∂ Eφ
−
−
(rEφ ) −
+ φ̂φ
+ ẑ
∇ × E = r̂
= 0.
r ∂φ
∂z
∂z
∂r
r ∂r
r ∂φ
Hence, E is conservative, but not solenoidal.
(f)
x̂y + ŷx
y
x
= x̂ 2
+ ŷ 2
,
2
2
2
x +y
x +y
x + y2
¶
¶
µ
µ
∂
∂
y
x
+
∇·F =
2
2
2
∂x x +y
∂ y x + y2
−2xy
−2xy
= 2
+
6= 0,
(x + y2 )2 (x2 + y2 )2
µ
¶
µ
¶¸
·
∂
∂
x
y
−
∇ × F = x̂(0 − 0) + ŷ(0 − 0) + ẑ
∂ x x2 + y2
∂ y x2 + y2
¶
µ
2x2
1
2y2
1
−
−
+
= ẑ 2
x + y2 (x2 + y2 )2 x2 + y2 (x2 + y2 )2
2(y2 − x2 )
6= 0.
= ẑ 2
(x + y2 )2
F=
Hence, F is neither solenoidal nor conservative.
(g)
G = x̂(x2 + z2 ) − ŷ(y2 + x2 ) − ẑ(y2 + z2 ),
∂ 2 2
∂
∂
∇·G =
(x + z ) − (y2 + x2 ) − (y2 + z2 )
∂x
∂y
∂z
= 2x − 2y − 2z 6= 0,
µ
¶
µ
¶
∂ 2 2
∂ 2
∂ 2 2
∂ 2 2
2
∇ × G = x̂ − (y + z ) + (y + x ) + ŷ
(x + z ) +
(y + z )
∂y
∂z
∂z
∂x
¶
µ
∂ 2
∂ 2 2
2
(x + z )
+ ẑ − (y + x ) −
∂x
∂y
= −x̂ 2y + ŷ 2z − ẑ 2x 6= 0.
Hence, G is neither solenoidal nor conservative.
(h)
H = R̂(Re−R ),
1 ∂
1
∇·H = 2
(R3 e−R ) = 2 (3R2 e−R − R3 e−R ) = e−R (3 − R) 6= 0,
R ∂R
R
∇ × H = 0.
Hence, H is conservative, but not solenoidal.
Problem 3.57 Find the Laplacian of the following scalar functions:
(a) V = 4xy2 z3 ,
(b) V = xy + yz + zx,
(c) V = 3/(x2 + y2 ),
(d) V = 5e−r cos φ ,
(e) V = 10e−R sin θ .
Solution:
(a) From Eq. (3.110), ∇2 (4xy2 z3 ) = 8xz3 + 24xy2 z.
(b) ∇2 (xy + yz + zx) = 0.
(c) From the inside back cover of the book,
¶
µ
12
3
2
= ∇2 (3r−2 ) = 12r−4 =
.
∇
2
2
x +y
(x2 + y2 )2
(d)
∇ (5e
2
−r
cos φ ) = 5e
−r
(e)
∇ (10e
2
−R
sin θ ) = 10e
−R
¶
µ
1 1
cos φ 1 − − 2 .
r r
µ
¸
·
¶
2
cos2 θ − sin2 θ
.
sin θ 1 −
+
R
R2 sin θ