Description Usage Arguments Details Value Author(s) References See Also Examples
Compute the Airy functions Ai or Bi or their first derivatives, d/dz Ai(z) and d/dz Bi(z).
1 2 |
z |
complex or numeric vector. |
deriv |
order of derivative; must be 0 or 1. |
expon.scaled |
logical indicating if the result should be scaled by an exponential factor (typically to avoid under- or over-flow). |
By default, when expon.scaled
is false, AiryA()
computes the complex Airy function Ai(z) or its derivative
d/dz Ai(z) on deriv=0
or deriv=1
respectively.
When expon.scaled
is true, it returns
exp(zta)*Ai(z) or
exp(zta)* d/dz Ai(z),
effectively removing the exponential decay in
-pi/3 < arg(z) < pi/3 and
the exponential growth in
pi/3 < abs(arg(z)) < pi,
where zta=(2/3)*z*sqrt(z).
While the Airy functions Ai(z) and d/dz Ai(z) are
analytic in the whole z plane, the corresponding scaled
functions (for expon.scaled=TRUE
) have a cut along the
negative real axis.
By default, when expon.scaled
is false, AiryB()
computes the complex Airy function Bi(z) or its derivative
d/dz Bi(z) on deriv=0
or deriv=1
respectively.
When expon.scaled
is true, it returns
exp(-abs(Re(zta)))*Bi(z) or
exp(-abs(Re(zta)))* dBi(z)/dz,
to remove the exponential behavior in both the left and right half
planes where, as above,
zta=(2/3)*z*sqrt(z).
a complex or numeric vector of the same length (and class) as z
.
Donald E. Amos, Sandia National Laboratories, wrote the original fortran code. Martin Maechler did the R interface.
see BesselI
.
BesselI
etc; the Hankel functions Hankel
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## The AiryA() := Ai() function
curve(AiryA, -20, 100, n=1001)
curve(AiryA, -1, 100, n=1001, log="y")
curve(AiryA(x, expon.scaled=TRUE), -1, 50, n=1001)
## This gives many warnings (248 on nb-mm4, F24) about lost accuracy, but on Windows takes ~ 4 sec:
curve(AiryA(x, expon.scaled=TRUE), 1, 10000, n=1001, log="xy")
## The AiryB() := Bi() function
curve(AiryB, -20, 2, n=1001); abline(h=0,v=0, col="gray",lty=2)
curve(AiryB, -1, 20, n=1001, log = "y") # exponential growth (x > 0)
curve(AiryB(x,expon.scaled=TRUE), -1, 20, n=1001)
curve(AiryB(x,expon.scaled=TRUE), 1, 10000, n=1001, log="x")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.