airyAi

Evaluates the Airy function.

Synopsis

airyAi (x)

Required Arguments

float x (Input)
Argument for which the function value is desired.

Return Value

The Airy function evaluated at x, Ai(x).

Description

The airy function Ai(x) is defined to be

Ai(x)=1π0cos(xt+13t3)dt=x3π2K1/3(23x3/2)

The Bessel function Kv(x) is defined in besselExpK0.

If x<1.31ε2/3, then the answer will have no precision. If x<1.31ε1/3, the answer will be less accurate than half precision. Here ɛ = machine(4) is the machine precision.

Finally, x should be less than xmax so the answer does not underflow. Very approximately, xmax={1.5lns}2/3, where s = machine(1), the smallest representable positive number.

For more information, see the description for machine.

Example

In this example, Ai(-4.9) is evaluated.

from __future__ import print_function
from numpy import *
from pyimsl.math.airyAi import airyAi

x = -4.9
ans = airyAi(x)
print("Ai(-4.9) = %f" % (ans))

Output

Ai(-4.9) = 0.374536