Let's start with the definition of the Elliptic Cylindrical coordinates, that tells us how they map to cartesian coordinates:
\[CurlyPhi] = {\[FormalA] Cosh[u] Cos[v], \[FormalA] Sinh[u] Sin[v], w}
Honestly, i mainly used [FormalA] here, because the function TransformedField
that we'll use later uses it by default for the free parameter a
of the coordinate system and i haven't figured out yet how to specify a different value, so this choice of naming saves us one symbol replacement later.
Alternatively, instead of giving the definition manually we could also conveniently use
\[CurlyPhi] = CoordinateTransformData[
"EllipticCylindrical" -> "Cartesian",
"Mapping",
{u, v, w}
]
, which does the same.
Now, since we want to have the basis vectors and not just the point mappings, we need the jacobian with respect to {u,v,w}
which gives us the unnormalized basis vectors:
jacobian = D[\[CurlyPhi], {{u, v, w}}];
jacobian // MatrixForm
Now we can use the builtin function TransformedField
to reexpress the jacobian in cartesian coordinates for us:
basisunnormalized =
Simplify[
TransformedField[
"EllipticCylindrical" -> "Cartesian",
Transpose[jacobian],
{u, v, w} -> {x, y, z}
],
\[FormalA] > 0
]
Note that we transposed the jacobian, so that each of the three list elements holds a basis-vector (corresponding to the direction of increasing u
, v
and w
).
We can already plot this
GraphicsRow[
VectorPlot[#, {x, -2, 2}, {y, -2, 2}] & /@
(basisunnormalized[[{1, 2}, {1, 2}]] /. \[FormalA] -> 1)
]
or normalize the basis vectors if needed.
Edit:
The choice to start with the jacobian was mainly based on its simpler structure compared to the normalized basis vectors, which gives simpler (plain rational fraction without trigonometric functions) expressions after invoking TransformedField
. But with some extra care we can also work with the normalized basis vectors and in the process skip a lot of manual work.
The basis you gave in the questions can either be computed via normalizing our jacobian
basisnormalized = Transpose[
Simplify[
Normalize /@ Transpose[jacobian],
u > 0 && v > 0 && \[FormalA] > 0
]
]
or directly via
basisnormalized = CoordinateTransformData[
"EllipticCylindrical" -> "Cartesian",
"OrthonormalBasisRotation",
{u, v, w}
]
giving
basisnormalized //MatrixForm
Invoking TransformedField
now already works but can't get rid of the trigonometric functions Cos[2 v]
and Cosh[2 u]
which contain double angles. By using TrigExpand
we can convert them to powers of single angle trigonometric expressions, which TransformedField
has an easier time with:
basisnormalized2 = basisnormalized /. {a : (Cos | Cosh)[2 _] :> TrigExpand[a]}
or in an easier readable form
basisnormalized2 = basisnormalized /. {
Cos[2 v] -> Cos[v]^2 - Sin[v]^2,
Cosh[2 u] -> Cosh[u]^2 + Sinh[u]^2
};
results in
basisnormalized2 //MatrixForm
which we can use to get an expression in terms of x
, y
and z
without trigonometric functions:
basisnormalizedcartesian = Simplify[
TransformedField[
"EllipticCylindrical" -> "Cartesian",
basisnormalized2,
{u, v, w} -> {x, y, z}
],
\[FormalA] > 0
]
CoordinateTransform
. You can just write your own functionsellipticCylToCartesian[{mu,v,z}]
andcartesianToEllipticCyl[{x,y,z}]
. $\endgroup$ellipticCylToCartesian[{mu,v,z}] := "the equations"
? Note that by "the equations", I mean the equations I have originally provided in the question prompt. Thank you. $\endgroup$