Re: Almost symbolic computations (?)
- To: mathgroup at smc.vnet.net
- Subject: [mg90499] Re: Almost symbolic computations (?)
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Fri, 11 Jul 2008 02:02:13 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <g54oim$etu$1@smc.vnet.net>
Barbara Da Vinci wrote: > This is an example of the problem > I'm facing. > > The code > > Needs["VectorAnalysis`"]; > Head /@ {ax, ay, az} > A = {ax, ay, az}; > Curl[A] > > returns > > {Symbol, Symbol, Symbol} > {0, 0, 0} > > Instead, I would get the > well known symbolic form > > d_y az - d_z ay > .... > > I have been trying, for > a while, to perform string > manipulations but that, > of course, lays to ashes > the possibility to recognize > > d_y az + d_y az = 2 d_y az > > and so on. > > Any way to get out of it ? Not sure whether this is what you are looking for: Needs["VectorAnalysis`"] (* Return the name of the current coordinate system. *) CoordinateSystem[] (* Return the default symbol names for the coordinates. *) Coordinates[] (* In Cartesian coordinates, Curl expects to be fed by a list of functions that represent the components on the x-, y-, and z-axes of a vector field. *) Curl[{f[Xx, Yy, Zz], g[Xx, Yy, Zz], h[Xx, Yy, Zz]}] Cartesian[] {Xx, Yy, Zz} (0,0,1) (0,1,0) {-g [Xx, Yy, Zz] + h [Xx, Yy, Zz], (0,0,1) (1,0,0) f [Xx, Yy, Zz] - h [Xx, Yy, Zz], (0,1,0) (1,0,0) -f [Xx, Yy, Zz] + g [Xx, Yy, Zz]} HTH, -- Jean-Marc