nag_bessel_j_alpha (s18ekc) (PDF version)
s Chapter Contents
s Chapter Introduction
NAG C Library Manual

NAG Library Function Document

nag_bessel_j_alpha (s18ekc)

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_bessel_j_alpha (s18ekc) returns a sequence of values for the Bessel functions J α + n - 1 x  or J α - n + 1 x  for real x , non-negative α<1  and n = 1 , 2 , , N + 1 .

2  Specification

#include <nag.h>
#include <nags.h>
void  nag_bessel_j_alpha (double x, double a, Integer nl, Complex b[], NagError *fail)

3  Description

nag_bessel_j_alpha (s18ekc) evaluates a sequence of values for the Bessel function of the first kind J α x , where x  is real and nonzero and α  is the order with 0 α < 1 . The N + 1 -member sequence is generated for orders α , α + 1 , , α + N when N0 . Note that +  is replaced by -  when N<0 . For positive orders the function may also be called with x=0 , since J q 0 = 0  when q>0 . For negative orders the formula
J -q x = cosπq J q x - sinπq Y q x
is used to generate the required sequence.

4  References

Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications

5  Arguments

1:     xdoubleInput
On entry: the argument x  of the function.
Constraint: if nl<0 , x0.0 .
2:     adoubleInput
On entry: the order α  of the first member in the required sequence of function values.
Constraint: 0.0 a < 1.0 .
3:     nlIntegerInput
On entry: the value of N .
Constraint: absnl 101 .
4:     b[×]ComplexOutput
On exit: with fail.code=NE_NOERROR  or fail.code=NW_SOME_PRECISION_LOSS , the required sequence of function values: b n  contains J α + n - 1 x  if nl0  and J α - n + 1 x  otherwise, for n=1,2,,absnl + 1.
5:     failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

On entry, nl=value .
Constraint: absnl 101 .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
The evaluation has been abandoned due to the likelihood of overflow.
On entry, a=value .
Constraint: 0.0 a < 1.0 .
On entry, x=value , nl=value .
Constraint: x0.0  when nl<0 .
The evaluation has been abandoned due to failure to satisfy the termination condition.
The evaluation has been abandoned due to total loss of precision.
The evaluation has been completed but some precision has been lost.

7  Accuracy

All constants in the underlying functions are are specified to approximately 18 digits of precision. If t  denotes the number of digits of precision in the floating point arithmetic being used, then clearly the maximum number of correct digits in the results obtained is limited by p = mint,18 . Because of errors in argument reduction when computing elementary functions inside the underlying functions are, the actual number of correct digits is limited, in general, by p-s , where s max1, log 10 x , log 10 α  represents the number of digits lost due to the argument reduction. Thus the larger the values of x  and α , the less the precision in the result.

8  Further Comments


9  Example

The example program evaluates J 0 x , J 1 x , J 2 x  and J 3 x  at x=0.5 , and prints the results.

9.1  Program Text

Program Text (s18ekce.c)

9.2  Program Data

Program Data (s18ekce.d)

9.3  Program Results

Program Results (s18ekce.r)

nag_bessel_j_alpha (s18ekc) (PDF version)
s Chapter Contents
s Chapter Introduction
NAG C Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012