MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Quaternion problem--> Jacobian derivation/ Metric

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68122] Re: Quaternion problem--> Jacobian derivation/ Metric
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Mon, 24 Jul 2006 05:52:29 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <e7ap5q$952$1@smc.vnet.net> <e7lf1d$3l9$1@smc.vnet.net> <e7no3j$97f$1@smc.vnet.net> <e9ri0i$pa1$1@smc.vnet.net> <e9sukq$rl6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <e9sukq$rl6$1 at smc.vnet.net>,
 Roger Bagula <rlbagula at sbcglobal.net> wrote:

> I did Jacobians and metrics way back in Mathematica using
> a Jacobian matrix form from Theoretical Mechanics ,Ames and Murnagham, 
> Dover Books.

D was extended to compute the Jacobian directly in version 5.1. 
Alternatively, you can compute the Jacobian using Outer:

  Outer[D, f, vars]

where f is list of functions and vars is a list of variables.

> (*The hard way:  there has got to be a more compact way of doing this!*)

Indeed there is.

> Exp[r]*{Cos[d], Sin[d]*Sin[p]*Cos[t], Sin[d]*Sin[p]*Sin[t], Sin[d]*Cos[p]}
> x = Exp[r]*Sin[d]*Sin[p]*Cos[t]
> y = Exp[r]*Sin[d]*Sin[p]*Sin[t]
> z = Exp[r]*Sin[d]*Cos[p]
> t0 = Exp[r]*Cos[d]
> xr = D[x, r]
> yr = D[y, r]
> zr = D[z, r]
> tr = D[t0, r]
> xt = D[x, t]
> yt = D[y, t]
> zt = D[z, t]
> tt = D[t0, t]
> xp = D[x, p]
> yp = D[y, p]
> zp = D[z, p]
> tp = D[t0, p]
> xd = D[x, d]
> yd = D[y, d]
> td = D[t0, d]

No need to explicitly define x, y, z, and t0. The Jacobian is just

  jacobian = D[Exp[r] {Cos[d], Sin[d] Sin[p] Cos[t], 
    Sin[d] Sin[p] Sin[t], Sin[d] Cos[p]}, {{r,t,p,d}}];

Alternatively in Mathematica pre 5.1,

  jacobian = Outer[D, Exp[r] {Cos[d], Sin[d] Sin[p] Cos[t], 
    Sin[d] Sin[p] Sin[t], Sin[d] Cos[p]}, {r,t,p,d}];

> h1 = FullSimplify[1/Sqrt[xr^2 + yr^2 + zr^2 + tr^2]]
> h2 = FullSimplify[1/Sqrt[xt^2 + yt^2 + zt^2 + tt^2]]
> h3 = FullSimplify[1/Sqrt[xp^2 + yp^2 + zp^2 + tp^2]]
> h4 = FullSimplify[1/Sqrt[xd^2 + yd^2 + zd^2 + td^2]]
>
> rra = Simplify[Expand[1/h1^2]]
> tta = Simplify[Expand[1/h2^2]]
> ppa = Simplify[Expand[1/h3^2]]
> dda = Simplify[Expand[1/h4^2]]
> 
The square of the scale factors can be obtained directly as

  Tr[ Transpose[jacobian] . jacobian, List] // Simplify

Cheers,
Paul

_______________________________________________________________________
Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: HoldForm
  • Next by Date: Re: simple antiderivative
  • Previous by thread: Re: Quaternion problem--> Jacobian derivation/ Metric
  • Next by thread: Re: Quaternion problem--> Jacobian derivation/ Metric