-------------------------------------------------------------------------------

                            Symbolic Vectors  1.1
                               Library # 1190

                              by Felipe Jordao

-------------------------------------------------------------------------------



Introduction
------------

This library contains functions for manipulating symbolic vectors in the
coordinate systems supported by the HP48 G series calculator.  It will not work
on the SX because of G specific functions.

The programs can be used in any of the coordinate systems (Rectangular,
Cylindrical, Spherical) and will give the answer depending on what mode the
calculator is on.

Terms used in these instructions:

rs    --- right shift key
ls    --- left shift key
theta --- the theta symbol, [alpha][rs][F]
phi   --- the small phi symbol, [alpha][ls][EVAL][alpha][rs][9]
          or echoed from the CHARS menu (easier)
v|    --- square root sign



Coordinates
-----------

The programs only support specific coordinate variables.
When you enter the vector you must use these variables:

system              variables

Rectangular         x, y, z      (note: these are lower case)
Cylindrical         r, theta, z
Spherical           r, theta, phi

You can cange the coordinate system of the calculator by pressing [rs][MODES]
or [ls][MODES] in the [ANGL] directory



Entering Symbolic Vectors
-------------------------

Symbolic vectors can be entered as lists on the 48.
To enter the vector: (x*y)i - (3*x^2*z)j
You key in:   { 'x*y' '-3*x^2*z' 0 }

Notice there is a zero at the end of the list.  This is because the vector we
are using is in two dimensions, so you must set the k unit vector to zero.

If you have a vector: (2*w) etheta   in cylindrical coordinates
(note etheta is the unit vector in the theta direction)
You make sure the calculator is in Cylindrical mode (so the functions work)
You key in:   { 0 '2*w' 0 }

Notice the zeros again



Functions
---------


Abs

  Finds the magnitude of a vector

  takes the vector from level 1
  returns its magnitude on level 1

  Note:  make sure you enter the zeros if the vector is not 3 dimensional


Unit

  Finds the unit vector parallel to the given vector

  takes the vector from level 1
  returns the unit vector on level 1


Angl

  Finds the angle between two vectors

  takes two vectors from levels 1 & 2
  returns the angle between them on level1

  Note:  check to see if you're in degree or radians mode so you don't get 
         funny answers


DDer

  Finds the directional derivative of a scalar field (or surface)

  takes a scalar field from level 2 and a directional vector on level 1
  returns the directional derivative on level 1

  example:
    find the directional derivative of phi = x^2y +xz  at (1,2,-1) in the 
    direction  A = 2i - 2j + k

    solution
    - key in the field:  'x^2*y+x*z'
    - key in the vector:   { 2 -2 1 }
    - press DDer
    - the answer you get is:  '-(2/3*x^2)+4/3*x*y+1/3*x+2/3*z'
    - plug in the points  x=1, y=2, z=-1  (on paper)
    - get the answer:  5/3


Dot

  Dot product of two vectors

  takes two vectors on levels 1 and 2 of the stack
  returns their dot product on level 1


Cross

  Cross product of two vectors

  takes two vectors on levels 1 & 2 of the stack
  returns their cross product on level 1


Grad

  Takes the gradient of a scalar field

  takes a symbolic object on level 1
  returns its gradient on level 1


Lapl

  Takes the laplacian
  The divergence of the gradient of a field

  takes the field on level 1
  returns its laplacian on level 1


Div

  Calculates the divergence of a vector field

  takes the vector on level 1
  returns its divergence on level 1

  example:
    calculate the divergence of V
    where V = (e^(v|(xy)))i + (sec^2 yz)j + (x^y)k

    solution
    - make sure you are in rectangular coordinates
    - key in:  { 'EXP(v|(x*y)' 'INV(COS(y*z)^2)' 'x^y' }
    - press the [Div] key
    - the answer is  '.5*EXP(v|(x*y))/v|(x*y)*y+2*COS(y*z)^-3*SIN(x*z)*z'
    - this is the simplest form the HP48 gives, but with some manipulation
      you can get:  (v|y/(2v|x))*e^(v|(xy)) + 2z sec^2(yz) tan(yz)
      which is the same thing that's in the back of my old calc book!  :)


Curl

  Calculates the curl of a vector field

  takes vector on level 1
  returns its curl on level 1

  example:
    Calculate the curl of V in cylindrical coordinates
    where V = (wr)etheta

    solution
    - make sure you are in cylindrical coordinates
    - key in :  { 0 'w*r' 0 }
    - press the [Curl] key
    - the answer is { 0 0 '2*w' }  or (2w)k
    - easy isn't it?


ds

  Shows a table of conversions for each coordinate system
  I though it was useful because sometimes you forget that dy goes to rd(theta)
  and not just d(theta) in cylindrical coords.


About

  Displays the version and author


-------------------------------------------------------------------------------

            *********************************************
            *** Disclaimer: use this at your own risk ***
            *********************************************


Have fun with it.

This version has more stuff than the first one.  I am working on more things 
for the library but if you have a suggestion you are more than welcome to 
e-mail me and tell me.  I do a lot of this stuff by hand anyways, so I might 
not include something that you think is good to have.


please report any bugs to:  fjordao@eniac.seas.upenn.edu


Note:  the calculator simplifies as much as it can, so if you know the answer
       and it does not match the calculator's answer, make sure you do the
       trig identities and other simplifications before writing saying you
       got the wrong answer.


Felipe Jordao
-- HAC --



