Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 ·...

27
Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest, the most universal and the most important. There are some situations for which the Cartesian coordinate sys- tem is not entirely ideal. These typically involve scalar or vector fields which exhibit some kind of inherent symmetry. The cylindrical and spherical coordinate systems are designed for just this purpose. Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 1/27

Transcript of Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 ·...

Page 1: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Cylindrical and Spherical Coordinates

The Cartesian coordinate system is by far the simplest, the mostuniversal and the most important.

There are some situations for which the Cartesian coordinate sys-tem is not entirely ideal.

These typically involve scalar or vector fields which exhibit somekind of inherent symmetry.

The cylindrical and spherical coordinate systems are designed forjust this purpose.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 1/27

Page 2: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Polar coordinates

The point A is represented by (r, θ), which has a very differentinterpretation from the Cartesian pair (x, y).

While −∞ < x <∞ and −∞ < y <∞, the polar coordinatesobey

0 ≤ r <∞, 0 ≤ θ < 2π.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 2/27

Page 3: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Polar coordinates (cont.)

The Cartesian and polar coordinates are related as

x = r cos θ, y = r sin θ.

Thus, in terms of the Cartesian basis, any point in R2 can berepresented as

v(r, θ) = r cos θ i + r sin θ j.

Conversely,

r =√x2 + y2

and

θ =

arctan(y/x), x > 0, y > 0,

π + arctan(y/x), x < 0, y ∈ R,2π + arctan(y/x), x > 0, y < 0.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 3/27

Page 4: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Standard vectors

Any v ∈ R2 can be represented in terms of the standard Carte-sian unit vectors i and j as v = x i + y j.

What are the “standard” vectors which are better suited to polarcoordinates?

To answer this question, for A with coordinates (r0, θ0), we definethe following two paths:

γ1(r) := v(r, θ0) = r cos θ0 i + r sin θ0 j

andγ2(θ) := v(r0, θ) = r0 cos θ i + r0 sin θ j.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 4/27

Page 5: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Standard vectors (cont.)

The tangent vectors at (r0, θ0) aregiven by

γ(1)1 (r0) =

dγ1(r)

dr

∣∣∣r=r0

γ(1)2 (θ0) =

dγ2(θ)

∣∣∣θ=θ0

Thus, after normalization, we obtain the two standard vectors

er(r0, θ0) :=γ(1)1 (r0)

‖γ(1)1 (r0)‖= cos θ0 i + sin θ0 j

eθ(r0, θ0) :=γ(1)2 (θ0)

‖γ(1)2 (θ0)‖= − sin θ0 i + cos θ0 j

The pair of orthogonal basis vectors {er(r0, θ0), eθ(r0, θ0)} is cal-led the coordinate frame at the point A.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 5/27

Page 6: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Coordinate frame

Notice that {er(r, θ), eθ(r, θ)} change direction as the point (r, θ)moves, so that we have a moving coordinate frame.

This is in direct contrast to the Cartesian unit basis vectors {i, j}which are constant throughout R2.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 6/27

Page 7: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Riemannian scale functions

How does length changes when we change the polar coordinates?

When “moving” from A to B, theEuclidean distance is defined by

(ds)2 = (dx)2 + (dy)2.

At the same time, in the polar co-ordinates, ds is equal to

(ds)2 = (dr)2 + r2(dθ)2 =

= [hr(r, θ)dr]2 + [hθ(r, θ)dθ]

2,

where

hr(r, θ) := 1, hθ(r, θ) = r

are the Riemann scale functions.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 7/27

Page 8: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Cylindrical coordinates

Let (r, θ) be the polar coordinates of the point B.

Then the triplet of real numbers (r, θ, z) (with z ∈ R) completelyspecifies the point A.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 8/27

Page 9: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Cylindrical coordinates (cont.)

If A is given by the cylindrical coordinates (r, θ, z) then, in termsof the Cartesian basis {i, j, k}, it must be given by the vector

v(r, θ, z) = r cos(θ) i + r sin(θ) j + z k.

To find the standard coordinate frame, we define three curves re-presented by the following paths:

γ1(r) := v(r, θ0, z0) = r cos(θ0) i + r sin(θ0) j + z0 k, ∀r ∈ (−∞, 0],

γ2(θ) := v(r0, θ, z0) = r0 cos(θ) i + r0 sin(θ) j + z0 k, ∀θ ∈ [0, 2π),

