Maxima Function
contragrad ()
Computes the contravariant gradient of a scalar function allowing
the user to choose the corresponding vector name as the example below for the Schwarzschild metric illustrates:
(%i1) load(ctensor); (%o1) /share/tensor/ctensor.mac (%i2) derivabbrev:true; (%o2) true (%i3) ct_coordsys(exteriorschwarzschild,all); (%o3) done (%i4) depends(f,r); (%o4) [f(r)] (%i5) cograd(f,g1); (%o5) done (%i6) listarray(g1); (%o6) [0, f , 0, 0] r (%i7) contragrad(f,g2); (%o7) done (%i8) listarray(g2); f r - 2 f m r r (%o8) [0, -------------, 0, 0] r