Electromagnetic Theory (v2) #27 | Problem Solving #04: Cylindrical & Spherical Gradient

Gradient

Instructor: Dr. Süleyman Burak ÇELİK

Fourth problem-solving episode of the EMT (v2) series. In #26 we computed the gradient of a scalar field in Cartesian coordinates. Today we extend it to cylindrical and spherical, where the formula picks up a 1/ρ factor on the φ term and a 1/r and 1/(r sinθ) on the θ and φ terms. Where do those factors come from? Arc length: a step of dφ in angle corresponds to ρ dφ in arc distance (cylindrical) or r sinθ dφ (spherical). The gradient asks for change per unit DISTANCE, so we must divide by the radius to convert from change per unit angle. Cylindrical example: f(ρ, φ, z) = sin(2φ) + z at P(2, π/6, 1). The ρ partial is zero (no ρ in f). The φ partial is 2cos(2φ); applying 1/ρ at P gives (1/2)·2·cos(π/3) = (1/2)·2·(1/2) = 1/2 — notice the 1/ρ factor explicitly produced the 1/2 in the answer, you cannot drop it. The z partial is 1. Result: ∇f|_P = 0 ρ̂ + (1/2) φ̂ + ẑ, |∇f| = √(5/4) = √5/2 ≈ 1.118. Spherical example: f(r, θ, φ) = r cosθ at P(2, π/3, π/4). Recognize this function: r cosθ = z, so f is just the Cartesian z-coordinate dressed up in spherical clothing — we already know ∇z = ẑ. The r partial is cosθ → 1/2 at P. The θ partial is -r sinθ; applying 1/r gives -sinθ → -√3/2. The φ partial is zero. Result: ∇f|_P = (1/2) r̂ - (√3/2) θ̂ + 0 φ̂, |∇f| = 1. Sanity check: expand ẑ in spherical basis → ẑ = cosθ r̂ - sinθ θ̂ → at θ = π/3 this is (1/2) r̂ - (√3/2) θ̂. Exactly what we got. Topics: 0:00 Cover 0:05 Concept: arc length intuition (why 1/ρ and 1/(r sinθ) appear) 1:44 Formulas: cylindrical and spherical gradient side by side 3:10 Cylindrical worked example: f = sin(2φ) + z 5:14 Spherical worked example: f = r cosθ + sanity check 7:53 Summary Key equations: • ∇f = (∂f/∂ρ) ρ̂ + (1/ρ)(∂f/∂φ) φ̂ + (∂f/∂z) ẑ (cylindrical) • ∇f = (∂f/∂r) r̂ + (1/r)(∂f/∂θ) θ̂ + (1/(r sinθ))(∂f/∂φ) φ̂ (spherical) • df = ∇f · dℓ (definition in any system) • Arc length: ρ dφ in cylindrical, r sinθ dφ in spherical (origin of the factors) Answers: cyl ∇f = (1/2) φ̂ + ẑ, |∇f| = √5/2 ≈ 1.118. sph ∇f = (1/2) r̂ - (√3/2) θ̂ = ẑ, |∇f| = 1. Reference: Sadiku, "Elements of Electromagnetics" 7th Ed, Chapter 3 (gradient section, cylindrical and spherical formulas)