2
$\begingroup$

I can define a composite symbolic transformation as e.g.

tf = RotationTransform[θ, {0, 0, 1}] @* TranslationTransform[{0, 0, 1}]

which returns (in InputForm, for clarity)

TransformationFunction[{{0, -1, 0, 0}, {1, 0, 0, 0}, {0, 0, 1, 1}, {0, 0, 0, 1}}]

How can I then use

CoordinateTransformData[X, "MappingJacobianDeterminant"]

to get the JacobianDeterminant for tf via some X derived from tf, given that I am receiving a clear and specific error message, to wit:

CoordinateTransformData::notent: TransformationFunction[...] is not a known entity, class, or tag for CoordinateTransformData. Use coordinateTransformData[] for a list of entities

but I don't know how to get any of the allowed types from tf?

How should I define a transformation in order to get the Jacobian Determinant (using the highest level built-in functions)?

EDIT: I would specifically like to know how to use theTransformationFunction as the start point and and CoordinateTransformData as the end point.

$\endgroup$
1
$\begingroup$

The transformation function is:

ft = RotationTransform[\[Theta], {0, 0, 1}]@*
  TranslationTransform[{0, 0, 1}];

As a function of x, y, and z:

ftxyz = ft[{x, y, z}] = {x Cos[\[Theta]] - y Sin[\[Theta]], y Cos[\[Theta]] + x Sin[\[Theta]], 1 + z}

By the definition of a Jacobian:

f1[x_, y_, z_] := ftxyz[[1]]
f2[x_, y_, z_] := ftxyz[[2]]
f3[x_, y_, z_] := ftxyz[[3]]

j = {{D[f1[x, y, z], x], D[f1[x, y, z], y], D[f1[x, y, z], z]},
     {D[f2[x, y, z], x], D[f2[x, y, z], y], D[f2[x, y, z], z]},
     {D[f3[x, y, z], x], D[f3[x, y, z], y], D[f3[x, y, z], z]}} =

{{Cos[\[Theta]], -Sin[\[Theta]], 0}, 
 {Sin[\[Theta]], Cos[\[Theta]],  0}, 
 {0,                 0,          1}}

The above should be the Jacobian of the transformation. Its determinant is 1.

Your original question was, essentially, How can I use CoordinateTransformData to produce the determinate of a Jacobian of a composite of a rotation and translation function? My answer is, You can't. CoordinateTransformData only deals with transformations from one coordinate system to another, as the first two examples from the Documentation clearly show:

Conversion between spherical and Cartesian coordinates in three dimensions:

 CoordinateTransformData["Spherical" -> "Cartesian", "Mapping", {r, \[Theta], \[CurlyPhi] ->
    (* {r Cos[\[CurlyPhi]] Sin[\[Theta]], r Sin[\[Theta]] Sin[\[CurlyPhi]], 
 r Cos[\[Theta]]} *)

CoordinateTransformData["Cartesian" -> "Spherical", "Mapping", {x, y, z}] ->

Sqrt[x^2 + y^2 + z^2], ArcTan[z, Sqrt[x^2 + y^2]], ArcTan[x, y]}

You can ask for the JabobianMapping and/or the JacobianMappingDeterminant from CoordinateTransformData, but you will receive results from the transformation from one coordinate system to another. That is all CoordinateTransformData does.

You can roll your own:

transformJacobian[trans_, vars_] := Module[
  {f = FullSimplify@trans[vars], jabobian, det, n = Length[vars], row,
    col},
  jabobian = ConstantArray[0, {n, n}];
  For[row = 1, row <= n, ++row,
   For[col = 1, col <= n, ++col,
    jabobian[[row, col]] = D[f[[row]], vars[[col]]]]];
  Print["Jabobian: ", MatrixForm@ jabobian];
  det = Simplify@Det[jabobian];
  Print["Determinant: ", det];
  {jabobian, det}]

transformJacobian[ft, {x, y, z}]

   Jabobian: (Cos[\[Theta]] -Sin[\[Theta]]  0
              Sin[\[Theta]] Cos[\[Theta]]   0
               0    0   1 )

Determinant: 1

    {{{Cos[\[Theta]], -Sin[\[Theta]], 0}, {Sin[\[Theta]], Cos[\[Theta]], 
   0}, {0, 0, 1}}, 1}
$\endgroup$
  • $\begingroup$ Thanks, that's a nicely worked example but I was aware of the calculus and am really hoping for insight into the functions referred to in the question (now edited for specificity). $\endgroup$ – Julian Moore Jun 5 '17 at 5:28
  • $\begingroup$ Thank you for the extras; it's good to know that I can't get the Jacobian determinant from Coordinate Transform Data. NB whilst the documentation does show that CoordinateTransformData deals with transformations from one coordinate system to another, it is not obvious that this is the only thing it does :) $\endgroup$ – Julian Moore Jun 10 '17 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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