Gradient Masahiro Yamamoto last update on February 9, 0 definition of grad The gradient of the scalar function φr) is defined by gradφ = φr) = i φ x + j φ y + k φ ) φ= φ=0 ) ) 3) 4) 5) uphill contour downhill Figure : Gradient of the scalar function φ in D case. The red vector is the unit vector i and the blue vector is the unit vector j. The x y axis is rotated by ) 0, ) 30, 3) 45, 4) 60, and 5) 90 degree in the clockwise direction, respectively. In ), φ = x, φ = i. In ), φ = 3 x y, φ = 3 i j. In 3), φ = x y, φ = i j. In 4), φ = x 3 y, φ = i 3 j. In 5), φ = y, φ = j. These all show the minus of the direction of the gradient is in the steepest descent one. Now we define that the line from r to r + dc is along the contour lined) or hypersurface 3D), then dφ = φr + dc) φr) = 0 ) dφ = φr) + dφ dc φr) = φ dc = 0 3) Then we showed that the gradient direction is normal to the contour line, i.e. the steepest descent direction. Next we define that the line from r to r + ds is along the steepest descent direction, dφ = φr + ds) φr) 4) = φr) + dφ ds φr) = φ ds = φ ds 5) dφ ds = φ 6) Then we showed the slope in the steepest descent direction is given by gradφ. The norm of the gradient is given by φ ) ) φ ) φ gradφ = + + 7) x y
vector field and potential Now we consider the electric field. The point-charge with charge q is moved in the electric filed Er). The force Fr) which act on the point-charge from the field is given by Fr) = qer), The energy difference from point to P is U P) = F ds = q E ds 8) Here ds is taken along the contour form to P. The potential φ is defined by If P is at r + ds and is at r Then we have φp ) φ) = U P) q = = E ds 9) φr + ds) φr) = dφ ds = φ ds = E ds 0) E = φ ) This means the electric field is along the steepest-descent direction of potential. If we remind that E = ρ/), we have Poisson equation div gradφ) = ρ φ = ρ ) 3) 3 D problem of Poisson equation When we know the charge density ρz) and ρ ) = dρ )/ = 0, we can calculate the potential φz) This equation satisfy the Poisson equation, because φz) = z z z )ρz ) 4) φz) = z z ρz ) + z z ρz ) 5) dφ = z ρz ) zρz) + zρz) = z ρz ) 6) d φ = ρz) 7) Here we used dr dq = ρz), = zρz), d d z z ρz ) = d [Rz) R )] = ρz) ρ ) = ρz) 8) z ρz ) = d [Qz) Q )] = zρz) )ρ ) = zρz) 9) In the same way when we know the charge density ρz) and ρ+ ) = dρ+ )/ = 0, φz) = + z z )ρz ) 0) z
4 gradient in curvlinear coordinate: In the curvlinear coordinate q = {q, q, q 3 } ) q = {x, y, z} : Cartesian coordinates ) q = {r, θ, z} : cylindircal coordinates 3) q = {r, θ, φ} : spherical coordinates 4) If we set x = xq, q, q 3 ), dx = x dq + x q dq + x dq 3 5) y = yq, q, q 3 ), dy = y dq + y q dq + y dq 3 6) z = zq, q, q 3 ), = dq + q dq + dq 3 7) 8) The distance ds between the two infinitesimal points is given by metric ds = dx + dy + = i,j g ij dq i dq j 9) g ij = x x + y y + 30) For orthogonal curvlinear coordinates such as cylinical and spherical coordinates g ij = 0, for i j 3) ) x ) y ) g ii = + + 33) ds = g dq dq + g dq dq + g 33 dq 3 dq 3 = ds + ds + ds 3 34) ds g dq h dq ds g dq h dq ds 3 g 33 dq 3 h 3 dq 3 3) 35) 36) 37) example : cylinical coordinates : x = r cos θ, y = r sin θ, z = z g = x x + y y + = cos θ + sin θ + 0 =, h = 38) g = x x θ + y y θ + = cos θ r sin θ) + sin θr cos θ) + 0 = 0 θ g 3 = x x + y y + = 0 + 0 + 0 = 0 g = x x θ + y y θ + = r sin θ) cos θ + r cos θ sin θ + 0 = 0 θ g = x x θ θ + y y θ θ + θ θ = r sin θ) + r cos θ) + 0 = r, h = r 39) g 3 = x x θ + y y θ + θ = 0 + 0 + 0 = 0 g 3 = x x + y y + = 0 + 0 + 0 = 0 g 3 = x x θ + y y θ + θ = 0 + 0 + 0 = r g 33 = x x + y y + = 0 + 0 + =, h 3 = 40) 3
example : spherical coordinates : x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ g = x x + y y + = sin θ cos φ + sin θ sin φ + cos θ =, h = 4) g = x x θ + y y θ + = sin θ cos φr cos θ cos φ) + sin θ sin φr cos θ sin φ) + cos θ r sin θ) = 0 θ g 3 = x x φ + y y φ + = sin θ cos φ r sin θ sin φ) + sin θ sin φr sin θ cos φ) + 0 = 0 φ g = x x θ + y y θ + θ = g = 0 g = x x θ θ + y y θ θ + θ θ = r cos θ cos φ) + r cos θ sin φ) + r sin θ) = r, h = r 4) g 3 = x x θ φ + y y θ φ + = r cos θ cos φ r sin θ sin φ) + r cos θ sin φr sin θ cos φ) + 0 = 0 θ φ g 3 = x x φ + y y φ + φ = g 3 = 0 g 3 = x x φ θ + y y φ θ + φ θ = g 3 = 0 g 33 = x x φ φ + y y φ φ + φ φ = r sin θ sin φ) + r sin θ cos φ) + 0 = r sin θ, h 3 = r sin θ 43) The differential distance vector and the unit vector e i may be given = 3 h dq e + h dq e + h 3 dq 3 e 3 = h i q i e i 44) i= e i = h i 45) Here we only consider orthogonal curvlinear coordinates such as cylinical coordinate and spherical coordinates. The gradient can be defined by the sum of the product of the slope rate of change) and the unit vector in the i-direction. The slope can be written as Then the gradient in the orthogonal curvlinear coordinates In the cartesian coordinates, In the cylinical coordinates, = 46) s i h i 47) grad q f = q f = e s + e s + e 3 s 48) = e h + e h q + e 3 h 3 49) e = h, e = h q, e 3 = h 3 50) q = {x, y, z}, r = x, y, z) 5) h =, x =, 0, 0), e =, 0, 0) = i 5) h =, y = 0,, 0), e = 0,, 0) = j 53) h 3 =, = 0, 0, ), e = 0, 0, ) = k 54) gradf = f = i x + j y + k ) f 55) q = {r, θ, z}, r = x, y, z) = r cos θ, r sin θ, z) 56) 4
= cos θ, sin θ, 0), h = cos = θ + sin θ =, e = cos θ, sin θ, 0) 57) = r sin θ, r cos θ, 0), h = θ θ cos = r θ + sin θ = r, e = sin θ, cos θ, 0)58) = 0, 0, ), h 3 = =, e 3 = 0, 0, ) 59) ) grad r,θ,z f = r,θ,z = e + e r θ + e 3 f 60) In the spherical coordinates, q = {r, θ, φ}, r = x, y, z) = r sin θ cos φ, r sin θ sin φ, r cos θ) 6) = sin θ cos φ, sin θ sin φ, cos θ), h = sin = θcos φ + sin φ) + cos θ =, e = sin θ cos φ, sin θ sin φ, cos θ) 6) = r cos θ cos φ, r cos θ sin φ, r sin θ), h = θ θ cos = r θcos φ + sin φ) + sin θ = r e = cos θ cos φ, cos θ sin φ, sin θ) 63) φ = r sin θ sin φ, r sin θ cos φ, 0), h 3 = φ sin = r θ sin φ + sin θ cos φ = r sin θ, e 3 = sin φ, cos φ, 0) 64) ) grad r,θ,φ f = r,θ,φ = e + e r θ + e 3 f 65) r sin θ φ 5