This Jupyter/SageMath notebook is relative to the lectures Geometry and physics of black holes.
The computations make use of tools developed through the SageManifolds project.
version()
'SageMath version 10.0.rc0, Release Date: 2023-04-23'
%display latex
x = var('x', domain='real')
a = var('a', latex_name=r'\alpha', domain='real')
f(x) = (1 - a*x) / (a*x^2 - x + 2)
f(x)
assume(a > 1/8)
F(x) = integrate(f(x), x)
F(x)
P(x) = a*x^2 - x + 2
x1 = 1/(2*a)
P(x1)
F(x1)
exp(F(x1)).simplify_full()
P(1/a)
thb = -4*exp(-2/sqrt(16/x - 1)*atan(1/sqrt(16/x - 1)))
thb
plot(thb, (x, 0.001, 15.99))
taylor(thb, x, 0, 3)
x
f(a, x) = sqrt(2)/sqrt(a*x^2 - x + 2)*exp(1/sqrt(8*a - 1)*\
(atan((2*a*x - 1)/sqrt(8*a - 1)) + atan(1/sqrt(8*a - 1))))
f
diff(f(a, x), x)
a_sel = [1/4, 1/2, 1, 2, 4, 6]
graph = Graphics()
for a1 in a_sel:
legend_label=r'$\alpha = {:.2f}$'.format(float(a1))
graph += plot(f(a1, x), (x, 0, 6), color=hue(a1/8),
legend_label=legend_label, thickness=1.5,
axes_labels=[r"$x$", r"$f_\alpha(x)$"])
show(graph, frame=True, axes=False, gridlines=True)
graph.save("vai_f_alpha_x.pdf", frame=True, axes=False, gridlines=True)
Equivalent form:
h(a, x) = sqrt(2)/sqrt(a*x^2 - x + 2)*exp(1/sqrt(8*a - 1)*\
(atan(x*sqrt(8*a - 1)/(4 - x)) + pi*heaviside(x-4)))
h
a_sel = [1/4, 1/2, 1, 2, 4, 6]
graph = Graphics()
for a1 in a_sel:
legend_label=r'$\alpha = {:.2f}$'.format(float(a1))
graph += plot(h(a1, x), (x, 0, 6), color=hue(a1/8),
legend_label=legend_label, thickness=1.5,
axes_labels=[r"$x$", r"$f_\alpha(x)$"])
show(graph, frame=True, axes=False, gridlines=True)
Maximal value of $f_\alpha(x)$:
f(a, 1/a)
Expansion for small $x$:
taylor(f(a, x), x, 0, 2)
forget(a > 1/8)
assume(a < 1/8)
f(x) = (1 - a*x) / (a*x^2 - x + 2)
F(x) = integrate(f(x), x)
F(x)
x01 = (1 - sqrt(1 - 8*a))/(2*a)
x02 = (1 + sqrt(1 - 8*a))/(2*a)
x01, x02
(x01 + x02).simplify_full()
bool(P(x) == a*(x - x01)*(x - x02))
x1 = var('x_1', domain='real')
x2 = var('x_2', domain='real')
a1 = 1/(x1 + x2)
a1
f1(x) = (1 - a1*x) / (a1*(x - x1)*(x - x2))
f1(x)
integrate(f1(x), x).simplify_full()
(x01 - x02).simplify_full()
g = x2/(x1 - x2)*ln(abs(x - x1)) - x1/(x1 - x2)*ln(abs(x - x2))
g
diff(g, x)
X1 = x01.subs(a=1/9).simplify_full()
X2 = x02.subs(a=1/9).simplify_full()
X1, X2
n(X1), n(X2)
b1 = (X1/(X2 - X1)).expand()
b2 = (X2/(X2 - X1)).expand()
b1, b2
R(x) = abs(x/X2 - 1)^b1/abs(x/X1 - 1)^b2
R(x)
graph = plot(R(x), (x, 0, 2.6), thickness=1.5, color='red',
axes_labels=[r"$x$", r"$r/r_0$"]) \
+ plot(R(x), (x, 2.9, 12), thickness=1.5, color='red')
graph += line([(X1, 0), (X1, 4)], color='blue', linestyle='dashed') \
+ text(r'$x=x_1$', (2.7, 1.5), fontsize=16, color='blue', rotation='vertical')
graph += line([(X2, 0), (X2, 4)], color='green', linestyle='dashed') \
+ text(r'$x=x_2$', (5.7, 1.5), fontsize=16, color='green', rotation='vertical')
graph += line([(X1 + X2, 0), (X1 + X2, 4)], color='black', linestyle='dotted') \
+ text(r'$x=\alpha^{-1}$', (8.7, 1.5), fontsize=16, color='black', rotation='vertical')
show(graph, ymax=3, frame=True, axes=False, gridlines=True)
graph.save('vai_r_x_naksing.pdf', ymax=3, frame=True, axes=False, gridlines=True)
f2(x) = 2 /(x*(a1*(x - x1)*(x - x2)))
f2(x)
s = integrate(f2(x), x).simplify_full()
s
s.coefficient(log(x - x1)).simplify_full()
s.coefficient(log(x - x2)).simplify_full()
s.coefficient(log(x)).simplify_full()
f(x) = (8 - x)/(x - 4)^2
f(x)
integrate(f(x), x)