Bessel function crossings
The previous looked at the angles that graphs make when they cross. For example, sin(x) and cos(x) always cross with the same angle. The same holds for sin(kx) and cos(kx) since the k simply rescales the x-axis.
The post ended with wondering about functions analogous to sine and cosine, such as Bessel functions. This post will look at that question in more detail. Specifically we'll look at the functions JI and YI.
Because these two Bessel functions satisfy the same second order linear homogeneous differential equation, the Strum separation theorem says that their zeros are interlaced: between each pair of consecutive zeros of JI is exactly one zero of YI, and between each pair of consecutive zeros of YI there is exactly one zero of JI.
In the following Python code, we find zeros of JI, then look in between for places where JI and YI cross. Next we find the angle the two curves make at each intersection and plot the angles.
from scipy.special import jn_zeros, jv, yv from scipy.optimize import bisect from numpy import empty, linspace, arccos import matplotlib.pyplot as plt n = 3 # bessel function order N = 100 # number of zeros z = jn_zeros(n, N) # Zeros of J_n crossings = empty(N-1) f = lambda x: jv(n,x) - yv(n,x) for i in range(N-1): crossings[i] = bisect(f, z[i], z[i+1]) def angle(n, x): # Derivatives of J_nu and Y_nu dj = 0.5*(jv(n-1,x) - jv(n+1,x)) dy = 0.5*(yv(n-1,x) - yv(n+1,x)) top = 1 + dj*dy bottom = ((1 + dj**2)*(1 + dy**2))**0.5 return arccos(top/bottom) y = angle(n, crossings) plt.plot(y) plt.xlabel("Crossing number") plt.ylabel("Angle in radians") plt.show()
This shows that the angles steadily decrease, apparently quadratically.
This quadratic behavior is what we should expect from the asymptotics of JI and YI: For large arguments they act like shifted and rescaled versions of sin(x)/ax. So if we looked at axJI and axYI rather than JI and YI we'd expect the angles to reach some positive asymptote, and they do, as shown below.
Related posts