γ3(z) := v(r0, θ0, z) = r0 cos(θ0) i + r0 sin(θ0) j + z k, ∀z ∈ R.

Next, we compute the tangent vectors γ(1)1 (r0), γ

(1)2 (θ0), and

γ(1)3 (z0), followed by their normalization to obtain er(r0, θ0, z0),

eθ(r0, θ0, z0), and ez(r0, θ0, z0), respectively.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 9/27

Page 10: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Cylindrical coordinates (cont.)

The cylindrical coordinate frame isdefined by

er(r, θ, z) = cos θ i + sin θ j + 0k,

eθ(r, θ, z) = − sin θ i + cos θ j + 0k,

ez(r, θ, z) = 0 i + 0 j + 1k.

One can see that the unit vectors are orthogonal with respect toeach other.

Also, the triplet of vectors constitutes a moving coordinate frame.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 10/27

Page 11: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Cylindrical coordinates (cont.)

Due to a small “permutation” thelength ds can be defined as follows.

(ds)2 = (length AB)2 = (length AD)2+

+(length AC)2 + (length AE)2 =

= (dr)2 + r2(dθ)2 + (dz)2.

Alternatively, we can write

(ds)2 = [hr(r, θ, z)dr]2 + [hθ(r, θ, z)dθ]

2 + [hz(r, θ, z)dz]2,

wherehr(r, θ, z) := 1, hθ(r, θ, z) := r, hz(r, θ, z) := 1

are the Riemannian scale functions.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 11/27

Page 12: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Spherical coordinates

The radial length of the vector from the origin O to point A isρ =

√x2 + y2 + z2.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 12/27

Page 13: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Spherical coordinates (cont.)

The Cartesian coordinates (x, y, z) are given in terms of thespherical coordinates (ρ, θ, φ) by

x = ρ sinφ cos θ, y = ρ sinφ sin θ, z = ρ cosφ,

with ρ ∈ [0,∞), θ ∈ [0, 2π), and φ ∈ [0, π].

Then, in terms of the Cartesian basis {i, j,k}, any point A withcoordinates (ρ, θ, φ) can be expressed as

v(ρ, θ, φ) = ρ sinφ cos θ i + ρ sinφ sin θ j + ρ cosφk.

This shows how the Cartesian representation of a point changeswhen we change its spherical coordinates.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 13/27

Page 14: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Spherical coordinates (cont.)

To define a moving (orthonormal) frame, we start with

γ1(ρ) = v(ρ, θ0, φ0) = ρ sinφ0 cos θ0 i + ρ sinφ0 sin θ0 j + ρ cosφ0 k,

γ2(θ) = v(ρ0, θ, φ0) = ρ0 sinφ0 cos θ i + ρ0 sinφ0 sin θ j + ρ0 cosφ0 k,

γ3(φ) = v(ρ, θ0, φ) = ρ0 sinφ cos θ0 i + ρ0 sinφ sin θ0 j + ρ0 cosφk.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 14/27

Page 15: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Spherical coordinates (cont.)

The corresponding tangent vectors at (ρ0, θ0, φ0) are given by

γ(1)1 (ρ0) =

dγ1(ρ)

∣∣∣ρ0, γ

(1)2 (θ0) =

dγ2(θ)

∣∣∣θ0, γ

(1)3 (φ0) =

dγ3(φ)

∣∣∣φ0

.

Normalizing the tangent vectors results in the spherical coordi-nate frame {eρ, eθ, eφ} which are

eρ(ρ, θ, φ) = sinφ cos θ i + sinφ sin θ j + cosφk,

eθ(ρ, θ, φ) = − sin θ i + cos θ j + 0k,

eφ(ρ, θ, φ) = cosφ cos θ i + cosφ sin θ j− sinφk,

under the replacement of the generic (i.e., “naughted”) sphericalcoordinates (ρ0, θ0, φ0) with (ρ, θ, φ) (to simplify the notations).

One can check that the unit vectors indeed orthogonal w.r.t. eachother.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 15/27

Page 16: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Spherical coordinates (cont.)

Suppose a point A is given by v(ρ, θ, φ), while a close-by point Bis given by (ρ+ dρ, θ + dθ, φ+ dφ).

Let’s find an expression of ds in terms of (ρ, θ, φ).

Formally we have

(ds)2 = (length AB)2 =

