1
$\begingroup$

It is known that vector calculus in 3D takes quite a simple form when one uses orthonormal curvilinear coordinates (check out, for example, here, in section "Differentiation"). Is there any possibility to easily use this approach in Mathematica currently (giving just metric tensor $g$ and using some kind of "Laplacian($f$, $g$)" and "Gradient($f$, $g$)", for instance)?

$\endgroup$

1 Answer 1

2
$\begingroup$

If you are satisfied with the metrics defined in CoordinateChartData[]:

CoordinateChartData[] //Short

{{{Bipolar,{\[FormalA]}},Euclidean,2},{{BipolarCylindrical,{\[FormalA]}},Euclidean,3},<<62>>,{Stereographic,{Sphere,{\[FormalCapitalR]}},10}}

then you can do things like:

Grad[f[r, θ, z], {r, θ, z}, "Cylindrical"] //TeXForm

$\left\{f^{(1,0,0)}(r,\theta ,z),\frac{f^{(0,1,0)}(r,\theta ,z)}{r},f^{(0,0,1)}(r,\theta ,z)\right\}$

and:

Laplacian[g[r, θ, ϕ], {r, θ, ϕ}, "Spherical"] //TeXForm

$\frac{\frac{g^{(0,2,0)}(r,\theta ,\phi )}{r}+g^{(1,0,0)}(r,\theta ,\phi )}{r}+g^{(2,0,0)}(r,\theta ,\phi )+\frac{\csc (\theta ) \left(\sin (\theta ) g^{(1,0,0)}(r,\theta ,\phi )+\frac{\cos (\theta ) g^{(0,1,0)}(r,\theta ,\phi )}{r}+\frac{\csc (\theta ) g^{(0,0,2)}(r,\theta ,\phi )}{r}\right)}{r}$

$\endgroup$

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.