This Jupyter/SageMath notebook is relative to the lectures Geometry and physics of black holes.
Click here to download the notebook file (ipynb format). To run it, you must start SageMath with sage -n jupyter
version()
'SageMath version 9.0.beta9, Release Date: 2019-12-08'
%display latex
var('r')
U(r) = (1 - 2/r)/r^2
U(r)
rmax = 20
ymin = -0.01
ymax = 0.05
graph = plot(U(r), (r, 1, rmax), plot_points=300, thickness=2,
xmin=0, xmax=rmax, ymin=ymin, axes_labels=[r'$r/m$', r'$m^2 \; U(r)$'],
axes=False, frame=True, gridlines=True, axes_pad=0)
graph += line([(2, -0.1), (2, ymax)], color='black', thickness=1.5, linestyle='--',
ymin=ymin)
show(graph, xmin=0)
U1 = 0.02
r1 = find_root(U(r) == U1, 3, 10)
graph += line([(r1, U1), (rmax, U1)], color='red', thickness=1.5) \
+ arrow((9, U1), (10, U1), color='red', arrowsize=4, width=1) \
+ arrow((14, U1), (12, U1), color='red', arrowsize=4, width=1) \
+ text('1', (0.9*rmax, U1 + 0.002), color='red' )
graph += line([(r1, U1), (r1, -0.02)], color='red', linestyle=':') \
+ text(r'$r_{\rm per}$', (6, -0.014), color='red', fontsize=16)
U2 = 0.04
graph += line([(0, U2), (rmax, U2)], color='brown', thickness=1.5) \
+ arrow((13, U2), (12, U2), color='brown', arrowsize=4, width=1) \
+ arrow((0.8, U2), (0.7, U2), color='brown', arrowsize=4, width=1) \
+ text('2', (0.9*rmax, U2 + 0.002), color='brown' )
U3 = 0.046
graph += line([(2.2, U3), (rmax, U3)], color='orange', thickness=1.5) \
+ arrow((3, U3), (4, U3), color='orange', arrowsize=4, width=1) \
+ arrow((13, U3), (14, U3), color='orange', arrowsize=4, width=1) \
+ text('3', (0.9*rmax, U3 + 0.002), color='orange' )
U4 = 0.035
r4 = find_root(U(r) == U4, 2, 3)
graph += line([(0, U4), (r4, U4)], color='grey', thickness=1.5) \
+ text('4', (0.9*r4, U4 + 0.002), color='grey' ) \
+ arrow((0.9*r4, U4), (0.95*r4, U4), color='grey', arrowsize=4, width=1) \
+ arrow((0.8, U4), (0.7, U4), color='grey', arrowsize=4, width=1)
show(graph, xmin=0)
graph.save("ges_eff_pot_null.pdf", xmin=0)