naginterfaces.library.specfun.airy_​ai_​real

naginterfaces.library.specfun.airy_ai_real(x)[source]

airy_ai_real returns a value for the Airy function, .

For full information please refer to the NAG Library document for s17ag

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s17agf.html

Parameters
xfloat

The argument of the function.

Returns
aifloat

The value of the Airy function, .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

is too large and positive. The function returns zero.

(errno )

On entry, .

Constraint: .

is too large and negative. The function returns zero.

Notes

airy_ai_real evaluates an approximation to the Airy function, . It is based on a number of Chebyshev expansions:

For ,

where , and and are expansions in the variable .

For ,

where and are expansions in

For ,

where is an expansion in .

For ,

where is an expansion in .

For ,

where and is an expansion in .

For , the result is set directly to . This both saves time and guards against underflow in intermediate calculations.

For large negative arguments, it becomes impossible to calculate the phase of the oscillatory function with any precision and so the function must fail. This occurs if , where is the machine precision.

For large positive arguments, where decays in an essentially exponential manner, there is a danger of underflow so the function must fail.

References

NIST Digital Library of Mathematical Functions