This Jupyter/SageMath notebook is relative to the lectures Geometry and physics of black holes.
To run it, you must start SageMath with sage -n jupyter
.
version()
'SageMath version 9.1.beta6, Release Date: 2020-03-01'
%display latex
U(r) = (1 - 2/r)/r^2
U(r)
r_list = [2.1, 2.5, 3]
rmin = r_list[0]
rmax = 1.99*r_list[-1]
def huecol(r):
return - log((rmax - r1)/(rmax - r_list[-1])) \
/ log((rmax - rmin)/(rmax - r_list[-1])) / 3
g = Graphics()
for r1 in r_list[:-1]:
g += plot(lambda eta: - sin(eta)/sqrt(U(r1)), (0, 2*pi),
legend_label=r"$r_{{\rm em}}={:.1f}\, m$".format(float(r1)),
thickness=1.5, linestyle='dashed',
color=hue(huecol(r1)),
ticks=[pi/2, None], tick_formatter=[pi, 'latex'],
fontsize=14, axes_labels_size=1.2,
axes_labels=[r'$\eta$', r'$\epsilon_L \, b/m$'],
frame=True, gridlines=True, axes=False)
g
r_list = [3, 3.5, 6, 20]
r_colors = ['red', 'orange', 'gold', 'brown']
rmin = 0.99*r_list[0]
rmax = r_list[-1]
def huecol(r):
return log((r1 - rmin)/(r_list[0] - rmin)) / log((rmax - rmin)/(r_list[0] - rmin)) / 2
for r1, color in zip(r_list, r_colors):
g += plot(lambda eta: - sin(eta)/sqrt(U(r1)), (0, 2*pi),
legend_label=r"$r_{{\rm em}}={:.1f}\, m$".format(float(r1)),
thickness=1.5, color=color)
bc = 3*sqrt(3)
g += line([(0, bc), (2*pi, bc)], color='black', thickness=2, alpha=0.5)
g += line([(0, -bc), (2*pi, -bc)], color='black', thickness=2, alpha=0.5)
show(g, ymin=-10, ymax=10)
g.save("gis_b_eta.pdf", ymin=-10, ymax=10)
A(r) = 648*(2*sqrt(3) - 3)*(r - 3)/(2*r + 3 + sqrt(3*r*(r + 6)))
A(r)
g = plot(A, (2, 40), thickness=1.5, color='blue',
axes_labels=[r'$r_{\rm em}/m$', r'$A(r_{\rm em})$'],
frame=True, gridlines=True, axes=True)
a = 648*(7*sqrt(3) - 12)
n(a)
g += line([(0, a), (40, a)], linestyle='dashed')
g += line([(2, -24), (2, 85)], color='black')
g
g.save("gis_A_rem.pdf")
A(2)
bool(A(2) == - 648*(26*sqrt(3) - 45))
n(A(2))
n(exp(-2*pi))