Math 276

Calculus III

Fall 2005

Dr. Constant J. Goutziers

Department of Mathematics, Computer Science and Statistics

goutzicj@oneonta.edu

Lesson 6a

Cartesian, Cylindrical and Spherical Coordinates

Initializations

>    restart;

Conversion between coordinate systems.

Examples

Example 6a.1
Find the cartesian coordinates of the point
P = [r, theta, z]  = [3, Pi/6, 5]

Substitute the cylindrical coordinates [r, theta, z] = [3, Pi/6, 5]  into the transformation formulas

x = r*cos(theta)

y = r*sin(theta)

z = z

>    P:={r=3, theta=Pi/6, z=5};

P := {r = 3, theta = 1/6*Pi, z = 5}

>    ans[`6a.1`]:=[x,y,z]=simplify(subs(P, [r*cos(theta), r*sin(theta), z]));
evalf(ans[`6a.1`]);

ans[`6a.1`] := [x, y, z] = [3/2*3^(1/2), 3/2, 5]

[x, y, z] = [2.598076212, 1.500000000, 5.]

>   

Example 6a.2
Find the cylindrical coordinates of the point
P = [x, y, z]  = [1, 2, 3] .

Substitute the cartesian coordinates [x, y, z] = [1, 2, 3]  into the transformation formulas

r = sqrt(x^2+y^2)

theta = arctan(y,x)

z = z

>    P:={x=1, y=2, z=3};

P := {x = 1, y = 2, z = 3}

>    ans[`6a.2`]:=[r, theta, z]=simplify(subs(P, [sqrt(x^2+y^2), arctan(y,x), z]));
evalf(ans[`6a.2`]);

ans[`6a.2`] := [r, theta, z] = [5^(1/2), arctan(2), 3]

[r, theta, z] = [2.236067977, 1.107148718, 3.]

>   

Example 6a.3
Find the cartesian coordinates of the point
P = [rho, theta, phi]  = [4, Pi/6, Pi/4] .

Substitute the spherical coordinates [rho, theta, phi] = [4, Pi/6, Pi/4]  into the transformation formulas

x = rho*cos(theta)*sin(phi)

y = rho*sin(theta)*sin(phi)

z = rho*cos(phi)

>    P:={rho=4, theta=Pi/6, phi=Pi/4};

P := {theta = 1/6*Pi, rho = 4, phi = 1/4*Pi}

>    ans[`6a.3`]:=[x,y,z]=combine(simplify(subs(P, [rho*cos(theta)*sin(phi), rho*sin(theta)*sin(phi), rho*cos(phi)])), radical);
evalf(ans[`6a.3`]);

ans[`6a.3`] := [x, y, z] = [6^(1/2), 2^(1/2), 2*2^(1/2)]

[x, y, z] = [2.449489743, 1.414213562, 2.828427124]

>   

Example 6a.4
Find the spherical coordinates of the point
P = [x, y, z]  = [1, 2, 3] .

Substitute the cartesian coordinates [x, y, z] = [1, 2, 3]  into the transformation formulas

rho = sqrt(x^2+y^2+z^2)

theta = arctan(y,x)

phi = arccos(z/rho)  = arccos(z/sqrt(x^2+y^2+z^2))

>    P:={x=1, y=2, z=3};

P := {x = 1, y = 2, z = 3}

>    ans[`6a.4`]:=[rho, theta, phi]=simplify(subs(P, [sqrt(x^2+y^2+z^2), arctan(y,x), arccos(z/sqrt(x^2+y^2+z^2))]));
evalf(ans[`6a.4`]);

ans[`6a.4`] := [rho, theta, phi] = [14^(1/2), arctan(2), arccos(3/14*14^(1/2))]

[rho, theta, phi] = [3.741657387, 1.107148718, .6405223126]

>   

Example 6a.5
Find the cylindrical coordinates of the point
P = [rho, theta, phi]  = [3, Pi/3, Pi/6]

Substitute the spherical coordinates [rho, theta, phi] = [3, Pi/3, Pi/6]  into the transformation formulas

r = rho*sin(phi)

theta = theta

z = rho*cos(phi)

>    P:={rho=3, theta=Pi/3, phi=Pi/6};

P := {rho = 3, theta = 1/3*Pi, phi = 1/6*Pi}

>    ans[`6a.5`]:=[r, theta, z]=simplify(subs(P, [rho*sin(phi), theta, rho*cos(phi)]));
evalf(ans[`6a.5`]);

ans[`6a.5`] := [r, theta, z] = [3/2, 1/3*Pi, 3/2*3^(1/2)]

[r, theta, z] = [1.500000000, 1.047197551, 2.598076212]

>   

Example 6a.6
Find the spherical coordinates of the point
P = [r, theta, z]  = [2, Pi/4, 7] .

Substitute the cylindrical coordinates [r, theta, z] = [2, Pi/4, 7]  into the transformation formulas

rho = sqrt(r^2+z^2)

theta = theta

phi = arccos(z/rho)  = arccos(z/sqrt(r^2+z^2))

>    P:={r=2, theta=Pi/4, z=7};

P := {r = 2, theta = 1/4*Pi, z = 7}

>    ans[`6a.6`]:=[rho, theta, phi]=simplify(subs(P, [sqrt(r^2+z^2), theta, arccos(z/sqrt(r^2+z^2))]));
evalf(ans[`6a.6`]);

ans[`6a.6`] := [rho, theta, phi] = [53^(1/2), 1/4*Pi, arccos(7/53*53^(1/2))]

[rho, theta, phi] = [7.280109889, .7853981635, .2782996592]

>