{ "cells": [ { "cell_type": "markdown", "id": "96c3442e", "metadata": {}, "source": [ "# 球座標のホッジラプラシアン\n", "\n", "球座標 $(r,\\theta,\\phi)$ におけるユークリッド計量は\n", "\n", "$$ds^2=dr^2+r^2d\\theta^2+r^2\\sin^2\\theta\\,d\\phi^2.$$\n", "\n", "です。この計量から $d$、$\\star$、余微分を構成します。以下で採用する\n", "余微分の規約では、スカラーに対する結果は通常の座標表示による\n", "正符号のラプラス作用素に負号を付けたものになります。\n" ] }, { "cell_type": "markdown", "id": "80c07a49", "metadata": {}, "source": [ "## 球座標の計量\n", "\n", "計量の行列式は $r^4\\sin^2\\theta$ です。一方、逆計量には角度方向の\n", "尺度因子 $r^{-2}$ と $(r^2\\sin^2\\theta)^{-1}$ が含まれます。\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "8851b573", "metadata": {}, "outputs": [], "source": [ "declare symbol r, θ, φ : MathValue\n", "\n", "def N : Integer := 3\n", "def x : Vector MathValue := [| r, θ, φ |]\n", "\n", "def g_i_j : Matrix MathValue :=\n", " [| [| 1, 0, 0 |]\n", " , [| 0, r ^ 2, 0 |]\n", " , [| 0, 0, r ^ 2 * (sin θ) ^ 2 |] |]_i_j\n", "def g~i~j : Matrix MathValue :=\n", " [| [| 1, 0, 0 |]\n", " , [| 0, 1 / r ^ 2, 0 |]\n", " , [| 0, 0, 1 / (r ^ 2 * (sin θ) ^ 2) |] |]~i~j\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "2015dd74", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 1 & 0 & 0 \\\\ 0 & r^{2} & 0 \\\\ 0 & 0 & \\sin(θ)^{2} r^{2} \\\\ \\end{pmatrix}_{\\#\\#}^{\\;\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g_#_#\n" ] }, { "cell_type": "markdown", "id": "c00a1543", "metadata": {}, "source": [ "## 微分形式の演算子\n", "\n", "ホッジスターは $g^{ij}$ で形式の添字を上げ、3次元の\n", "レヴィ・チヴィタテンソルと縮約します。\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "210a0cf0", "metadata": {}, "outputs": [], "source": [ "def d (A : Tensor MathValue) : Tensor MathValue :=\n", " !(flip ∂/∂) x A\n", "\n", "def hodge (A : DiffForm MathValue) : DiffForm MathValue :=\n", " let k := dfOrder A\n", " in withSymbols [i, j]\n", " sqrt (abs (M.det g_#_#)) *\n", " foldl\n", " (.)\n", " ((ε' N k)_(i_1)..._(i_N) . A..._(j_1)..._(j_k))\n", " (map (\\n -> g~(i_n)~(j_n)) [1..k])\n", "\n", "def δ (A : DiffForm MathValue) : DiffForm MathValue :=\n", " let k := dfOrder A\n", " in ((-1) ^ (N * (k + 1) + 1)) * hodge (d (hodge A))\n" ] }, { "cell_type": "markdown", "id": "08fa7851", "metadata": {}, "source": [ "ホッジラプラシアンは $d\\delta+\\delta d$ です。スカラーと体積形式には、\n", "より短い端点の公式を用います。\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "138d5b01", "metadata": {}, "outputs": [], "source": [ "def Δ (A : DiffForm MathValue) : DiffForm MathValue :=\n", " match dfOrder A as integer with\n", " | #0 -> δ (d A)\n", " | #N -> d (δ A)\n", " | _ -> d (δ A) + δ (d A)\n", "\n", "def f : MathValue := function (r, θ, φ)\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "5dd385fe", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$-\\frac{\\partial^2 f}{\\partial 1^2} - 2 \\frac{\\partial f}{\\partial 1} r^{-1} - \\frac{\\partial^2 f}{\\partial 2^2} r^{-2} - \\cos(θ) \\sin(θ)^{-1} \\frac{\\partial f}{\\partial 2} r^{-2} - \\sin(θ)^{-2} \\frac{\\partial^2 f}{\\partial 3^2} r^{-2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Δ f\n" ] }, { "cell_type": "markdown", "id": "a1f2e150", "metadata": {}, "source": [ "式を簡約すると、出力は\n", "\n", "$$\n", "\\Delta f=-\\left(\n", "f_{rr}+\\frac{2}{r}f_r\n", "+\\frac1{r^2}f_{\\theta\\theta}\n", "+\\frac{\\cos\\theta}{r^2\\sin\\theta}f_\\theta\n", "+\\frac1{r^2\\sin^2\\theta}f_{\\phi\\phi}\n", "\\right).\n", "$$\n", "\n", "となります。座標に依存する各係数はすべて計量から導かれており、\n", "球座標のラプラシアンの公式そのものは計算への入力として使っていません。\n" ] } ], "metadata": { "kernelspec": { "display_name": "Egison", "language": "egison", "name": "egison" }, "language_info": { "codemirror_mode": "egison", "file_extension": ".egi", "mimetype": "text/x-egison", "name": "egison" } }, "nbformat": 4, "nbformat_minor": 5 }