Thu Apr 24 06:48:39 MET DST 1997 anne % axiom Axiom Computer Algebra System (Release 2.1) Digital Unix on DEC Alpha (AXIOM Sockets) The AXIOM server number is undefined. ----------------------------------------------------------------------------- Issue )copyright to view copyright notices. Issue )summary for a summary of useful system commands. Issue )quit to leave AXIOM and return to shell. ----------------------------------------------------------------------------- initial (1) -> -- ----------[ A x i o m ]---------- -- ---------- Initialization ---------- )set messages autoload off )set messages time on )set quit unprotected -- ---------- Vector Analysis ---------- -- Vector norm => sqrt(15) Norm(v) == local V V : Matrix Complex Integer := v sqrt(map(conjugate, transpose(V)) * V) Type: Void Time: 0 sec Norm(vector([1 + %i, -2, 3*%i])) Compiling function Norm with type Vector Complex Integer -> Expression Complex Integer +--+ (2) \|15 Type: Expression Complex Integer Time: 0.97 (IN) + 0.23 (EV) + 0.33 (OT) + 0.17 (GC) = 1.70 sec )clear properties Norm Compiled code for Norm has been cleared. -- Cross product: (2, 2, -3) x (1, 3, 1) => (11, -5, 4) --cross(vector([2, 2, -3]), vector([1, 3, 1])) -- (a x b) . (c x d) => (a . c) (b . d) - (a . d) (b . c) --cross(a, b) . cross(c, d) -- => (2 y z^3 - 2 x^2 y^2 z, x y, 2 x y^2 z^2 - x z) --curl(vector([x*y*z, x**2*y**2*z**2, y**2*z**3])) -- DEL . (f x g) => g . (DEL x f) - f . (DEL x g) --div(cross(f, g)) -- Express DEL . a in spherical coordinates (r, theta, phi) for -- a = (a_r(r, theta, phi), a_theta(r, theta, phi), a_phi(r, theta, phi)). -- Here, phi is in the x-y plane and theta is the angle with the z-axis. -- => 1/r^2 d/dr[r^2 a_r] + 1/[r sin(theta)] d/dtheta[sin(theta) a_theta] -- + 1/[r sin(theta)] da_phi/dphi -- => da_r/dr + (2 a_r)/r + 1/r da_theta/dtheta + a_theta/[r tan(theta)] -- + 1/[r sin(theta)] da_phi/dphi -- See Keith R. Symon, _Mechanics_, Third Edition, Addison-Wesley Publishing -- Company, 1971, p. 103. --coordinates == spherical --div([a_r(r, theta, phi), a_theta(r, theta, phi), a_phi(r, theta, phi)]) -- Express dR/dt in spherical coordinates (r, theta, phi) where R is the -- position vector r*Rhat(theta, phi) with Rhat being the unit vector in the -- direction of R => (dr/dt, r dtheta/dt, r sin(theta) dphi/dt) -- [Symon, p. 98] r:= operator('r); Type: BasicOperator Time: 0.08 (IN) = 0.08 sec rhat:= operator('rhat); Type: BasicOperator Time: 0.03 (IN) = 0.03 sec theta:= operator('theta); Type: BasicOperator Time: 0.03 (IN) = 0.03 sec phi:= operator('phi); Type: BasicOperator Time: 0.02 (IN) + 0.03 (OT) = 0.05 sec v:= vector([r(t)*rhat(theta(t), phi(t)), 0, 0]) (7) [r(t)rhat(theta(t),phi(t)),0,0] Type: Vector Expression Integer Time: 0.58 (IN) + 0.03 (EV) + 0.14 (OT) = 0.75 sec D(v, t) There are 5 exposed and 0 unexposed library operations named D having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op D to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named D with argument type(s) Vector Expression Integer Variable t map(e +-> D(e, t), v) (8) [ , , r(t)phi (t)rhat (theta(t),phi(t)) + r(t)theta (t)rhat (theta(t),phi(t)) ,2 ,1 + , rhat(theta(t),phi(t))r (t) , 0, 0] Type: Vector Expression Integer Time: 0.02 (IN) + 0.10 (EV) + 0.03 (OT) = 0.15 sec )clear properties r rhat theta phi v -- Scalar potential => x^2 y + y + 2 z^3 --potential(vector([2*x*y, x**2 + 1, 6*z**2])) -- Vector potential => (x y z, x^2 y^2 z^2, y^2 z^3) is one possible solution. -- See Harry F. Davis and Arthur David Snider, _Introduction to Vector -- Analysis_, Third Edition, Allyn and Bacon, Inc., 1975, p. 97. --vectorpotential(vector([2*y*z**3 - 2*x**2*y**2*z, x*y, 2*x*y**2*z**2 - x*z])) --curl(%) -- Orthogonalize the following vectors (Gram-Schmidt). See Lee W. Johnson and -- R. Dean Riess, _Introduction to Linear Algebra_, Addison-Wesley Publishing -- Company, 1981, p. 104 => [[0 1 2 1], [0 -1 1 -1], [2 1 0 -1]]^T [transpose(matrix([[0, 1, 2, 1]])), transpose(matrix([[0, 1, 3, 1]])), _ transpose(matrix([[1, 1, 1, 0]])), transpose(matrix([[1, 3, 6, 2]]))] +0+ +0+ +1+ +1+ | | | | | | | | |1| |1| |1| |3| (9) [| |,| |,| |,| |] |2| |3| |1| |6| | | | | | | | | +1+ +1+ +0+ +2+ Type: List Matrix Integer Time: 0.02 (IN) + 0.03 (OT) = 0.05 sec gramschmidt(%) + 1 + | ---- | | +-+ | | |3 | + 0 + + 0 + | |- | | | | | | \|2 | | +-+| | 1 | | | | \|3 | |----| +0+ | 1 | |- ----| | +-+| | | | ----- | | 3 | |\|6 | |0| | +-+| | | | | (10) [| |,| |3 |,| +-+ |,| 2 |] |0| | 2 |- | | \|3 | |----| | | | \|2 | | ---- | | +-+| +0+ | | | 3 | |\|6 | | 0 | | | | | | | | +-+| | 1 | | 1 | | \|3 | |----| |- -----| |- ----| | +-+| | +-| + 3 + +\|6 + | |3| | 2 |-| + \|2+ Type: List Matrix Expression Integer Time: 0.10 (IN) + 0.20 (EV) + 0.07 (OT) + 0.03 (GC) = 0.40 sec -- ---------- Quit ---------- )quit real 7.6 user 4.3 sys 0.5