ECE331 HW5 Soln
ECE331 HW5 Soln
x̂ − ŷz
âl = √ ,
1 + z2
and the gradient of V in Cartesian coordinates is given by Eq. (3.72):
P1 = (0, 3)
x
P2 = (−3, 0)
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 Z φ =180◦ h i ¯
E · dℓℓ = r̂ r(cos2 φ − sin2 φ ) − φ̂φ 2r sin φ cos φ · φ̂φ r d φ ¯
¯
P1 φ =90◦ r=3
Z 180◦
−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
n
E · ds = Ftop + Fbottom + Fright + Fleft + Ffront + Fback ,
Z 1 Z 1
x̂xz − ŷyz2 − ẑxy ¯z=1 · (ẑ dy dx)
¡ ¢¯
Ftop =
x=−1 y=−1
õ ¶¯1 !¯1
x2 y2 ¯¯
Z 1 Z 1 ¯
=− xy dy dx = = 0,
¯
¯
x=−1 y=−1 4 ¯
y=−1 ¯ x=−1
Z 1 Z 1
x̂xz − ŷyz2 − ẑxy ¯z=−1 · (−ẑ dy dx)
¡ ¢¯
Fbottom =
x=−1 y=−1
õ ¶¯1 !¯1
x2 y2 ¯¯
Z 1 Z 1 ¯
= xy dy dx = = 0,
¯
¯
x=−1 y=−1 4 ¯y=−1 ¯
x=−1
Z 1 Z 1
x̂xz − ŷyz2 − ẑxy ¯y=1 · (ŷ dz dx)
¡ ¢¯
Fright =
x=−1 z=−1
à µ ¶¯1 !¯1
xz3 ¯¯
Z 1 Z 1
2
¯ −4
=− z dz dx = − = ,
¯
¯
x=−1 z=−1 3 ¯
z=−1 ¯ 3
x=−1
Z 1 Z 1
x̂xz − ŷyz2 − ẑxy ¯
¡ ¢¯
Fleft = · (−ŷ dz dx) y=−1
x=−1 z=−1
à µ ¶¯1 !¯1
xz3 ¯¯
Z 1 Z 1 ¯ −4
=− z2 dz dx = − = ,
¯
¯
x=−1 z=−1 3 ¯
z=−1 ¯ 3
x=−1
Z 1 Z 1
x̂xz − ŷyz2 − ẑxy ¯x=1 · (x̂ dz dy)
¡ ¢¯
Ffront =
y=−1 z=−1
õ ¶¯1 !¯¯1
yz2 ¯¯
Z 1 Z 1
= z dz dy = = 0,
¯
¯
y=−1 z=−1 2 ¯z=−1 ¯
y=−1
Z 1 Z 1
x̂xz − ŷyz2 − ẑxy ¯x=−1 · (−x̂ dz dy)
¡ ¢¯
Fback =
y=−1 z=−1
õ ¶¯1 !¯¯1
yz2 ¯¯
Z 1 Z 1
= z dz dy = = 0,
¯
¯
y=−1 z=−1 2 ¯
z=−1 ¯ y=−1
−4 −4 −8
Z
n
E · ds = 0 + 0 + + +0+0 = .
3 3 3
(b)
ZZZ Z 1 Z 1 Z 1
∇·E dv = ∇·(x̂xz − ŷyz2 − ẑxy) dz dy dx
x=−1 y=−1 z=−1
Z 1 Z 1 Z 1
= (z − z2 ) dz dy dx
x=−1 y=−1 z=−1
à ¯1
µ µ 2 ¶¶¯1 !¯¯1
z3
¯
z ¯ ¯ −8
= xy − = .
¯ ¯ ¯
¯
2 3 ¯
z=−1 ¯
¯ 3
y=−1 ¯ x=−1
Problem 3.52 Verify Stokes’s theorem for the vector field B = (r̂r cos φ + φ̂φ sin φ )
by evaluating:
Z
(a) n
B · dl over the semicircular contour shown in Fig. P3.52(a), and
ZC
(b) × B) · ds over the surface of the semicircle.
(∇×
S
y y
2 L2 2
L3 L2
1
L4 L1
x 0 x
-2 L3 0 L1 2 1 2
(a) (b)
Solution:
(a)
Z Z Z Z
n
B · dl = B · dl + B · dl + B · dl,
L1 L2 L3
B · dl = (r̂r cos φ + φ̂φ sin φ ) · (r̂ dr + φ̂φr d φ + ẑ dz) = r cos φ dr + r sin φ d φ ,
Z µZ 2 ¶¯ µZ 0 ¶¯
r cos φ dr ¯¯ r sin φ d φ ¯¯
¯ ¯
B · dl = +
L1 r=0 φ =0, z=0 φ =0 z=0
¡ 1 2 ¢¯2
= 2 r ¯r=0 + 0 = 2,
Z µZ 2 ¶¯ µZ π ¶¯
r cos φ dr ¯¯ + r sin φ d φ ¯¯
¯ ¯
B · dl =
L 2 r=2 z=0 φ =0 r=2, z=0
π
= 0+ (−2 cos φ )|φ =0 = 4,
0 π
Z µZ ¶¯ µZ ¶¯
r cos φ dr ¯¯ r sin φ d φ ¯¯
¯ ¯
B · dl = +
L3 r=2 φ =π ,z=0 φ =π z=0
¢¯0
= − 21 r2 ¯r=2 + 0 = 2,
¡
Z
n
B · dl = 2 + 4 + 2 = 8.
(b)
−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 2y2
µ ¶
1 1
= ẑ 2 − − +
x + y2 (x2 + y2 )2 x2 + y2 (x2 + y2 )2
2(y2 − x2 )
= ẑ 2 6= 0.
(x + y2 )2
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.
(d) µ ¶
1 1
∇ (5e
2 −r
cos φ ) = 5e −r
cos φ 1 − − 2 .
r r
(e)
cos2 θ − sin2 θ
· µ ¶ ¸
2
∇ (10e
2 −R
sin θ ) = 10e −R
sin θ 1 − + .
R R2 sin θ