4
$\begingroup$

I am doing

r[psi_, th_, phi_] := {Cos[(phi + psi)/2]*Cos[th/2],Cos[(phi - psi)/2]*Sin[th/2], Sin[(phi - psi)/2]*Sin[th/2], Sin[(phi + psi)/2]*Cos[th/2]}

and that's fine, but I would like to take its Jacobian matrix as a function of psi, th, and phi.

Per this webpage https://mathworld.wolfram.com/Jacobian.html, I am trying

JacobianMatrix[f_List?VectorQ, x_List] := Outer[D, f, x] /; Equal @@ (Dimensions /@ {f, x})

Dr[psi_,th__,phi_] := JacobianMatrix[{Cos[(phi + psi)/2]*Cos[th/2], Cos[(phi - psi)/2]*Sin[th/2], Sin[(phi - psi)/2]*Sin[th/2], Sin[(phi + psi)/2]*Cos[th/2]}, {phi, th, psi}]

but it is coming back as

$Failed

I would like to go on to do

DrT[psi_,th_,phi_] := Transpose[Dr]

f[{x1_, x2_, x3_, x4_}] := x1^2 + 2 x3^2 + 4 x4^2

Integrate[f[r[psi, th, phi]]*Sqrt[Det[DrT[psi_,th_,phi_]*Dr[psi_,th_,phi_]]], {psi, 0, 2 Pi}, {th, 0, Pi}, {phi, 0, 2 Pi}]

to compute a surface integral over a 3-manifold. Can anyone help me get this working?

$\endgroup$
6
  • 6
    $\begingroup$ Nowadays, one would do something like D[r[psi, th, phi], {{psi, th, phi}}] to get a Jacobian. $\endgroup$ Commented May 10, 2020 at 13:13
  • $\begingroup$ Thanks you so much! I tried evaluating Dr[psi, th, phi] = D[r[psi, th, phi], {{psi, th, phi}}] Dr[Pi, Pi, Pi], but it just returns (cont) $\endgroup$ Commented May 10, 2020 at 14:58
  • $\begingroup$ {{-(1/2) Cos[th/2] Sin[(phi + psi)/2], -(1/2) Cos[(phi + psi)/2] Sin[ th/2], -(1/2) Cos[th/2] Sin[(phi + psi)/2]}, {1/ 2 Sin[(phi - psi)/2] Sin[th/2], 1/2 Cos[(phi - psi)/2] Cos[th/2], -(1/2) Sin[(phi - psi)/2] Sin[th/ 2]}, {-(1/2) Cos[(phi - psi)/2] Sin[th/2], 1/2 Cos[th/2] Sin[(phi - psi)/2], 1/2 Cos[(phi - psi)/2] Sin[th/2]}, {1/ 2 Cos[(phi + psi)/2] Cos[th/2], -(1/2) Sin[(phi + psi)/2] Sin[th/ 2], 1/2 Cos[(phi + psi)/2] Cos[th/2]}}[\[Pi], \[Pi], \[Pi]] $\endgroup$ Commented May 10, 2020 at 14:59
  • 1
    $\begingroup$ Try this: Remove[Dr]; Dr[psi_, th_, phi_] = D[r[psi, th, phi], {{psi, th, phi}}] $\endgroup$ Commented May 10, 2020 at 15:00
  • 1
    $\begingroup$ Please consider writing an answer to your own question, if you've managed to figure it out. $\endgroup$ Commented May 10, 2020 at 15:45

1 Answer 1

4
$\begingroup$

Per @J. M.'s technical difficulties's help, this worked for me:

r[psi_, th_, phi_] := {Cos[(phi + psi)/2]*Cos[th/2], Cos[(phi - psi)/2]*Sin[th/2],
                       Sin[(phi - psi)/2]*Sin[th/2], Sin[(phi + psi)/2]*Cos[th/2]}

Dr[psi_, th_, phi_] = D[r[psi, th, phi], {{psi, th, phi}}] 

DrT[psi_, th_, phi_] = Transpose[Dr[psi, th, phi]]

f[{x1_, x2_, x3_, x4_}] := x1^2 + 2x3^2 + 4x4^2

Integrate[f[r[psi, th, phi]]*Sqrt[Det[DrT[psi, th, phi].Dr[psi, th, phi]]],
          {psi, 0, 2Pi}, {th, 0, Pi}, {phi, 0, 2Pi}]

The problem is an integral of a scalar function over $SO(3)$, for those who are interested (It's actually an integral over half of $S^3$, but the function is constant over the antipodal map on $S^3$ and so "descends" to a unique function on $SO(3)$).

The answer is $\frac74 \pi^2$, for those playing the home version of the game.

Thanks so much for all the help, sir. This problem was a little too hard for my students to do by hand (although the integral appears to be elementary), but I'll work on it over the Summer, and, hopefully have an Extra Credit problem that involves $SO(3)$ and is doable by hand for them in time for the Fall.

Thanks again.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.