operators
- To: mathgroup <mathgroup at yoda.physics.unc.edu>
- Subject: operators
- From: keiper
- Date: Sat, 6 Nov 93 12:31:24 -0600
>Is there a way to take an operator, say the gradient operator in x,y,z >coordinates, and let Mma calculate the same operator in spherical >r,theta,phi coordinates? Use the package Calculus`VectorAnalysis` . It defines all of the classical operators in all 14 of the classical coordinate systems. See the documentation in the Guide to Standard Mathematica Packages for further details. In[1]:= << Calculus`VectorAnalysis` In[2]:= SetCoordinates[Spherical[r, theta, phi]] Out[2]= Spherical[r, theta, phi] In[3]:= Grad[f[r, theta, phi]] (0,1,0) (1,0,0) f [r, theta, phi] Out[3]= {f [r, theta, phi], -----------------------, r (0,0,1) Csc[theta] f [r, theta, phi] > ----------------------------------} r In[4]:= Grad[r Cos[theta] Sin[phi]^2] 2 2 Out[4]= {Cos[theta] Sin[phi] , -(Sin[phi] Sin[theta]), > 2 Cos[phi] Cot[theta] Sin[phi]} Jerry B. Keiper keiper at wri.com