= ‖v(ρ+ dρ, θ + dθ, φ+ dφ)

− v(ρ, θ, φ)‖2

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 16/27

Page 17: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Spherical coordinates (cont.)

First we note that

v(ρ+ dρ, θ + dθ, φ+ dφ)− v(ρ, θ, φ) =

=∂v

∂ρ(ρ, θ, φ)dρ+

∂v

∂θ(ρ, θ, φ)dθ +

∂v

∂φ(ρ, θ, φ)dφ =

= (dρ) eρ(ρ, θ, φ) + (ρ sinφdθ) eθ(ρ, θ, φ) + (ρ dφ) eφ(ρ, θ, φ).

Thus, we have

(ds)2 = (dρ)2 + (ρ sinφ)2(dθ)2 + (ρ)2(dφ)2,

or, alternatively (in the Riemannian form),

(ds)2 = (hρ(ρ, θ, φ)dρ)2 + (hθ(ρ, θ, φ)dθ)2 + (hφ(ρ, θ, φ)dφ)2,

with the Riemannian scaling functions defined as

hρ(ρ, θ, φ) := 1, hθ(ρ, θ, φ) := ρ sinφ, hφ(ρ, θ, φ) := ρ.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 17/27

Page 18: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Differential operators

Let F : R3 → R3 be a C1-vector field.

The divergence of F is defined as

div F(x, y, z) =∂F1

∂x(x, y, z) +

∂F2

∂y(x, y, z) +

∂F3

∂z(x, y, z),

for all (x, y, z) in R3.

Alternatively, we can write

div F = ∇ · F,

where ∇ := (∂/∂x) i + (∂/∂y) j + (∂/∂z)k.

The gradient operator ∇ is of fundamental importance, since allthe other operators (viz., divergence, curl, and Laplacian) are de-fined by it.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 18/27

Page 19: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Gradient in cylindrical coordinates

Recall that the cylindrical coordinate frame is defined as

er(r, θ, z) = cos θ i + sin θ j + 0k (= cos θ i + sin θ j),

eθ(r, θ, z) = − sin θ i + cos θ j + 0k (= − sin θ i + cos θ j),

ez(r, θ, z) = 0 i + 0 j + 1k (= k).

By simple manipulations, we obtain

i = cos θ er − sin θ eθ,

j = sin θ er + cos θ eθ,

k = ez.

Next, we are going to substitute the above into

∇ =∂

∂xi +

∂yj +

∂zk.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 19/27

Page 20: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Gradient in cylindrical coordinates (cont.)

The substitution yields

∇ =

(∂

∂r

∂r

∂x+

∂θ

∂θ

∂x+

∂z

∂z

∂x

)[cos θ er − sin θ eθ] +

+

(∂

∂r

∂r

∂y+

∂θ

∂θ

∂y+

∂z

∂z

∂y

)[sin θ er + cos θ eθ] +

+

(∂

∂r

∂r

∂z+

∂θ

∂θ

∂z+

∂z

∂z

∂z

)[ez] .

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 20/27

Page 21: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Gradient in cylindrical coordinates (cont.)

The substitution yields

∇ =

∂r

∂r

∂x︸︷︷︸cos θ

+∂

∂θ

∂θ

∂x︸︷︷︸− sin θ/r

+∂

∂z

∂z

∂x︸︷︷︸0

[cos θ er − sin θ eθ] +

+

∂r

∂r

∂y︸︷︷︸sin θ

+∂

∂θ

∂θ

∂y︸︷︷︸cos θ/r

+∂

∂z

∂z

∂y︸︷︷︸0

[sin θ er + cos θ eθ] +

+

∂r

∂r

∂z︸︷︷︸0

+∂

∂θ

∂θ

∂z︸︷︷︸0

+∂

∂z

∂z

∂z︸︷︷︸1

[ez] .

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 21/27

Page 22: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Gradient in cylindrical coordinates (cont.)

After a few trivial steps, we obtain

∇ =∂

∂rer +

1

r

∂θeθ +

∂zez.

Let f(ρ, θ, φ) be a C1-scalar field. Then

∇f(ρ, θ, φ) =∂f

∂r(r, θ, z) er +

1

r

∂f

∂θ(r, θ, z) eθ +

∂f

∂z(r, θ, z) ez.

Using the above definition, we can now work out ∇·, ∇×, and ∆for any given field.

