Está en la página 1de 38

Vectors: arithmetic, algebra, and analysis in Maxima

In this chapter we present examples of vector arithmetic, vector


algebra, and vector analysis using Maxima.
Vector arithmetic in Maxima
A vector in Maxima can be simply defined as a list. Typically, physical vectors
(representing, for example, position, velocity, acceleration, force, moment, momentum,
angular velocity, angular acceleration, etc.) are three-dimensional vectors. Therefore,
physical vectors can be represented by a list of three elements, e.g., the vectors
u -!i " #j"$k and v #i-!j-%k can be represented, in Maxima, as follows&
Addition, subtraction, multiplication by a scalar, and linear combinations of vectors are
straightforward, as illustrated in the following examples&
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
NOTE& (se of the traditional multiplication ()) and division (*) symbols with two vectors,
such as u and v, results in a term-by-term operation that produces a list. The resulting
lists, in these cases, have no physical meaning. The following examples illustrate the use
of the term-by-term multiplication and division operations&
8-1 Gilberto E. Urroz, 2009
+calar (dot) and vector (cross) products
The scalar, or dot , product of two vectors is accomplished by using a period between the
vectors, e.g.,
+ince the dot product of a vector with itself represents the s,uare of the vector-s
magnitude (or .uclidean length), the magnitude of a vector can be calculated as the s,uare
root of the dot product of the vector with itself, i.e., u=.uu . /or example, the
magnitudes of vectors u and v will be calculated as&
A unit vector in the direction of u is calculated as
e
u
=
u
u
. (sing 0axima, this can be
accomplished by the following commands&
The angle between two vectors is calculated as
0=cos
1
(
uv
uv
)
. Thus, using Maxima, the
angle, in radians, between vectors u and v is calculated as&
8-2 Gilberto E. Urroz, 2009
The corresponding angle in degrees would be calculated as&
The vector, or cross, product of two vectors is calculated using the wedge operator& 1 ,
which belongs in the vect pac2age. The evaluation of a cross product re,uires the use of
the express (expression) function. Try the following example&
Alternatively, you can combine express with the wedge operator to calculate the cross
product in a single step&
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
NOTE& The vect pac2age is used later in this 3hapter to perform operations of vector
analysis.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The volume of the parallelepiped defined by three vectors u, v, and w, is calculated by the
formula V =u(vw) .
This operation is illustrated by using the following commands (u,v defined above)&
8-3 Gilberto E. Urroz, 2009
4etermining the e,uation of a plane using the dot product
The figure below shows a plane containing a point 5
6
(x
0
,y
0
,z
0
) with normal vector n. If one
selects an arbitrary point 5(x,y,z) in the plane, one can form the vector
r=P
0
P
P-P
0
,
and use the fact that nr=nrcos (90
o
)=0 to determine the e,uation of the plane.
3onsider, for example, a plane containing point P
6
(-!, 7, #) normal to the vector n
#i"7j"!k. /irst, we define the vector n and points P
6
and P&
8ext, we use the dot product to produce the e,uation of the plane&
It-s easy to verify that point P
6
belongs in the plane by using&
(sing function solve we can solve for z out of the e,uation EQ, and define a function f(x,y)
8-4 Gilberto E. Urroz, 2009
that can be used to plot the plane&
To produce the plot you can use the wxMaxima menu option plotting>plot3d... which
produces the following input form. The options used to produce the plot, as well as the
resulting plot, are shown in the figure below&
8-5 Gilberto E. Urroz, 2009
9ector plots using the draw pac2age
The draw pac2age includes a number of functions for producing a variety of plots.
.xamples of applications of the draw pac2age are available at this web address&
http&**www.telefonica.net*web!*biomates*maxima*gpdraw*
In this section we describe the use of function drawd to produce the plot of one or more
vectors.
The first example illustrates the use of function drawd, together with the wx wrapper (to
use it in the wxMaxima interface), to plot the two-dimensional vector r #i " #j, based on
point (!,:). The command re,uired to produce this plot is shown in /igure $.:, below.
The command wxdrawd re,uires the following parameters&
xrange& range of values of x for the two-dimensional plot ;x
min
, x
max
<
yrange& range of values of y for the two-dimensional plot ;y
min
, y
max
<
!ead"lengt!& length of vector head in units of the graph
!ead"angle& angle of the arrow head in degrees
line"widt!& width of the arrow line in pixels
color& color for the vector (e.g., red, #lue, yellow, green, etc.)
vector& re,uires two vectors& base point, and vector components
The result of command wxdrawd, illustrated in /igure $.:, below, is the red vector based
at point ;!,:< with components ;#,#<. The figure shows the other parameters in the plot.
To produce the command in multiple lines, use the multiple-line input #ox (see /igure $.!,
below)
/igure $.:. 5arameter for plotting a vector using function drawd in pac2age draw.
8-6 Gilberto E. Urroz, 2009
The multiple-line input #ox for this command will loo2 as follows&
/igure $.!. 0ultiple-line input box for the command used in /igure $.:, above.
A second example of plotting vectors is shown in /igure $.#, which shows the plot of vectors
u !i " #j, v #i " !j, and their sum, w u " v. 8otice the use of different colors to
indicate the different vectors involved. All the vectors use the same !ead"lengt!,
!ead"angle, and base point ;6,6<.
/igure $.#. (se of function wxdrawd to plot multiple vectors.
8-7 Gilberto E. Urroz, 2009
/unction draw3d can be used to plot three-dimensional vectors as illustrated in the
following example. The result is shown in /igure $.7.
/igure $.%. wxMaxima input for plotting # three-dimensional vectors and multiple-line input
box command with the plotting command.
/igure $.7. 5lot of # vectors in three-dimensions using function draw3d.
8-8 Gilberto E. Urroz, 2009
Vector calculus in Maxima
4erivatives of vector functions. 3onsider a position vector defined by r(t) ti " t
!
j " t
:*!
k.
The following commands define this position vector as a vector function r$t%, and calculates
the functions velocity v$t% dr&dt, and the acceleration a$t% ' d

r&dt

for r$t%, using di((.
The magnitude of the position, velocity, and acceleration vectors can be calculated using
the definition r=.rr , v=. vv , and a=.aa , respectively. =ith Maxima&
8-9 Gilberto E. Urroz, 2009
Any of these functions can be evaluated for different values of t, e.g., using the option
)lge#ra > Ma*e list + , results in the following&
+calar functions, such as the magnitudes of the position, velocity, and acceleration vectors,
mag"r$t%, mag"v$t%, and mag"a$t%, can be plotted using function wxplotd, e.g.,
Integrals of vector functions. /unction integrate, or the option ,alculus>-ntegrate..., can
be used to calculate indefinite or definite integrals for a vector function. /or example,
given a velocity v$t% ' sin(t)i " cos(t)j " tk, the position vector can be calculated as an
indefinite integral, r (t )=

v(t ) dt +C . Maxima does not include the integrating constant


automatically, therefore, in the Maxima command, we include the constant ourselves in the
command&
8-10 Gilberto E. Urroz, 2009
+uppose that the initial conditions are r(6) ;!,-#,%<, which we will re-write as an e,uation
., r(6)-;!,-#,%<, and use the command solve to calculate the constants ,x, ,y, and ,z&
The user can then substitute the values of the constants ,x, ,y, and ,z into the different
components of the vector r$t%, namely, r$t%;.<, r$t%;<, and r$t%;3<, respectively. /inally,
the vector function r$t% gets re-defined&
5lots of vector functions. To plot vector functions we can generate a list of vectors by
evaluating the vector functions at different values of the parameter t. /or example, for
the following position r$t% and velocity v$t% functions&
we can define the following functions rd($t% and vd($t% that will create the vectors for
plotting&
8-11 Gilberto E. Urroz, 2009
The following commands use function rd( and vd( to produce the lists of vectors rvects
and vvects&
8ext, we are going to produce a couple of lists of vectors and their properties (list., list)
that we will then incorporate into the drawd command to produce the vector plots.
8otice the use of function append to append all the graphic properties to the list of
vectors&
=e will also create a third list, list3, that describes the curve whose parametric e,uations,
x$t% and y$t%, are the components of vector r$t%&
8-12 Gilberto E. Urroz, 2009
To illustrate the application of function wxdrawd to the lists created above, we use
function apply to function wxdrawd and to each list&
To plot the curve and the two sets of vectors we combine the three lists into one using
append, and then use function apply with function wxdrawd as follows&
8-13 Gilberto E. Urroz, 2009
3onsider now a three-dimensional vector plot including position, velocity, and acceleration
vectors for a space curve. /irst, we define the vectors as follows&
8ext, we define functions to put together the vectors for plotting&
The next step is to create lists of vectors for position, velocity, and acceleration&
8-14 Gilberto E. Urroz, 2009
8ext, we create lists of graphic properties for the three set of vectors and for the
parametric e,uations describing the curve r$t%&
8ext, we combine all the lists of graph commands into a single one, and apply function
draw3d to this new list to produce the following graph. In this plot, blue arrows position
vector, red arrows velocity vector, and green arrows acceleration vector&
8-15 Gilberto E. Urroz, 2009
Dierential geometry o curves
A curve , in space can be defined by a triad of parametric e,uations x ' x$t%, y ' y$t%, and
z ' z$t%. 8otice that the parameter t may or may not represent time. If it does, then the
curve represents the tra>ectory of a particle undergoing motion. If the parametric
e,uations are written in terms of a parameter s representing the arc length of the curve,
(measured from an arbitrary point on the curve), then we can define the unit tangent
vector T as
T=
d r
ds
.
Also, the principal (unit) normal vector is defined by the expression
d T
ds
= N
,
where is the curvature of curve , at a given point. +ince ?N? :, the curvature is
calculated as&
=

d T
ds

.
The radius of curvature is defined as
j=
1

.
The center of curvature of , at a given point is found by measuring a distance along the
direction of N. A circle of curvature can be traced for every point in a curve. The
curvature of a space curve is illustrated in /igure $.@(a).
/igure $.@. 3urvature and vector triad for a space curve.
8-16 Gilberto E. Urroz, 2009
A unit binormal vector can be calculated using vectors N and T as
B=TN .
The unit vectors T, N, and ! constitute a local system of orthogonal axes 2nown as the
vector triad at any point on the curve ,. The plane defined by vectors T and N is 2nown as
the osculating plane
:
. The plane defined by vectors ! and N is 2nown as the normal plane.
The plane defined by vectors ! and T is 2nown as the rectifying plane. /igure $.@(b)
illustrates the vector triad and the osculating, normal, and rectifying planes associated
with a point 5 in a space curve.
+ince, in most cases, it is difficult to determine the dependency of the position vector r on
the curve length s, we can write the parametric e,uations in terms of another parameter,
say, t, so that r(t) x(t)i " y(t)j " A(t)k. In this case the calculations to perform to find the
curvature parameters as well as the vector triad are as follows. /irst, the unit tangent
vector is calculated as&
T=
d r
ds
=
d r/ dt
ds/ dt
=
d r/ dt
d r/ dt
,
since ds=d r . Also, to calculate dT*ds, curvature, radius of curvature, unit normal
vector, and binomial unit vector use, respectively&
d T
ds
=
d T / dt
ds / dt
=
d T / dt
d r/ dt
,
=

d T
ds

, j=
1

, and
N=
1

d T
ds
.
/inally, B=TN .
.xample of a vector triad calculated using Maxima
3onsider the parametric e,uations that define a curve , in space, namely, x$t% ' 3 sin$t%,
y$t% ' 3 cos$t%, z$t% ' t&, where s is the distance measured along the curve from point
P
0
$0,3,0%, i.e., s' 0. Thus, the position vector corresponding to curve , is given by&
/irst, we calculate dr*dt (drdt)&
1 From the !ti" #or$ osculare %to &iss', i.e., the osc(l!ti") *l!"e is the kissing plane.
8-17 Gilberto E. Urroz, 2009
The magnitude of dr*dt is ds*dt ?dr*dt? (mag"drdt)&
The unit normal tangent vector T is calculated as
T=
d r
ds
=
d r/ dt
ds/ dt
=
d r/ dt
d r/ dt
, i.e.,
Bust as a chec2, we calculate the magnitude of T (mag"/)&
The derivative dT&ds (d/ds) is calculated using
d T
ds
=
d T / dt
ds/ dt
=
d T / dt
d r/ dt
. In the following
Maxima calculation we use variable d/dt to represent dT*dt and we use the ,uantity
mag"drdt, previously calculated, to represent dr&dt, i.e.,

8-18 Gilberto E. Urroz, 2009
The curvature of the curve ,,
=

d T
ds

, is calculated as follows&
To chec2 the sign of the curvature, compare the vectors
d T
ds
and N &
+ince
d T
ds
=N , then the correct sign for is a positive sign, i.e.,
The radius of curvature j=
1

is, therefore,
The normal vector is calculated as
N=
1

d T
ds
, i.e.,
8-19 Gilberto E. Urroz, 2009
Cy inspection we can see that the magnitude of N is :. If you have any doubts, try the
following&
The binormal vector is calculated using the cross product B=TN &
To find the vector triad at point 5
6
(6,#,6), for t ' 0, we use the following commands&
=e can chec2 that the (T,N,!) triad is orthogonal by calculating the dot products& NT, T!,
and !N, which should all be Aero&
8-20 Gilberto E. Urroz, 2009
The /renet-+erret /ormulas
These are formulas that relate the derivatives of the unit vectors with respect to the curve
length s. The first formula was already used to define curvature and the unit normal
vector, i.e.,
d T
ds
= N
4erivatives of the other two unit vectors are calculated below in terms of the curvature
and a ,uantity , 2nown as the torsion of the curve&
d N
ds
=t BT
,
d B
ds
=t N
.
/rom the last formula it follows that the magnitude of the torsion is
t=

d B
ds

.
The radius of torsion is calculated as
c=
1
t
.
The derivatives of the unit vectors, when the curve is described by parametric e,uations of
the form r(t) x(t)i " y(t)j " A(t)k, are calculated as
d T
ds
=
d T / dt
ds/ dt
=
d T / dt
d r/ dt
,
d N
ds
=
d N / dt
ds/ dt
=
d N / dt
d r / dt
,
and

d B
ds
=
d B/ dt
ds/ dt
=
d B/ dt
d r/ dt
.
3alculating derivatives d N *ds, d ! *ds, torsion and radius of torsion
In this section we continue the calculations using the position vector r(t) defined earlier.
=e start by calculating the derivatives dN*ds (d0ds) and d!*ds (dCds) using the derivatives
dN*dt (d0dt) and d!*dt (d1dt) and the magnitude ?dr*dt? (mag'drdt), calculated earlier&
8-21 Gilberto E. Urroz, 2009
To calculate the magnitude of the torsion, we use&
To determine the sign of the the torsion, we compare the vectors
d B
ds
and tN .
8otice that
d B
ds
=(tN)=tN
, thus, the correct sign for is a negative sign since
d B
ds
=t N
, i.e.,
The radius of torsion is calculated&
8-22 Gilberto E. Urroz, 2009
Vector analysis
The term vector analysis is presented here in terms of differential operations of scalar and
vector fields, i.e., functions of the form $x,y,z%, scalar, or "(x,y,z), vector. These two
examples represent steady-state fields, i.e., fields that do not depend on time. In the
most general case, fields are time dependent, and the expressions to use for scalar and
vector fields are $x,y,z,t%, scalar, or "(x,y,z,t), vector, respectively.
4efinitions. The following definitions are used for differential operations in vector analysis&
The del or na#la operator& | =
|
x
i+
|
y
j+
|
z
k
The gradient of a scalar function& apply the del or na#la operator to a scalar
function , for example&
=

x
i +

y
j +

z
k
The directional derivative represents the rate of change of function in the
direction defined by a unit vector
u=u
x
i +u
y
j+u
z
k
, i.e.,

D
u
=u=
(

x
i +

y
j +

z
k
)

(
u
x
i +u
y
j +u
z
k
)
=u
x

x
+u
y

y
+u
z

z
0ormal vector to a sur(ace& Det $x,y,z% ' 0 represent a surface in space, then the
vector
n=
at any point of the surface represents a normal vector to the
surface.
2irection o( maximum rate o( c!ange o( $x,y,z% on t!e sur(ace $x,y,z% ' 0& The
magnitude of the directional derivative is
D
u
=u
. +ince the magnitude of u
is :, then
D
u

=u=ucos(0)=cos(0)
where is the angle between
vectors u and . The maximum value of
D
u

occurs when 0, i.e.,

D
u

max
=
when u and are parallel. Therefore, the maximum rate of
change of the function $x,y,z% on the surface $x,y,z% ' 0 occurs in the direction of
the gradient vector , i.e., in a direction normal to the surface.
The divergence of a vector function is defined by the EdotF product of the del or
na#la operator and the vector function&
div ()=F=
(
|
x
i +
|
y
j +
|
z
k
)

(
F
x
i +F
y
j+F
z
k
)
=
F
x
x
+
F
y
y
+
F
z
z
8-23 Gilberto E. Urroz, 2009
The curl, or rotational, of a vector function is defined by the EcrossF product of the
del or na#la operator and the vector function&
curl ()=F=

i j k

x

y

z
F
x
F
y
F
z

The 3aplacian of a scalar function is defined as the divergence of the gradient of the
scalar function, i.e.,

2
=div ( grad ())=()=

x
2
+

y
2
+

z
2
The homogeneous partial differential e,uation
2
=0 is 2nown as the 3aplace
e4uation, and functions $x,y,z% that satisfy this e,uation are 2nown as !armonic
(unctions. The corresponding non-homogeneous e,uation
2
=K ( x , y , z) is
2nown as the Poisson e4uation.
A vector field "(x,y,z) for which F=0 is said to be a solenoidal (ield. +ince
( )=0 , for any scalar function (x,y,z%, if there exists a function $x,y,z% so
that F==grad () for a solenoidal field, then $x,y,z% is 2nown as the vector
potential of ".
(sing the pac2age vect . 4ifferential operations in Maxima are available through the
pac2age vect. The pac2age defines the following operators& . (dot), 1 (cross), grad, div,
curl, laplacian. The pac2age also includes functions& declare, vectorsimp, express,
potential, vectorpotential, and scale(actors. +ome applications of these operators and
functions are presented below.
4ot and cross products & these operations were presented earlier, here we show a few
other examples. /irst, we load pac2age vect, and define a couple of vector
functions&
The dot product produces a scalar function&
8-24 Gilberto E. Urroz, 2009
The cross product, on the other hand, re,uires the use of function express
(expression) to complete the operation&
These two steps can be combined into a single operation&
9ector formulas expansions . =e can use the vect pac2age and declare a few
symbols as scalar functions and a few as non-scalar (for all practical purposes,
vector) functions and use ev and vectorsimp to produce e,uivalent expansions of
differential operations of sums, products, and divisions of functions. /or example,
let-s declare and as scalar functions, and 5 and 6 as nonscalar (vector) functions&
Then, we use Maxima to expand the formula ()=+ as follows&
+ince both and were declared as scalar functions, and attempt to expand the
operation div ()=() fails. Instead, Maxima converts the operation to a
gradient expansion with dot products&
8-25 Gilberto E. Urroz, 2009
A more appropriate combination for the application of the div operator is the
divergence of the product of a scalar and a vector function, i.e.,
(F)=F+F &
(sing Maxima this operation is expanded as&
The following commands show the gradient of the ratio of two scalar functions&
Gne example involving the laplacian of the product of two scalar functions follows&
(sing the pac2age vect"trans(orm . Doad the pac2ages, vect and vect"trans(orm to have
access to the following systems of orthogonal coordinates&
cartesian2d
cartesian3d
polar
polarcylindrical
spherical
oblatespheroidal
prolatespheroidal
oblatespheroidalsqrt
prolatespheroidalsqrt
elliptic
ellipticcylindrical
confocalelliptic
confocalellipsoidal
parabolic
paraboliccylindrical
paraboloidal
bipolar
bipolarcylindrical
toroidal
conical
To obtain the 3artesian coordinate transformations corresponding to each of these
orthogonal systems of coordinates, simply type the appropriate name in Maxima. The
following figure shows some of the most commonly used coordinate systems&
8-26 Gilberto E. Urroz, 2009
The general form of the coordinate definitions is the following&
In two dimensions (!-4)& ; ; (
.
$u
.
,u

%, (

$u
.
,u

% <, u
.
, u

<
In three dimensions (#-4)& ; ; (
.
$u
.
,u

,u
3
%, (

$u
.
,u
,u3
%, (
3
$u
.
,u

,u
3
% <, u
.
, u

, u
3
<
where u
.
,u

,u
3
are the basic coordinates in the system, and x (
.
$u
.
,u

,u
3
%, y ' (

$u
.
,u
,u3
%,
z ' (
3
$u
.
,u

,u
3
% are the transformations re,uired to convert from the (u
.
,u

,u
3
) to the
3artesian coordinate system $x,y, z%.
/or example, for polar coordinates the basic coordinates are u
.
' r, u

' , and the


transformations to convert to 3artesian coordinates are x ' r cos$% and y ' r sin$%.
.xpressions for differential vector operations in 3artesian coordinates
(se function scale(actors from pac2age vect with the name of an orthogonal
coordinate system from pac2age vect"trans(orm, and you can then obtain
expressions for differential vector operations in that particular coordinate system.
/or example, using 3artesian coordinates in three dimensions, one can find the
expressions for selected differential vector operations. /irst, we load pac2ages vect
and vect"trans(orm, and declare a few variable names as scalars and non-scalars
(vectors)&
Here are some of the vector differential operations in 3artesian coordinates&
8-27 Gilberto E. Urroz, 2009
+ome other operations are shown below&
.xpressions for vector differential operations in cylindrical-polar coordinates
3hanging the coordinate system to polarcylindrical we can obtain vector differential
operations in cylindrical-polar coordinates&
8-28 Gilberto E. Urroz, 2009
Gbviously, the total derivatives shown in the expressions above need to be
interpreted as partial derivatives. /or example, the gradient of in cylindrical polar
coordinates,
would be interpreted as
=
|

r
,
1
r

0
,

z

, or
=

r
e
r
+
1
r

0
e
0
+

z
e
z
.
.xpressions for vector differential operations in spherical coordinates
3hanging the coordinate system to sp!erical we can obtain vector differential
operations in spherical coordinates&
8-29 Gilberto E. Urroz, 2009
3alculating vector differential operations for specific scalar and vector fields
If the expression for scalar or vector fields are given, we can find expressions for vector
differential operations as illustrated below. /irst, we show some examples in 3artesian
coordinates by defining the scalar function
' x

7y

7z

,
and the vector function
" (x7y7z)i " (x7xy7yz)j " ((y7x)(z7y))k,
and calculating the following operations&
, F , F , and
2
.
The Maxima commands used are the following&
8-30 Gilberto E. Urroz, 2009
Doading pac2ages and calculating grad$%&
3alculating div$F%&
3alculating curl$F%&
3alculating
2
8
8-31 Gilberto E. Urroz, 2009
The following calculations show examples using cylindrical polar coordinates&
4efining and calculating grad$%&
4efining F and calculating div$F%&
8-32 Gilberto E. Urroz, 2009
3alculating curl$F%&
3alculating
2
8
#urvilinear #oordinates
In the section above we presented calculations using 3artesian, cylindrical (polar), and
spherical coordinates. 3artesian coordinates have the property of being such that the
coordinate positions (x,y,z) also represent the distances, from the origin, along the
coordinate directions. +uch is not the case for other systems of orthogonal systems. /or
example, in cylindrical (polar) coordinates, the r and z coordinates do correspond to the
distances from the origin along those coordinates, however, a distance along the
coordinate is actually calculated as r. Thus, we say that r is the scale factor for the
coordinate, i.e., the factor that converts the coordinate into a distance.
3oordinate transformations
3onsider a generic orthogonal coordinate system defined by coordinates (u
.
,u

,u
3
) such that
u
.
u
.
(x,y,z), u

u

(x,y,z), and u
3
u
3
(x,y,z) represent the transformation of coordinates
from (x,y,z) to (u
.
,u

,u
3
). /or example, in the cylindrical (polar) coordinate system with
(u
.
,u

,u
3
) (r,,z), the coordinate transformations are
u
1
=r=. x
2
+y
2
+z
2
, u
2
=0=t!"
1
( y/ x) , and
u
3
=z=z
.
8-33 Gilberto E. Urroz, 2009
If the relationships describing the coordinate transformations are uni,uely defined, it is
possible to write the inverse transformation of coordinates bac2 into 3artesian coordinates,
i.e., x ' x(u
.
,u

,u
3
), y ' y(u
.
,u

,u
3
), and z ' z(u
.
,u

,u
3
). /or example, for the conversion of
cylindrical to 3artesian coordinates these relationships are&
x=rcos(0)=u
1
cos (u
2
)
,
x=rsi"(0)=u
1
si" (u
2
)
, and
z=z=u
3
.
3oordinate transformations using Maxima
As we indicated earlier in this chapter, when you load the pac2ages vect and
vect"trans(orm you have access to the following systems of orthogonal coordinates&
cartesian2d
cartesian3d
polar
polarcylindrical
spherical
oblatespheroidal
prolatespheroidal
oblatespheroidalsqrt
prolatespheroidalsqrt
elliptic
ellipticcylindrical
confocalelliptic
confocalellipsoidal
parabolic
paraboliccylindrical
paraboloidal
bipolar
bipolarcylindrical
toroidal
conical
To obtain the 3artesian coordinate transformations corresponding to each of these
coordinate systems simply type the appropriate name in Maxima. .arlier on we obtained
the 3artesian coordinate transformation for the polar (!4), polarcylindrical (#4), and
sp!erical (#4) coordinate systems. Gther coordinate transformations are shown below.
8-34 Gilberto E. Urroz, 2009
8otice that Maxima uses coordinate names , u, and v, instead of u
.
,u

, and u
3
, for many of
the three-dimensional coordinate systems. Also, coordinate systems such as the polar,
elliptic, para#olic, and #ipolar, are two dimensional (using only coordinates u and v), while
their corresponding three-dimensional systems, i.e., polarcylindrical, ellipticcylindrical,
para#oliccylindrical, and #ipolarcylindrical, simply add the coordinate z. The
con(ocalelliptic system is two-dimensional, while the con(ocalellipsoildal is a three-
dimensional system using the coordinates u, v, and w. =herever they appear, e, (, and g,
represent constants.
8-35 Gilberto E. Urroz, 2009
Illustration of orthogonal coordinate systems
To illustrate three-dimensional orthogonal coordinate systems using Maxima we can
produce a plot showing coordinates surfaces u
.
' constant, u

' constant, and u


3
' constant.
/or example, for the polarycylindrical coordinate system, namely,
we can generate the coordinate surfaces z ' 9, r ' 9, and ' 0. The following draw3d
command, used after loading the draw pac2age, produces the re,uired plot.
The resulting plot is shown below. The blue plane represents z ' 9, the red cylinder
represent r ' 9, and the green plane represents ' 0.
8-36 Gilberto E. Urroz, 2009
The following commands are used to produce constant coordinate surfaces for the sp!erical
coordinate system&
The figure below shows two views of the plot thus produced. The surfaces shown are r ' 9
(blue sphere), ' 0 (red plane)d, and = &: (green cone).
8-37 Gilberto E. Urroz, 2009
Two-dimensional coordinate systems can be illustrated by using a parametric surface plot
on a z ' constant plane (e.g., z ' 0). The following command and plot illustrate the
constant lines of the para#olic coordinate system on the plane z ' 0&
8-38 Gilberto E. Urroz, 2009

También podría gustarte