Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added local extrema of Bessel Y functions
- Loading branch information
Showing
5 changed files
with
1,164 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
data/Local_extrema/Local_extrema_of_Bessel_Y_functions/collection.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} |
35 changes: 35 additions & 0 deletions
35
data/Local_extrema/Local_extrema_of_Bessel_Y_functions/generate.sage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
Oops, something went wrong.