H.T. Cho, A.S. Cornell, Jason Doukas and Wade Naylor, Class. Quantum Grav. 27 (2010) 155004 (12pp).
https://iopscience.iop.org/article/10.1088/0264-9381/27/15/155004/meta
Equations 33 and 34 in the paper.
$\large \lambda_0(\xi) = -{1\over p} \left[ p' - {2 i\omega \over \kappa_1(\xi - \xi_1)} -2 i \omega \right]$
$\large s_0(\xi) = {1\over p} \left[ \ell(\ell +1) + (1-s^2) \left( 2M\xi - (4-s^2){\Lambda \over 6\xi^2} \right) + {i\omega \over \kappa_1(\xi - \xi_1)^2} \left( {i\omega \over \kappa_1} +1 \right) + (p' - 2i\omega) {i\omega \over \kappa_1(\xi - \xi_1)} \right] $
In [1]:
# Python program to use AIM tools
from asymptotic import *
# a high precision math library:
# it is used to obtain roots of a function with high precision.
import mpmath
# To draw potentials and its derivatie
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
In [2]:
# symengine (symbolic) variables for lambda_0 and s_0
En, r, xi, xi1, k1 = se.symbols(r'En, r, xi, xi_1, kappa_1')
l, s, M, Lambda = se.symbols(r'\ell, s, M, Lambda')
In [3]:
def Vf(r):
"""
Master potential defined in Eq. 2 in the paper.
"""
return f(r)*(l*(l+1)/r**2 + (1-s**2) * (2*M/r**3 - (4-s**2)*Lambda/6))
def f(r):
"""
A function defined in Eq 3. with the cosmological constant Lambda .
"""
return 1 - 2*M/r - Lambda*r**2/3
def dVf(r0):
"""
Derivative of the master potential.
"""
return sym.diff(Vf(r), r).subs(r, r0)
def dVf_mpmath(r0):
"""
Derivative of the master potential with numerical parameters.
"""
dV = dVf(r).subs({l:nl, s: ns, Lambda: nLambda, M: nM})
dVs = sym.lambdify(r, dV, 'mpmath')
return dVs(r0)
def p(xi):
"""
It is defined with Eq. 26 in the paper.
"""
return xi**2 - 2*M*xi**3 - Lambda/3
def kappa(xi):
"""
It is defined with Eq. 31 in the paper.
"""
return M*xi**2 - Lambda/(3*xi)
In [4]:
display(Latex('Master potential and its derivative:'))
symPrintFunc(Vf, (r,))
symPrintFunc(dVf, (r,))
display(Latex(r'Equation 26 in the paper.'))
symPrintFunc(p, (xi,))
display(Latex(r'$\kappa_1$ is the surface gravity at the event horizon $\xi_1$'))
symPrintFunc(kappa, (xi,))
In [5]:
def lambda_0(xi):
return (6*(-se.I*En + xi - 3*M*xi**2))/(-3*xi**2 + 6*M*xi**3 + Lambda) + (2*se.I*En)/((xi - xi1)*k1)
def s_0(xi):
return (2*En**2*xi**2*(-3*xi**2 + 6*M*xi**3 + Lambda) - \
2*En*xi**2*(6*En*(xi - xi1) - 3*se.I*xi*(2*xi1 + xi*(-1 + 4*M*xi - 6*M*xi1)) + se.I*Lambda)*k1 + \
(xi - xi1)**2*(-6*xi**2*(l + l**2 - 2*M*(-1 + s**2)*xi) + (4 - 5*s**2 + s**4)*Lambda)*k1**2)/ \
(2*xi**2*(xi - xi1)**2*(-3*xi**2 + 6*M*xi**3 + Lambda)*k1**2)
In [6]:
# values of variables
nl, ns = 2, 2 # angular mom. and spin
nM = 1 # mass of the black hole
nLambda = o* 0
dprec=500
tol=1e-101
ft.ctx.dps = dprec
mpmath.mp.dps = dprec
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
#nxi1 = max(map(lambda x: sym.re(x), solhor)) # with infinite precision
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
In [7]:
# pl0 and ps0 to put the numerical values of variables into lambda_0 and s_0.
pl0 = lambda: {k1: nk1, xi1: nxi1, Lambda: nLambda, M: nM}
ps0 = lambda: {k1: nk1, xi1: nxi1, Lambda: nLambda, M: nM, l: nl, s: ns, }
In [8]:
rspace = np.linspace(1e-10, 30, 1500)
Vf_numpy = sym.lambdify(r, Vf(r).subs({l:nl, s: ns, Lambda: nLambda, M: nM}), "numpy")
dVf_numpy = sym.lambdify(r, dVf_mpmath(r), "numpy")
Vf(r).subs({l:nl, s: ns, Lambda: nLambda, M: nM})
plt.figure(figsize=(12, 8))
plt.plot(rspace, Vf_numpy(rspace), color="red", lw=2, label="Master potential")
plt.plot(rspace, dVf_numpy(rspace), color="blue", lw=2, label="the derivative")
plt.plot(nr0, dVf_numpy(nr0), "go", ms=10, label="an extremum of the pot.")
plt.xlim(0.5, 8)
plt.ylim(-.75, .75)
plt.xlabel('r', fontsize=24)
plt.ylabel('V(r), dV(r)/dr', fontsize=24)
plt.axhline(color="black", zorder=-999)
plt.legend(loc="best")
plt.grid()
plt.show()
In [9]:
%%time
# pass lambda_0, s_0 and variable values to aim class
black_L00l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L00l2s2.display_parameters(pprec=7)
black_L00l2s2.display_l0s0(0, pprec=3)
black_L00l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
In [10]:
%%time
# create coefficients c0 and d0 for improved AIM
black_L00l2s2.c0()
black_L00l2s2.d0()
black_L00l2s2.cndn()
In [11]:
%%time
black_L00l2s2.get_arb_roots()
In [12]:
%%time
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L00l2s2.printAllRoots(showRoots='+r-i', printFormat="{:10.7f}", col=(0,3))
In [13]:
%%time
# values of variables
nLambda = o* 2/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L02l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L02l2s2.display_parameters(pprec=7)
black_L02l2s2.display_l0s0(0, pprec=3)
black_L02l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L02l2s2.c0()
black_L02l2s2.d0()
black_L02l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L02l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [14]:
%%time
# values of variables
nLambda = o* 4/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L04l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L04l2s2.display_parameters(pprec=7)
black_L04l2s2.display_l0s0(0, pprec=3)
black_L04l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L04l2s2.c0()
black_L04l2s2.d0()
black_L04l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L04l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [15]:
%%time
# values of variables
nLambda = o* 6/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L06l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L06l2s2.display_parameters(pprec=7)
black_L06l2s2.display_l0s0(0, pprec=3)
black_L06l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L06l2s2.c0()
black_L06l2s2.d0()
black_L06l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L06l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [16]:
%%time
# values of variables
nLambda = o* 8/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L08l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L08l2s2.display_parameters(pprec=7)
black_L08l2s2.display_l0s0(0, pprec=3)
black_L08l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L08l2s2.c0()
black_L08l2s2.d0()
black_L08l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L08l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [17]:
%%time
# values of variables
nLambda = o* 9/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L09l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L09l2s2.display_parameters(pprec=7)
black_L09l2s2.display_l0s0(0, pprec=3)
black_L09l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L09l2s2.c0()
black_L09l2s2.d0()
black_L09l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L09l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [18]:
%%time
# values of variables
nLambda = o* 10/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L10l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L10l2s2.display_parameters(pprec=7)
black_L10l2s2.display_l0s0(0, pprec=3)
black_L10l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L10l2s2.c0()
black_L10l2s2.d0()
black_L10l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L10l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [19]:
%%time
# values of variables
nLambda = o* 11/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L11l2s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L11l2s2.display_parameters(pprec=7)
black_L11l2s2.display_l0s0(0, pprec=3)
black_L11l2s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L11l2s2.c0()
black_L11l2s2.d0()
black_L11l2s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L11l2s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [20]:
# values of variables
nl, ns = 3, 2 # angular mom. and spin
nM = 1 # mass of the black hole
nLambda = o* 0
dprec=500
tol=1e-101
ft.ctx.dps = dprec
mpmath.mp.dps = dprec
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
#nxi1 = max(map(lambda x: sym.re(x), solhor)) # with infinite precision
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
In [21]:
# pl0 and ps0 to put the numerical values of variables into lambda_0 and s_0.
pl0 = lambda: {k1: nk1, xi1: nxi1, Lambda: nLambda, M: nM}
ps0 = lambda: {k1: nk1, xi1: nxi1, Lambda: nLambda, M: nM, l: nl, s: ns, }
In [22]:
rspace = np.linspace(1e-10, 30, 1500)
Vf_numpy = sym.lambdify(r, Vf(r).subs({l:nl, s: ns, Lambda: nLambda, M: nM}), "numpy")
dVf_numpy = sym.lambdify(r, dVf_mpmath(r), "numpy")
Vf(r).subs({l:nl, s: ns, Lambda: nLambda, M: nM})
plt.figure(figsize=(12, 8))
plt.plot(rspace, Vf_numpy(rspace), color="red", lw=2, label="Master potential")
plt.plot(rspace, dVf_numpy(rspace), color="blue", lw=2, label="the derivative")
plt.plot(nr0, dVf_numpy(nr0), "go", ms=10, label="an extremum of the pot.")
plt.xlim(0.5, 8)
plt.ylim(-.75, .75)
plt.xlabel('r', fontsize=24)
plt.ylabel('V(r), dV(r)/dr', fontsize=24)
plt.axhline(color="black", zorder=-999)
plt.legend(loc="best")
plt.grid()
plt.show()
In [23]:
%%time
# pass lambda_0, s_0 and variable values to aim class
black_L00l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L00l3s2.display_parameters(pprec=7)
black_L00l3s2.display_l0s0(0, pprec=3)
black_L00l3s2.parameters(En, xi, nxi0, nmax=111, nstep=10, dprec=500, tol=1e-101)
In [24]:
%%time
# create coefficients c0 and d0 for improved AIM
black_L00l3s2.c0()
black_L00l3s2.d0()
black_L00l3s2.cndn()
In [25]:
%%time
black_L00l3s2.get_arb_roots()
In [26]:
%%time
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L00l3s2.printAllRoots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [27]:
%%time
# values of variables
nLambda = o* 2/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L02l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L02l3s2.display_parameters(pprec=7)
black_L02l3s2.display_l0s0(0, pprec=3)
black_L02l3s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L02l3s2.c0()
black_L02l3s2.d0()
black_L02l3s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L02l3s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [28]:
%%time
# values of variables
nLambda = o* 4/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L04l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L04l3s2.display_parameters(pprec=7)
black_L04l3s2.display_l0s0(0, pprec=3)
black_L04l3s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L04l3s2.c0()
black_L04l3s2.d0()
black_L04l3s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L04l3s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [29]:
%%time
# values of variables
nLambda = o* 6/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L06l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L06l3s2.display_parameters(pprec=7)
black_L06l3s2.display_l0s0(0, pprec=3)
black_L06l3s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L06l3s2.c0()
black_L06l3s2.d0()
black_L06l3s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L06l3s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [30]:
%%time
# values of variables
nLambda = o* 8/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L08l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L08l3s2.display_parameters(pprec=7)
black_L08l3s2.display_l0s0(0, pprec=3)
black_L08l3s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L08l3s2.c0()
black_L08l3s2.d0()
black_L08l3s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L08l3s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [31]:
%%time
# values of variables
nLambda = o* 9/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L09l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L09l3s2.display_parameters(pprec=7)
black_L09l3s2.display_l0s0(0, pprec=3)
black_L09l3s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L09l3s2.c0()
black_L09l3s2.d0()
black_L09l3s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L09l3s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [32]:
%%time
# values of variables
nLambda = o* 10/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L10l3s2 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L10l3s2.display_parameters(pprec=7)
black_L10l3s2.display_l0s0(0, pprec=3)
black_L10l3s2.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L10l3s2.c0()
black_L10l3s2.d0()
black_L10l3s2.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L10l3s2.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [33]:
%%time
# values of variables
nLambda = o* 11/100
sr0 = 3 # initial search point of the root of the der. pot.
nr0 = sym.S(mpmath.findroot(dVf_mpmath, sr0, tol=tol))
nxi0 = o* 1/nr0
solhor = sym.solve(p(xi).subs({Lambda: nLambda, M:nM}), xi)
nxi1 = sym.N(max(map(lambda x: sym.re(x), solhor)), dprec)
nk1 = kappa(nxi1).subs({Lambda: nLambda, M: nM})
display(Math(r"r_0 = %.20f"%sym.N(nr0)))
display(Math(r"\xi_0 = %.20f"%sym.N(nxi0)))
display(Math(r"\xi_1 = %.20f"%sym.N(nxi1)))
display(Math(r"k_1 = %.20f"%sym.N(nk1)))
# pass lambda_0, s_0 and variable values to aim class
black_L11l2s3 = aim(lambda_0(xi), s_0(xi), pl0(), ps0())
black_L11l2s3.display_parameters(pprec=7)
black_L11l2s3.display_l0s0(0, pprec=3)
black_L11l2s3.parameters(En, xi, nxi0, nmax=71, nstep=10, dprec=500, tol=1e-101)
# create coefficients c0 and d0 for improved AIM
black_L11l2s3.c0()
black_L11l2s3.d0()
black_L11l2s3.cndn()
# the solution
print("iter" + (3*"{:^24s}").format(*("n=%s"%str(i) for i in range(1,4))))
print("_"*3*24)
black_L11l2s3.get_arb_roots(showRoots='+r-i', printFormat=" {:10.7f}", col=(0,3))
In [ ]: