s17al determines the leading zeros of one of the Bessel functions , , or for real and non-negative .
Syntax
C# |
---|
public static void s17al( double a, int n, int mode, double rel, double[] x, out int ifail ) |
Visual Basic |
---|
Public Shared Sub s17al ( _ a As Double, _ n As Integer, _ mode As Integer, _ rel As Double, _ x As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void s17al( double a, int n, int mode, double rel, array<double>^ x, [OutAttribute] int% ifail ) |
F# |
---|
static member s17al : a : float * n : int * mode : int * rel : float * x : float[] * ifail : int byref -> unit |
Parameters
- a
- Type: System..::..DoubleOn entry: the order of the function.Constraint: .
- n
- Type: System..::..Int32On entry: the number of zeros required.Constraint: .
- mode
- Type: System..::..Int32On entry: specifies the form of the function whose zeros are required.
- The zeros of are required.
- The zeros of are required;
- The zeros of are required;
- The zeros of are required.
Constraint: .
- rel
- Type: System..::..DoubleOn entry: the relative accuracy to which the zeros are required.Suggested value: the square root of the machine precision.Constraint: .
- x
- Type: array<System..::..Double>[]()[][]An array of size [n]On exit: the required zeros of the function specified by mode.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
s17al attempts to find the leading zeros of one of the Bessel functions , , or , where is real. When is real, these functions each have an infinite number of real zeros, all of which are simple with the possible exception of . If , the th positive zero is denoted by and , respectively, for , except that is counted as the first zero of when . Since , it therefore follows that and for . Further details can be found in Section 9.5 of Abramowitz and Stegun (1972).
s17al is based on Algol 60 procedures given by Temme (1979). Initial approximations to the zeros are computed from asymptotic expansions. These are then improved by higher-order Newton iteration making use of the differential equation for the Bessel functions.
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Temme N M (1976) On the numerical evaluation of the ordinary Bessel function of the second kind J. Comput. Phys. 21 343–350
Temme N M (1979) An algorithm with Algol 60 program for the computation of the zeros of ordinary Bessel functions and those of their derivatives J. Comput. Phys. 32 270–279
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, , or , or , or , or , or .
Accuracy
If the value of rel is set to , then the required zeros should have approximately correct significant digits.
Parallelism and Performance
None.
Further Comments
None.
Example
This example determines the leading five positive zeros of the Bessel function .
Example program (C#): s17ale.cs