PHY 204 Electricity & Magnetism
Assignment 1
Due: 5PM, 25 September 2023
1. Consider the function f (x, y, z) = x2 y 2 z 3
(a) Find the gradient vector.
(b) At the point P (2, 1, −1), what is the direction of maximum change? What is the magnitude
of the maximum rate of change?
2. Consider the function f (x, y, z) = √ 1
x2 +y 2 +z 2
(a) A level surface is a three-dimensional surface such that every point on the surface has the
same function value. Draw a few level surfaces.
(b) Find the gradient vector. Draw the gradient vector for a few points on the level surfaces.
(c) Explain why the gradient vector is perpendicular to the level surface. Hint: what is df as
you move on the level surface? Relate this to the gradient vector.
3. (a) Find the divergence of the function:
v = s(2 + sin2 Φ)ŝ + (s sin Φ cos Φ)Φ̂ + (3z)ẑ
(b) Test the divergence theorem for this function, using the quarter-cylinder (radius 2, height
5) as shown in figure 1:
Figure 1: Quarter Cylinder
(c) Find the curl of v.
4. Check the divergence theorem for the function
v = (r2 cos θ)r̂ + (r2 cos ϕ)θ̂ − (r2 cos θ sin ϕ)ϕ̂
using as your volume one octant of the sphere of radius R (figure 2). Make sure you include
the entire surface.
5. Check Stokes’ theorem using the function v = ayx̂ˆ + bxŷ (a and b are constants) and the
circular path of radius R, centered at the origin in the xy plane.
Page 1 of 3
Figure 2: Octant of Sphere of Radius R
Figure 3: Triangular Path
6. Compute the line integral of
v = 6x̂ + yz 2 ŷ + (3y + z)ẑ
along the triangular path shown in figure 3. Check your answer using Stokes’ theorem.
7. Compute the line integral of
v = (rcos2 θ)r̂ − (rcosθsinθ)θ̂ + (3r)Φ̂ (1)
around the path shown in figure 4 (the points are labeled by their Cartesian coordinates). Do
it either in cylindrical or in spherical coordinates. Check your answer, using Stokes’ theorem.
Figure 4: Path
Page 2 of 3
8. The integral Z
a= da
S
is sometimes called the vector area of the surface S. If S happens to be flat, then |a| is the
ordinary (scalar) area, obviously.
(a) Find the vector area of a hemispherical bowl of radius R.
(b) Show that a = 0 for any closed surface.
(c) Show that a is the same for all surfaces sharing the same boundary.
(d) Show that I
1
a= r × dl
2
where the integral is around the boundary line. [Hint: One way to do it is to draw the
cone subtended by the loop at the origin. Divide the conical surface up into infinitesimal
triangular wedges, each with vertex at the origin and opposite side d⃗l, and exploit the
geometrical interpretation of the cross product.]
(e) Show that I
(c · r)dl = a × c,
for any constant vector c.
9. Show that:
(a) the divergence of a curl is always zero.
(b) the curl of a gradient is always zero.
10. Prove
∇ · (A × B) = B · (∇ × A) − A · (∇ × B)
11. A vector field A is conservative if ∇ × A = 0. Show that for two conservative fields A and B,
A × B has zero divergence.
12. We saw in the lectures via simulations that the divergence of the field at a point can be computed
by finding the flux of the vector field for a small region that encloses that point. In the limit
that this volume goes to zero, the flux divided by the volume gives the divergence. Use this
as a definition to derive, in Cartaesian coordinates, the formula for the divergence at a point
P(x,y,z).
Page 3 of 3