In the examples that follow, as well as in the context of tensor computations with the Physics package, Einstein's summation convention for repeated indices is used.
Set a system of coordinates - say X
Define some tensors for experimentation
Compute the Lie derivative of a scalar : it is the same as the directional derivative in the direction of
Because the spacetime at this point in the worksheet is flat, the output above involves d_, not the covariant D_. Set the spacetime to any nongalilean value, for instance (see g_):
Use the declare facility of PDEtools to avoid redundant display of functionality and have derivatives displayed with compact indexed notation
The Lie derivatives of the covariant and contravariant vectors and differ in the sign of the second term, but not just in that: note the different ways in which the index is contracted
The index in enters the Lie derivative as a dummy. If this dummy is found in the indices of the derivand, it is automatically replaced by another spacetime index. For example: pass and with the same index
You can also pass without indices, with or without functionality depending on whether is constant, in which case only the part involving the Christoffel symbols remains after computing the covariant derivative:
When the derivand is a contravariant vector field, the Lie derivative is equal to the the LieBracket between the indexing vector field in the above) and the derivand . For that reason, you can also pass the first argument to LieBracket with or without the index
So in LieBracket the free index of the first vector field is also a dummy and the index of the second one is the free index of the result.
The Lie derivative of a contains three terms: first there is the term equivalent to a directional derivative, then another with a minus sign related to the contravariant index, then another one related to the covariant index
The Lie derivative is essentially the change in form of the derivand under transformations generated by the indexing vector field ( in the examples above). In turn the Killing vectors generate transformations that leave the form of the spacetime metric g_ invariant. So equating to zero the Lie Derivative of the metric (currently Schwarzschild) results in a system of partial differential equations defining the Killing vectors
The array of Killing equations behind this tensorial expression can be obtained with TensorArray, KillingVectors or the Library command TensorComponents:
These equations can be solved using pdsolve
Alternatively, the same equations components of the tensorial expression (15) can be obtained directly with KillingVectors that in addition performs a reduction to involutive form (canonical form) for the DE system, and can as well compute and solve the equations all in one go
Yet another manner of obtaining the same result is using Physics:-Library:-TensorComponents - that computes similar to TensorArray - but returns a list of equations instead, where the ordering is ascending with respect to value of the free indices -
Expanding the sum over the repeated indices,