0
$\begingroup$

I am trying to write Mathematica file to find Div, Grad, Laplacian, etc. in coordinates given by a metric tensor w.r.t Euclidean coordinates.

In test my file, I am first trying it on cylindrical coordinates $(r,\theta,z)$. Here $f$ is defined as a scalar valued function dependent on these coordinates.

I am running into the following problem. In one of the steps, I get terms like the following:

$2f^{(0,1,0)}\lbrack r,\theta,z\rbrack^{(0,1,0)}\lbrack r,\theta,z\rbrack$

$2f^{(0,1,0)}\lbrack r,\theta,z\rbrack\lbrack r,\theta,z\rbrack$

How do I interpret these? Are they different or do they mean the same thing? I know that the superscripts refer to derivative with respect to the coordinate that is non-zero.

$\endgroup$
8
  • $\begingroup$ The output is very likely not what you want, and indicates that you did something wrong. Since you didn't say what input you actually used, I can only guess that you will find the answer to your problem here: How to write a differential operator in Mathematica. Another possible source of inspiration is: Having the derivative be an operator $\endgroup$
    – Jens
    Jun 12, 2013 at 21:47
  • $\begingroup$ Another possible source to look at: How to change coordinates of a differential operator? $\endgroup$
    – Jens
    Jun 12, 2013 at 21:50
  • $\begingroup$ You may also take a look at this: Using D to find a symbolic derivative $\endgroup$
    – Artes
    Jun 12, 2013 at 23:04
  • $\begingroup$ Perhaps you are missing some semicolons in your input, and various terms are getting (erroneously) multiplied by each other. $\endgroup$
    – bill s
    Jun 13, 2013 at 3:04
  • 2
    $\begingroup$ There are several votes to close as a duplicate, but I do not find that the question asked here is answered in the duplicates. I would say it is probably too localized, since it appears from what has been given that it is probably a coding error. $\endgroup$
    – Michael E2
    Jun 13, 2013 at 14:22

0

Browse other questions tagged or ask your own question.