Skip to content

Commit

Permalink
added local extrema of Bessel Y functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatschke committed Mar 11, 2021
1 parent ad391e3 commit 3a3d0cc
Show file tree
Hide file tree
Showing 5 changed files with 1,164 additions and 13 deletions.
Expand Up @@ -27,17 +27,6 @@ for alpha in alpha_range:
max_digits = prec10,
).replace('?','')

'''
if alpha == 1/2:
#number = n*pi
if n == 1:
numbers_alpha[str(n)] = {
'number': number_str,
'equals': 'HREF{Pi}',
}
continue
'''

numbers_alpha[str(n)] = number_str

numbers[str(alpha)] = numbers_alpha
Expand Down
@@ -0,0 +1,56 @@
ID: INPUT{id.yaml}

Title: >
Local extrema of Bessel functions of the second kind $Y_\alpha$
Definition: >
The list contains the first zeros of the derivative of
Bessel functions of the second kind $Y_\alpha$.
Parameters:
alpha:
display: $\alpha$
type: C
n:
type: Z
constraints: $n \geq 1$

Comments:
comment-choice-of-alpha: >
This collection currently restricts to the important special case
$\alpha \in \frac{1}{2}\mathbb{Z}_{\geq 0}$.
comment-maxima: >
Local maxima arise for odd $n$, local minima for even $n$.
Formulas:

Programs:

References:

Links:
mpmath: >
HREF{https://mpmath.org/}[mpmath] (Python library)
Wiki:
title: "Wikipedia: Bessel functions of the first kind"
url: https://en.wikipedia.org/wiki/Bessel_function#Bessel_functions_of_the_first_kind:_J%CE%B1

Similar tables:

Keywords:
- maximum
- minimum

Tags:
- local extrema
- special functions

Data properties:
type: R
complete: no
reliability: computed with mpmath CITE{mpmath}

Display properties:
number-header: $n$<sup>th</sup> local extremum of $J_\alpha$

Numbers: INPUT{numbers.yaml}
@@ -0,0 +1,35 @@
import yaml
import os
import mpmath
from utils.utils import numbers_to_yaml
from utils.utils import real_interval_to_sage_string


path = 'data/Local_extrema/Local_extrema_of_Bessel_Y_functions/'

prec10 = 100 #relative precision in base 10

mpmath.mp.dps = prec10 * 1.5
alpha_range = [a/2 for a in [0..20]] #order of Bessel Y-function
n_range = [1..50] #index of zero of Y_alpha

RIFprec = RealIntervalField(prec10 * 3.4 * 2)

numbers = {}
for alpha in alpha_range:
print("alpha:",alpha)
numbers_alpha = {}

for n in n_range:
number = mpmath.mp.besselyzero(alpha,n,derivative=1)
number_str = real_interval_to_sage_string(
RIFprec(number),
max_digits = prec10,
).replace('?','')

numbers_alpha[str(n)] = number_str

numbers[str(alpha)] = numbers_alpha

filename = os.path.join(path, 'numbers.yaml')
yaml.dump(numbers, stream = open(filename, 'w'), sort_keys = False)

0 comments on commit 3a3d0cc

Please sign in to comment.