Calculates the Airy functions Ai and Bi and their derivatives.
Use the following HTML code to embed the calculators within other websites:
Airy
intairy(
double
x
double&
Ai
double&
Aip
double&
Bi
double&
Bip
)
There are four varieties of Airy functions: <em>Ai(x)</em>, <em>Bi(x)</em>, <em>Gi(x)</em>, and <em>Hi(x)</em>. Of these, <em>Ai(x)</em> and <em>Bi(x)</em> are by far the most
common, with <em>Gi(x)</em> and <em>Hi(x)</em> being encountered much less frequently. Airy functions commonly appear in physics,
especially in optics, quantum mechanics, electromagnetics, and radiative transfer.
Plots of the two most commonly used Airy functions
<em>Ai(x)</em> and <em>Bi(x)</em> are defined as the two linearly independent solutions to
The function returns the two independent solutions <em>Ai(x)</em>, <em>Bi(x)</em> and their first derivatives <em>Ai'(x)</em>, <em>Bi'(x)</em>.
Evaluation is by power series summation for small x, by rational minimax approximations for large x.
Accuracy:
Error criterion is absolute when function <= 1, relative
when function > 1, except * denotes relative error criterion.
For large negative x, the absolute error increases as x^1.5.
For large positive x, the relative error increases as x^1.5.
<pre>
Arithmetic domain function # trials peak rms
IEEE -10, 0 Ai 10000 1.6e-15 2.7e-16
IEEE 0, 10 Ai 10000 2.3e-14* 1.8e-15*
IEEE -10, 0 Ai' 10000 4.6e-15 7.6e-16
IEEE 0, 10 Ai' 10000 1.8e-14* 1.5e-15*
IEEE -10, 10 Bi 30000 4.2e-15 5.3e-16
IEEE -10, 10 Bi' 30000 4.9e-15 7.3e-16
</pre>
References:
Cephes Math Library Release 2.8: June, 2000; http://mathworld.wolfram.com/AiryFunctions.html