Lecture-2: Physics II: Electromagnetism
Lecture-2: Physics II: Electromagnetism
PH 1217 / PH 1218
Lecture-2
January-February 2026
From Cartesian to Curvilinear: Transformations
Given a point P with Cartesian coordinates (x, y, z), we can associate a unique
set of coordinates (u1 , u2 , u3 ) called Curvilinear Coordinates of P .
z
~r = xx̂ + y ŷ + z ẑ u3-curve
The goal is to write the line element d r ⃗ in terms of du1 , du2 and du3.
@x @x @x @y @y @y @z @z @z
dx = du1 + du2 + du3 ; dy = du1 + du2 + du3 ; dz = du1 + du2 + du3
@u1 @u2 @u3 @u1 @u2 @u3 @u1 @u2 @u3
Hence,
✓ ◆ ✓ ◆ ✓ ⌘
◆
@x @x @x @y @y @y @z @z @z
d~r = du1 + du2 + du3 x̂ + du1 + du2 + du3 ŷ + du1 + du2 + du3 zẑ̂
@u1 @u2 @u3 @u1 @u2 @u3 @u1 @u2 @u3
✓ ◆ ✓ ◆ ✓ ◆
@x @y @z @x @y @z @x @y @z
= x̂ + ŷ + ẑ du1 + x̂ + ŷ + ẑ du2 + x̂ + ŷ + ẑ du3
@u1 @u1 @u1 @u2 @u2 @u2 @u3 @u3 @u3
@~r @~r @~r
du1 du2 du3
@u1 @u2 @u3
where ê1 , ê2 , ê3 are unit vectors in the direction of increasing u1 , u2 , u3 .
h1 , h2 , h3 are called Scale Factors.
3
From Cartesian to Curvilinear: unit vectors
@~r @~r @~r
d~r = du1 + du2 + du3 = h1 ê1 du1 + h2 ê2 du2 + h3 ê3 du3
@u1 @u2 @u3
@~r @~r @~r
) h1 ê1 = ; h2 ê2 = ; h3 ê3 =
@u1 @u2 @u3
@~
r @~
r @~
r
The scale factors are therefore: h1 = | @u1
|; h 2 = | @u2 |; h 3 = | @u3 |
Unit vectors here are analogous to the unit vectors in cartesian coordinates but are unlike
them in that they may change directions from point to point.
Surface element: d ai ⃗ = hj duj eĵ × hk duk ek̂ = hj hk duj duk ϵjki eî
Look at the parallelepiped formed out of the vectors h1 du1 ê1 , h2 du2 ê2
h3 du3 ê3 : the volume element is given by:
Volume element: d⌧ = |(h1 du1 ê1 ).(h2 du2 ê2 ) ⇥ (h3 du3 ê3 )| = h1 h2 h3 du1 du2 du3 ,
dT (u1 , u2 , u3 ) =
@T
du1 +
@T
du2 +
@T
du3 . = α1 h1 du1 + α2 h2 du2 + α3 h3 du3
@u1 @u2 @u3
1 ∂T
After comparison, we get αi =
hi ∂ui
⃗
∇ = e1̂
1 ∂
+ e2̂
1 ∂
+ e3̂
1 ∂
This implies
h1 ∂u1 h2 ∂u2 h3 ∂u3
5
Divergence, Curl and Laplacian in Curvilinear Coordinates
Proceeding in a similar manner, one can check, after a few lines of calculations:
Quick Check
For Cartesian coordinates, h1 = h2 = h3 = 1 and ê1 = x̂, ê2 = ŷ, ê3 = ẑ. This
reduces the above expressions to the familiar expressions in Cartesian coordinate
where (u1 , u2 , u3 ) are replaced by (x, y, z).
6
Speci c examples:
Spherical Polar and Cylindrical Polar
fi
Spherical Polar Coordinates
• Cartesian coordinate of P : (x, y, z) z
• Position vector of P : ~r P
• Range of r: 0 r < 1
• Range of ✓: 0 ✓ ⇡
• Range of : 0
< 2⇡
• Transformations: x = r sin ✓ cos , y = r sin ✓ sin ,
and z = r cos ✓
• ~r = r sin ✓ cos x̂ + r sin ✓ sin ŷ + r cos ✓ẑ
p ⇣y⌘
p x2 + y 2
1 1
• Inverse transformations: r = x2 + y 2 + z 2 , ✓ = sin p , = tan
2 2
x +y +z 2 x
8
Spherical Polar Coordinates: Unit vectors and Scale factors
z
r̂
• ~r = r sin ✓ cos x̂ + r sin ✓ sin ŷ + r cos ✓ẑ
ˆ
Hence h1 ⌘ hr = | @~@r
r
| = 1, h 2 ⌘ h ✓ = | @~
r
@✓ | = r,
h3 ⌘ h = | @@~r | = r sin ✓ ✓ˆ
x
Unit vectors: y
@~
r
@r
ê1 ⌘ r̂ = @~
r
= sin ✓ cos x̂ + sin ✓ sin ŷ + cos ✓ẑẑ
@r
@~
r
ê2 ⌘ ✓ˆ = @✓
@~
r
= cos ✓ cos x̂ + cos ✓ sin ŷ sin ✓ẑ
@✓
@~r
ˆ= @ 1 @~r @~
r
ê3 ⌘ = sin x̂ + cos ŷ Recall that êi = hi @ui , where hi = | @u |.
@~r i
@
This shows that the unit vectors in spherical polar coordinates are dependent on position
The unit vectors r̂, ✓ˆ and ˆ are in the directions of increasing r, ✓ and
respectively.
9
Spherical Polar: Line, Volume and Surface elements
@~r @~r @~r
d~r = du1 + du2 + du3 = h1 ê1 du1 + h2 ê2 du2 + h3 ê3 du3
@u1 @u2 @u3
Therefore, for spherical polar d~r = r̂dr + rd✓✓ˆ + r sin ✓d ˆ 6= drr̂ + d✓✓ˆ + d ˆ
r sin ✓d
r rd✓ ✓ r
d✓ d
r sin ✓
10
Cylindrical Polar Coordinates z
• Cartesian coordinate of P : (x, y, z)
• Range of s: 0 s < 1
• Range of : 0
< 2⇡
• Range of z: 1<z<1
• Transformations: x = s cos , y = s sin , z = z
p y
1
• Inverse transformations: s = x2 + y 2 , = tan x , z=z
11
Cylindrical Polar Coordinates
ẑ
ˆ
ŝ As usual, the scale factors are given by:
h1 ⌘ hs = 1, h2 ⌘ h = s, h3 ⌘ hz = 1.
ŝŝ =
= cos x̂ + sin
sin ŷŷ
ˆˆ =
= sin x̂ + cos
cos ŷŷ
ẑ = ẑ
12
∂x ∂y ∂z
Take home exercises !
∂vz ∂v y
" !
∂vx ∂vz
" !
∂v y ∂vx
"
Curl : ∇×v = − x̂ + − ŷ + − ẑ
∂y ∂z ∂z ∂x ∂x ∂y
Find out the expressions for the gradient, divergence, curl and Laplacian in the
2 2 2
spherical polar coordinate
2 ∂ t
system∂ t ∂ t
Laplacian : ∇ t = 2
+ 2+ 2
∂x ∂y ∂z
Use already discussed definitions of gradient, divergence and curl in terms of
(h1, h2 , h3) dl = dr r̂ + r dθ θ̂ + r sin θ dφ φ̂; dτ = r 2 sin θ dr dθ dφ
Spherical.
∂t 1 ∂t 1 ∂t
Gradient : ∇t = r̂ + θ̂ + φ̂
∂r r ∂θ r sin θ ∂φ
1 ∂ 2 1 ∂ 1 ∂vφ
Divergence : ∇ · v = 2 (r vr ) + (sin θ vθ ) +
r ∂r r sin θ ∂θ r sin θ ∂φ
# $
1 ∂ ∂vθ
Curl : ∇×v = (sin θ vφ ) − r̂
r sin θ ∂θ ∂φ
# $ # $
1 1 ∂vr ∂ 1 ∂ ∂vr
+ − (r vφ ) θ̂ + (r vθ ) − φ̂
r sin θ ∂φ ∂r r ∂r ∂θ
! " ! " 2
2 1 ∂ 2 ∂t 1 ∂ ∂t 1 ∂ t
Laplacian : ∇ t= 2 r + 2 sin θ +
r ∂r ∂r r sin θ ∂θ ∂θ r 2 sin2 θ ∂φ 2
Cylindrical. dl = ds ŝ + s dφ φ̂ + dz ẑ; dτ = s ds dφ dz
13
Take home exercises
1
#
1 ∂vr ∂
$ #
1 ∂
$
∂vr
+ − (r vφ ) θ̂ + (r vθ ) − φ̂
r sin θ ∂φ ∂r r ∂r ∂θ
Find out the expressions for the gradient, divergence, curl and Laplacian in the
! " ! " 2
cylindrical polar coordinate system
1 ∂ 2 ∂t 1 ∂ ∂t 1 ∂ t
2
Laplacian : ∇ t = 2 r + 2 sin θ +
r ∂r ∂r r sin θ ∂θ ∂θ r 2 sin2 θ ∂φ 2
Use already discussed definitions of gradient, divergence and curl in terms of
(h1, h2 , h3)
Cylindrical. dl = ds ŝ + s dφ φ̂ + dz ẑ; dτ = s ds dφ dz
∂t 1 ∂t ∂t
Gradient : ∇t = ŝ + φ̂ + ẑ
∂s s ∂φ ∂z
1 ∂ 1 ∂vφ ∂vz
Divergence : ∇ · v = (svs ) + +
s ∂s s ∂φ ∂z
# $ # $ # $
1 ∂vz ∂vφ ∂vs ∂vz 1 ∂ ∂vs
Curl : ∇×v = − ŝ + − φ̂ + (svφ )− ẑ
s ∂φ ∂z ∂z ∂s s ∂s ∂φ
! " 2 2
2 1 ∂ ∂t 1 ∂ t ∂ t
Laplacian : ∇ t= s + 2 2+ 2
s ∂s ∂s s ∂φ ∂z
14
Line, Surface and Volume Integrals
which the most important are line (or path) integrals, surface integrals (or flux),
and volume integrals
Line Integrals
Line integral is an integral where the function to be integrated1.3 Integral Calculus
is evaluated along a path.
dl
b b
∫a,P
v ⋅ dl,
a
y
FIGURE 1.20
∮
If the path is closed loop v ⋅ dl, Line integrals are basically one
Example 1.6. Calculate
dimensional the line integr
integrals
from the point a = (1,!1, 0) to the point
in Fig. 1.21. What is v · dl for the lo
16 returns to a along (2)?
be our business in due course to characterize this special class of vectors. (A force
Line Integrals
that has this property is(Example)
called conservative.)
2 ̂
Calculate the line integral of the function v = y
Example 1.6. Calculate the line integral of the function
(i) x + 2x(y x̂ y+̂ from
v = +y 21) 2x(ythe ŷ a=(1,1,0) to
point
+ 1)
the point
from theb=(2,2,0)
point a =along
(1, 1,the paths
0) to (1) and
the point b=(2)(2,
shown
2, 0),inalong
the gure.
the paths (1) and (2)
!
in Fig. 1.21. What is v · dl for the loop that goes from a to b along (1) and
returns
(ii) to a along
Calculate (2)?closed line integral from a to b via path (1) and back from b to a via path (2)
also the
Solution
As always, dl = d x x̂ + dy ŷ + dz ẑ. Path (1) consists of two parts. Along the
“horizontal” segment, dy = dz = 0, so
2
" "2
(i) dl = d x x̂, y = 1, v · dl = y d x = d x, so v · dl = 1 d x = 1.
x 1 2 x
(b) Surface Integrals. A surface integral is an expression of the form
FIGURE
" 1.20 FIGURE 1.21
For a special class of vectors, it can become path independent
<latexit sha1_base64="NcEVgCfnx8G5tOXBaPapY1b1+Sg=">AAACMXicdVBNS1tBFJ2XatW0trEu3VwMhS7KY15K/NhJC8WlQqNCEsJ9k/t0yLyZYWaeEIJ/yU3/SenGRYu49U84eabQFr2rwzn3cM89uVXSB85vksaLpeWXK6trzVev19+8bW28O/GmcoJ6wijjznL0pKSmXpBB0Zl1hGWu6DSffJnrp5fkvDT6W5haGpZ4rmUhBYZIjVqHA22kHpMO8NU4QPCWhEQFQqH3YAq4JBGM8x9BBhCoISdhSgKL4QLmTku1fdRq87TLs/2dDHja6fL97qcIeMZ5Zw+ylNfTZos5GrV+DMZGVGX01rf6GbdhOEMXpFB01RxUniyKCZ5TP0KNJfnhrP74Ct5HZgxFTFyYGL1m/3bMsPR+WuZxs4xB/f/anHxK61eh2BvOpLZVIC0eDxWVgmBgXh+MpYt9qGkEKJyMWUFcoEMRYsnNWMKfT+F5cNJJs520e9xpH3xe1LHKttg2+8AytssO2CE7Yj0m2DX7yX6x38n35Ca5Te4eVxvJwrPJ/pnk/gHfP6oS</latexit>
v · da, (1.50)
integral is independent
S of path and is determined entirely by the end points. It will
be our business in due course to characterize this special class of vectors. (A force
where v is again some
that has Conservative
vector function,
this isvector
propertyand field
the integral
called is over a specified surface
conservative.)
S. Here da is an infinitesimal patch of area, with direction perpendicular to the
surface (Fig. 1.22). There are, of course, two18 directions perpendicular to any
2
ˆ ˆ
Conservative vector eld
ZZ bb ZZb b✓ Z b✓ ◆ ◆
~ @ @ @@ @ @
=
, ~
r .d~
F .d~r =r = ~x̂ +
r .d~r = ŷ + ẑ
x̂ .(dxx̂
+ ŷ + ẑ ŷ +.(dxx̂
+ dy dz ẑ) + dy ŷ + dz ẑ)
aa aa @x @y
a
@z
@x @y @z
Z b✓ Z b✓ ◆ ◆
@ @ @ @ @ @ Fundamental theorem for gradients.
= dx=+ dy + dx + dz dy + dz Will discuss later in detail.
a @x @y
a @x @z @y @z
Z b Z b
= d = =(b) (a) = (b)
d (a) Integral depends only on the end points,
a a but not on the path chosen.
19
fi
fi
fi
fi
fi
fi
Surface integrals
Surface integral is an expression of the form
∫S
v . da
∮
v . da
Closed surface integration gives the total or net ux through a closed surface
20
fi
fl
Elementary area on a surface
z
ẑ • Let S be a smooth surface: z = f (x, y).
n̂
To further specify the area, to make it an oriented one, we draw arrows that
run around the perimeter of the area in one of the two possible directions.
Area vector will point in the direction following the right hand thumb rule.
Only a planar area can be represented as a vector. Non-Planar areas like a
hemisphere can not be represented by a single vector.
The use of right hand rule in defining areas might remind you of the cross
product and indeed that is true as we will see soon.
Surface integrals (Example)
Closed Surface integral
Given a vector A ⃗ = 2xz x ̂ + 2zx ŷ − yz z,̂ calculate the closed surface integral of it over
the surface de ned by a cube. The cube occupies the space between 0 ≤ x, y, z, ≤ 1.
Solution
23
fi
Surface integrals (Example contd.)
24
Surface integrals (Example contd.)
25
Thank You
26
Supplementary slides
27
Example:
R
~ a, where A
Evaluate S A.d~ ~ = 18z x̂ 12ŷ + 3yẑ and S is that part of the plane
2x + 3y + 6z = 12 which is located in the first octant.
28
Example (contd.):
dxdy
Then n̂.ẑ = ( 27 x̂ + 37 ŷ + 67 ẑ).ẑ = 6
7 and |n̂.ẑ| = 76 dxdy.
The integral is a double integral and to do it, first keep x fixed and integrate
with respect to y from y = 0 (P in the figure) to y = 12 3 2x (Q in the figure);
then integrate [Link] x from x = 0 to x = 6.
Z 6 Z (12 2x)/3 Z 6
4x2
(6 2x)dxdy = (24 12x + )dx = 24
x=0 y=0 x=0 3
29
Spherical Polar Coordinates
Coordinate Surfaces:
Recall: coordinate surfaces were defined as surfaces obtained by keeping one of
the coordinates (either u1 or u2 or u3 constant) constant. Here (u1 , u2 , u3 ) =
(r, ✓, ).
z
P
~r
u=✓
y
v=
30
Spherical Polar Coordinates
z
Coordinate Curves:
Recall: coordinate curves were obtained by keeping two
coordinates fixed (intersection of u1 = c1 or u2 = c2 or
u3 = c3 surfaces).
Constant
lines Constant
r lines
31