In doing so, it will be important to remember that the cylindricalcoordinate frame is not constant.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 22/27

Page 23: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Divergence in cylindrical coordinates

Given a vector field

F(r, θ, z) = F1(r, θ, z) er + F2(r, θ, z) eθ + F3(r, θ, z) ez,

consider its divergence

∇ · F =

(∂

∂rer +

1

r

∂θeθ +

∂zez

)· (F1 er + F2 eθ + F3 ez) .

Note that “opening the brackets” yields a total of nine terms.

To compute these terms, we do the differentiation first and thenthe dot (or cross) product.

Let’s look at some specific cases.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 23/27

Page 24: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Divergence in cylindrical coordinates (cont.)

(∂

∂rer

)· (F1 er) = er ·

∂r(F1 er) = er ·

(∂F1

∂rer + F1

∂er∂r

)=

=∂F1

∂rer · er + F1er · 0 =

∂F1

∂r.

(1

r

∂θeθ

)· (F1 er) = eθ

1

r· ∂∂θ

(F1 er) = eθ1

∂F1

∂θer + F1

∂er∂θ︸︷︷︸eθ

=F1

r.

(1

r

∂θeθ

)· (F2 eθ) = eθ

1

r· ∂∂θ

(F2eθ) = eθ1

∂F2

∂θeθ + F2

∂eθ∂θ︸︷︷︸−er

=1

r

∂F2

∂θ.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 24/27

Page 25: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Divergence, curl and, Laplacian

Proceeding in a similar manner, we finally obtain

∇ · F =∂F1

∂r+

1

rF1 +

1

r

∂F2

∂θ+∂F3

∂z=

=1

r

∂(r F1)

∂r+

1

r

∂F2

∂θ+∂F3

∂z.

Moreover, one can show that

∇× F =

(1

r

∂F3

∂θ− ∂F2

∂z

)er +

(∂F1

∂z− ∂F3

∂r

)eθ+

+1

r

(∂(rF2)

∂r− ∂F1

∂θ

)ez

and

∆f =∂2f

∂r2+

1

r

∂f

∂r+

1

r2∂2f

∂θ2+∂2f

∂z2.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 25/27

Page 26: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Gradient in spherical coordinates

Consider a scalar field f(ρ, θ, φ) and a vector field

F(ρ, θ, φ) = F1(ρ, θ, φ)eρ + F2(ρ, θ, φ)eθ + F3(ρ, θ, φ)eφ

defined in the spherical coordinate systems.

In this case, the derivation of ∇, ∇·, ∇×, and ∆ are analogous tothe previous case.

Particularly, one can show that

∇ =∂

∂ρeρ +

1

ρ sinφ

∂θeθ +

1

ρ

∂φeφ,

so that for a C1 function f(ρ, θ, φ) we have

∇f(ρ, θ, φ) =∂f

∂ρ(ρ, θ, φ)eρ+

1

ρ sinφ

∂f

∂θ(ρ, θ, φ)eθ+

1

ρ

∂f

∂φ(ρ, θ, φ)eφ.

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 26/27

Page 27: Cylindrical and Spherical Coordinatesece206/Lectures/slides/section... · 2014-11-24 · Cylindrical and Spherical Coordinates The Cartesian coordinate system is by far the simplest,

Other differential operators

Proceeding in a manner analogous to the cylindrical case, we also get(for a scalar f field and a vector field F = ( F1︸︷︷︸

ρ

, F2︸︷︷︸θ

, F3︸︷︷︸φ

))

∇ · F =1

ρ2∂(ρ2F1)

∂ρ+

1

ρ sinφ

∂F2

∂θ+

1

ρ sinφ

∂(sinφF3)

∂φ,

∇× F =1

ρ sinφ

(∂(sinφF3)

∂φ− ∂F2

∂θ

)eρ +

1

ρ

(∂(ρF3)

∂ρ− ∂F1

∂φ

)eθ+

+1

ρ

(1

sinφ

∂F1

∂θ− ∂(ρF2)

∂ρ

)eφ,

and

∆f =1

ρ2

[∂

∂ρ

(ρ2∂f

∂ρ

)+

1

sin2 φ

∂2f

∂θ2+

1

sinφ

∂φ

(sinφ

∂f

∂φ

)].

Department of ECE, Fall 2014 ECE 206: Advanced Calculus 2 27/27