{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# From Boyer-Lindquist to Kerr coordinates in Kerr spacetime\n", "\n", "This Jupyter/SageMath notebook is relative to the lectures\n", "[Geometry and physics of black holes](https://luth.obspm.fr/~luthier/gourgoulhon/bh16/).\n", "\n", "The involved computations are based on tools developed through the [SageManifolds](https://sagemanifolds.obspm.fr) project." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*NB:* a version of SageMath at least equal to 8.2 is required to run this notebook:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'SageMath version 9.1.beta8, Release Date: 2020-03-18'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "version()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First we set up the notebook to display mathematical objects using LaTeX rendering:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "%display latex" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To speed up the computations, we ask for running them in parallel on 8 threads:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "Parallelism().set(nproc=8)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Spacetime manifold\n", "\n", "We declare the Kerr spacetime (or more precisely the Boyer-Lindquist domain of Kerr spacetime) as a 4-dimensional Lorentzian manifold:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "4-dimensional Lorentzian manifold M\n" ] } ], "source": [ "M = Manifold(4, 'M', latex_name=r'\\mathcal{M}', structure='Lorentzian')\n", "print(M)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us declare the **Boyer-Lindquist coordinates** via the method `chart()`, the argument of which is a string expressing the coordinates names, their ranges (the default is $(-\\infty,+\\infty)$) and their LaTeX symbols:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Chart (M, (t, r, th, ph))\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "Chart (M, (t, r, th, ph))" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "BL. = M.chart(r't r th:(0,pi):\\theta ph:(0,2*pi):periodic:\\phi') \n", "print(BL) ; BL" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(t, r)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "BL[0], BL[1]" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "t: (-oo, +oo); r: (-oo, +oo); th: (0, pi); ph: [0, 2*pi] (periodic)" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "BL.coord_range()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Metric tensor

\n", "\n", "

The 2 parameters $m$ and $a$ of the Kerr spacetime are declared as symbolic variables:

" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(m, a)" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "var('m, a', domain='real')" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "assume(m>a)\n", "assume(m^2 - a^2 >0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We get the (yet undefined) spacetime metric by " ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "g = M.metric()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The metric is set by its components in the coordinate frame associated with Boyer-Lindquist coordinates, which is the current manifold's default frame:

" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "g = (2*m*r/(a^2*cos(th)^2 + r^2) - 1) dt*dt - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dt*dph + (a^2*cos(th)^2 + r^2)/(a^2 - 2*m*r + r^2) dr*dr + (a^2*cos(th)^2 + r^2) dth*dth - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dph*dt + (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2 dph*dph" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "rho2 = r^2 + (a*cos(th))^2\n", "Delta = r^2 -2*m*r + a^2\n", "g[0,0] = -(1-2*m*r/rho2)\n", "g[0,3] = -2*a*m*r*sin(th)^2/rho2\n", "g[1,1], g[2,2] = rho2/Delta, rho2\n", "g[3,3] = (r^2+a^2+2*m*r*(a*sin(th))^2/rho2)*sin(th)^2\n", "g.display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

A matrix view of the components with respect to the manifold's default vector frame:

" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ 2*m*r/(a^2*cos(th)^2 + r^2) - 1 0 0 -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2)]\n", "[ 0 (a^2*cos(th)^2 + r^2)/(a^2 - 2*m*r + r^2) 0 0]\n", "[ 0 0 a^2*cos(th)^2 + r^2 0]\n", "[ -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) 0 0 (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The list of the non-vanishing components:

" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "g_t,t = 2*m*r/(a^2*cos(th)^2 + r^2) - 1 \n", "g_t,ph = -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) \n", "g_r,r = (a^2*cos(th)^2 + r^2)/(a^2 - 2*m*r + r^2) \n", "g_th,th = a^2*cos(th)^2 + r^2 \n", "g_ph,t = -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) \n", "g_ph,ph = (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2 " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.display_comp()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Levi-Civita Connection

\n", "\n", "

The Levi-Civita connection $\\nabla$ associated with $g$:

" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Levi-Civita connection nabla_g associated with the Lorentzian metric g on the 4-dimensional Lorentzian manifold M\n" ] } ], "source": [ "nabla = g.connection() ; print(nabla)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Let us verify that the covariant derivative of $g$ with respect to $\\nabla$ vanishes identically:

" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "nabla_g(g) = 0" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "nabla(g).display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 3+1 Kerr coordinates" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "Chart (M, (ti, r, th, tph))" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "KC. = M.chart(r'ti:\\tilde{t} r th:(0,pi):\\theta tph:(0,2*pi):periodic:\\tilde{\\phi}')\n", "KC" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The transition from Boyer-Lindquist to 3+1 Kerr coordinates:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "ti = ((m + sqrt(-a^2 + m^2))*log(-1/2*(m - r + sqrt(-a^2 + m^2))/m) - (m - sqrt(-a^2 + m^2))*log(-1/2*(m - r - sqrt(-a^2 + m^2))/m))*m/sqrt(-a^2 + m^2) + t\n", "r = r\n", "th = th\n", "tph = 1/2*a*log((m - r + sqrt(-a^2 + m^2))/(m - r - sqrt(-a^2 + m^2)))/sqrt(-a^2 + m^2) + ph" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sma = sqrt(m^2 - a^2)\n", "rp = m + sma\n", "rm = m - sma\n", "BL_to_KC = BL.transition_map(KC, [t + m/sma*(rp*ln((r-rp)/(2*m)) - rm*ln((r-rm)/(2*m))),\n", " r,\n", " th,\n", " ph + a/(2*sma)*ln((r-rp)/(r-rm))])\n", "BL_to_KC.display()" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "t = (2*a^2*m*log(2) - 2*m^3*log(2) - sqrt(a + m)*sqrt(-a + m)*m^2*log(-(sqrt(a + m)*sqrt(-a + m) - m + r)/(sqrt(a + m)*sqrt(-a + m) + m - r)) + (a^2 - m^2)*ti - (a^2*m - m^3)*log(a^2 - 2*m*r + r^2) + 2*(a^2*m - m^3)*log(m))/(a^2 - m^2)\n", "r = r\n", "th = th\n", "ph = -1/2*(sqrt(a + m)*a*sqrt(-a + m)*log(-(a^2 - 2*m*r + r^2)/(a^2 - 2*sqrt(a + m)*sqrt(-a + m)*(m - r) - 2*m^2 + 2*m*r - r^2)) - 2*(a^2 - m^2)*tph)/(a^2 - m^2)" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "BL_to_KC.inverse().display()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "d/dti = d/dt" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "d/dr = -2*m*r/(a^2 - 2*m*r + r^2) d/dt + d/dr - a/(a^2 - 2*m*r + r^2) d/dph" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "d/dth = d/dth" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "d/dtph = d/dph" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for v in KC.frame():\n", " show(v.display())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Components of the metric tensor w.r.t. 3+1 Kerr coordinates" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "g_ti,ti = -(a^2*cos(th)^2 - 2*m*r + r^2)/(a^2*cos(th)^2 + r^2) \n", "g_ti,r = 2*m*r/(a^2*cos(th)^2 + r^2) \n", "g_ti,tph = -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) \n", "g_r,r = (a^2*cos(th)^2 + 2*m*r + r^2)/(a^2*cos(th)^2 + r^2) \n", "g_r,tph = -(2*a^3*m*r*sin(th)^4 + (a*r^4 + (a^3 - 4*a*m^2)*r^2 + (a^5 + a^3*r^2)*cos(th)^2)*sin(th)^2)/(a^2*r^2 - 2*m*r^3 + r^4 + (a^4 - 2*a^2*m*r + a^2*r^2)*cos(th)^2) \n", "g_th,th = a^2*cos(th)^2 + r^2 \n", "g_tph,tph = (2*a^2*m*r*sin(th)^4 + (a^2*r^2 + r^4 + (a^4 + a^2*r^2)*cos(th)^2)*sin(th)^2)/(a^2*cos(th)^2 + r^2) " ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.display_comp(KC.frame(), KC, only_nonredundant=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$g_{r\\tilde{\\phi}}$ can simplified further:" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "-(2*a^3*m*r*sin(th)^4 + (a*r^4 + (a^3 - 4*a*m^2)*r^2 + (a^5 + a^3*r^2)*cos(th)^2)*sin(th)^2)/(a^2*r^2 - 2*m*r^3 + r^4 + (a^4 - 2*a^2*m*r + a^2*r^2)*cos(th)^2)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g13 = g[KC.frame(), 1, 3, KC]\n", "g13" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "-(a^4*cos(th)^2 + a^2*r^2*cos(th)^2 + 2*a^2*m*r*sin(th)^2 + a^2*r^2 - 4*m^2*r^2 + r^4)*a*sin(th)^2/((a^2*cos(th)^2 + r^2)*(a^2 - 2*m*r + r^2))" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g13.factor()" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g13 == - a*(1 + 2*m*r/rho2)*sin(th)^2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We then set (using `add_comp()` to keep the components with respect to BL coordinates):" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "g.add_comp(KC.frame())[1, 3, KC] = - a*(1 + 2*m*r/rho2)*sin(th)^2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Similarly $g_{\\tilde{\\phi}\\tilde{\\phi}}$ can simplified:" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(2*a^2*m*r*sin(th)^4 + (a^2*r^2 + r^4 + (a^4 + a^2*r^2)*cos(th)^2)*sin(th)^2)/(a^2*cos(th)^2 + r^2)" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g33 = g[KC.frame(), 3, 3, KC]\n", "g33" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(a^4*cos(th)^2 + a^2*r^2*cos(th)^2 + 2*a^2*m*r*sin(th)^2 + a^2*r^2 + r^4)*sin(th)^2/(a^2*cos(th)^2 + r^2)" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g33.factor()" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g33 == (r^2 + a^2 + 2*a^2*m*r*sin(th)^2/rho2)*sin(th)^2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We then set (using `add_comp()` to keep the components with respect to BL coordinates):" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [], "source": [ "g.add_comp(KC.frame())[3, 3, KC] = (r^2 + a^2 + 2*a^2*m*r*sin(th)^2/rho2)*sin(th)^2" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "g_ti,ti = -(a^2*cos(th)^2 - 2*m*r + r^2)/(a^2*cos(th)^2 + r^2) \n", "g_ti,r = 2*m*r/(a^2*cos(th)^2 + r^2) \n", "g_ti,tph = -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) \n", "g_r,r = (a^2*cos(th)^2 + 2*m*r + r^2)/(a^2*cos(th)^2 + r^2) \n", "g_r,tph = -a*(2*m*r/(a^2*cos(th)^2 + r^2) + 1)*sin(th)^2 \n", "g_th,th = a^2*cos(th)^2 + r^2 \n", "g_tph,tph = (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2 " ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.display_comp(KC.frame(), KC, only_nonredundant=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Principal null vectors\n", "\n", "Let $k$ be the null vector tangent to the ingoing principal null geodesics associated\n", "with their affine parameter $-r$; the expression of $k$ in term of the 3+1 ingoing Kerr coordinates $(\\tilde{t}, r, \\theta, \\tilde\\phi)$ is \n", "$$k = \\frac{\\partial}{\\partial\\tilde{t}} - \\frac{\\partial}{\\partial\\tilde{r}} $$\n", "The expression of $k$ in terms of the Boyer-Lindquist coordinates is" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "k = d/dti - d/dr" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "k = M.vector_field(name='k')\n", "k[KC.frame(),:,KC] = [1, -1, 0, 0]\n", "k.display(KC)" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "k = (a^2 + r^2)/(a^2 - 2*m*r + r^2) d/dt - d/dr + a/(a^2 - 2*m*r + r^2) d/dph" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "k.display(BL)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Regarding the null vector tangent to the outgoing principal null geodesics, we select\n", "one associated with a (non-affine) parameter $\\lambda$ that is regular accross the two Killing horizons:" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "el = (m*r/(a^2 + r^2) + 1/2) d/dti + (-m*r/(a^2 + r^2) + 1/2) d/dr + a/(a^2 + r^2) d/dtph" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "el = M.vector_field(name='el', latex_name=r'\\ell')\n", "el[KC.frame(),:,KC] = [1/2 + m*r/(r^2+a^2), \n", " 1/2 - m*r/(r^2+a^2),\n", " 0,\n", " a/(r^2 + a^2)]\n", "el.display(KC)" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "el = 1/2 d/dt + 1/2*(a^2 - 2*m*r + r^2)/(a^2 + r^2) d/dr + 1/2*a/(a^2 + r^2) d/dph" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "el.display(BL)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us check that $k$ and $\\ell$ are null vectors:" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "0" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g(k, k).expr()" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "0" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g(el, el).expr()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Their scalar product is $-\\rho^2/(r^2 + a^2)$:" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "-(a^2*cos(th)^2 + r^2)/(a^2 + r^2)" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g(k, el).expr()" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "-dt - (a^2*cos(th)^2 + r^2)/(a^2 - 2*m*r + r^2) dr + (2*a^3*m*r*sin(th)^4 - (2*a^3*m*r - a^3*r^2 + 2*a*m*r^3 - a*r^4 - (a^5 + a^3*r^2)*cos(th)^2)*sin(th)^2)/(a^2*r^2 - 2*m*r^3 + r^4 + (a^4 - 2*a^2*m*r + a^2*r^2)*cos(th)^2) dph" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "uk = k.down(g)\n", "uk.display(BL)" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "-dti - dr + (2*a^3*m*r*sin(th)^4 - (2*a^3*m*r - a^3*r^2 + 2*a*m*r^3 - a*r^4 - (a^5 + a^3*r^2)*cos(th)^2)*sin(th)^2)/(a^2*r^2 - 2*m*r^3 + r^4 + (a^4 - 2*a^2*m*r + a^2*r^2)*cos(th)^2) dtph" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "uk.display(KC)" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(2*a^3*m*r*sin(th)^4 - (2*a^3*m*r - a^3*r^2 + 2*a*m*r^3 - a*r^4 - (a^5 + a^3*r^2)*cos(th)^2)*sin(th)^2)/(a^2*r^2 - 2*m*r^3 + r^4 + (a^4 - 2*a^2*m*r + a^2*r^2)*cos(th)^2)" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "uk[3]" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(a^4*cos(th)^2 + a^2*r^2*cos(th)^2 + 2*a^2*m*r*sin(th)^2 - 2*a^2*m*r + a^2*r^2 - 2*m*r^3 + r^4)*a*sin(th)^2/((a^2*cos(th)^2 + r^2)*(a^2 - 2*m*r + r^2))" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "uk[3].factor()" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "uk[3] == a*sin(th)^2" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 9.1.beta8", "language": "sage", "name": "sagemath" }, "language": "python", "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 1 }