• Hessian matrix in spherical coordinates

    From Albaraa Khayat@21:1/5 to All on Mon Jul 24 10:15:06 2023
    Does anyone have a reference for the Hessian matrix in spherical coordinates?
    I have only come across the appendix in https://arxiv.org/pdf/0705.3747.pdf
    I would like to find another for confirmation.
    Introductory calculus refer to the Hessian as a double application of the differentiation matrix, but that result would be different than the one in the reference above. Hence I would like to find an explicitly written Hessian.

    Much gracias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nobody@nowhere.invalid@21:1/5 to Albaraa Khayat on Sat Jul 29 13:34:07 2023
    Albaraa Khayat schrieb:

    Does anyone have a reference for the Hessian matrix in spherical
    coordinates?
    I have only come across the appendix in
    https://arxiv.org/pdf/0705.3747.pdf
    I would like to find another for confirmation.
    Introductory calculus refer to the Hessian as a double application of
    the differentiation matrix, but that result would be different than
    the one in the reference above. Hence I would like to find an
    explicitly written Hessian.

    Much gracias


    The final Hessian (A13) from the paper:

    [[DIF(Phi(r, theta, phi), r, 2),
    (r*DIF(DIF(Phi(r, theta, phi), r), theta)
    - DIF(Phi(r, theta, phi), theta))/r^2,
    (r*DIF(DIF(Phi(r, theta, phi), r), phi)
    - DIF(Phi(r, theta, phi), phi))/(r^2*SIN(theta))],
    [(r*DIF(DIF(Phi(r, theta, phi), r), theta)
    - DIF(Phi(r, theta, phi), theta))/r^2,
    DIF(Phi(r, theta, phi), theta, 2)/r^2
    + DIF(Phi(r, theta, phi), r)/r,
    DIF(DIF(Phi(r, theta, phi), theta), phi)/(r^2*SIN(theta))
    - COS(theta)*DIF(Phi(r, theta, phi), phi)/(r^2*SIN(theta)^2)], [(r*DIF(DIF(Phi(r, theta, phi), r), phi)
    - DIF(Phi(r, theta, phi), phi))/(r^2*SIN(theta)),
    DIF(DIF(Phi(r, theta, phi), theta), phi)/(r^2*SIN(theta))
    - COS(theta)*DIF(Phi(r, theta, phi), phi)/(r^2*SIN(theta)^2),
    DIF(Phi(r, theta, phi), phi, 2)/(r^2*SIN(theta)^2)
    + DIF(Phi(r, theta, phi), r)/r
    + COS(theta)*DIF(Phi(r, theta, phi), theta)/(r^2*SIN(theta))]]

    looks plausible in that it is symmetric and in that its trace agrees
    with the Laplace operator in spherical coordinates:

    Phi(r, theta, phi) :=

    LAPLACIAN(Phi(r, theta, phi), spherical)

    COT(theta)*DIF(Phi(r, theta, phi), theta)/r^2
    + DIF(Phi(r, theta, phi), phi, 2)/(r^2*SIN(theta)^2)
    + (r^2*DIF(Phi(r, theta, phi), r, 2)
    + 2*r*DIF(Phi(r, theta, phi), r)
    + DIF(Phi(r, theta, phi), theta, 2))/r^2

    where the spherical coordinates are defined through:

    spherical := [[r, theta, phi], [1, r, r*SIN(theta)]]

    The computer algebra system used here (Derive version 6.10) can compute
    the gradient and the Laplacian and some other stuff in arbitrary
    orthogonal coordinates, but unfortunately not the Hessian (there is a formidable library for tensor computations though, which I don't want
    to delve into now) - maybe some other system makes this easy?

    The gradient, denoted by T = nabla(Phi) in the paper, results to:

    GRAD(Phi(r, theta, phi), spherical)

    [DIF(Phi(r, theta, phi), r),
    DIF(Phi(r, theta, phi), theta)/r,
    DIF(Phi(r, theta, phi), phi)/(r*SIN(theta))]

    Simply iterating the gradient gives a matrix that lacks symmetry and
    needs additive corrections; take (A.12b) for example:

    GRAD(GRAD(Phi(r, theta, phi), spherical) SUB 1, spherical) SUB 2
    - (1/r)*GRAD(Phi(r, theta, phi), spherical) SUB 2

    DIF(DIF(Phi(r, theta, phi), r), theta)/r
    - DIF(Phi(r, theta, phi), theta)/r^2

    The correction vanishes for the symmetric partner:

    GRAD(GRAD(Phi(r, theta, phi), spherical) SUB 2, spherical) SUB 1
    - 0

    (r*DIF(DIF(Phi(r, theta, phi), r), theta)
    - DIF(Phi(r, theta, phi), theta))/r^2

    but the result is the same. The background to this should be found in
    the Misner-Thorne-Wheeler "phone book" (Reference 14 of the paper).

    Hope the above is useful; it would be nice however if some other system
    could be shown to compute a Hessian like this automatically.

    Martin.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)