Class BesselJ

  • All Implemented Interfaces:
    UnivariateFunction

    public class BesselJ
    extends java.lang.Object
    implements UnivariateFunction
    This class provides computation methods related to Bessel functions of the first kind. Detailed descriptions of these functions are available in Wikipedia, Abrabowitz and Stegun (Ch. 9-11), and DLMF (Ch. 10).

    This implementation is based on the rjbesl Fortran routine at Netlib.

    From the Fortran code:

    This program is based on a program written by David J. Sookne (2) that computes values of the Bessel functions J or I of real argument and integer order. Modifications include the restriction of the computation to the J Bessel function of non-negative real argument, the extension of the computation to arbitrary positive order, and the elimination of most underflow.

    References:

    • "A Note on Backward Recurrence Algorithms," Olver, F. W. J., and Sookne, D. J., Math. Comp. 26, 1972, pp 941-947.
    • "Bessel Functions of Real Argument and Integer Order," Sookne, D. J., NBS Jour. of Res. B. 77B, 1973, pp 125-132.

    Since:
    3.4
    • Constructor Summary

      Constructors 
      Constructor Description
      BesselJ​(double order)
      Create a new BesselJ with the given order.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static BesselJ.BesselJResult rjBesl​(double x, double alpha, int nb)
      Calculates Bessel functions \(J_{n+alpha}(x)\) for non-negative argument x, and non-negative order n + alpha.
      double value​(double x)
      Returns the value of the constructed Bessel function of the first kind, for the passed argument.
      static double value​(double order, double x)
      Returns the first Bessel function, \(J_{order}(x)\).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BesselJ

        public BesselJ​(double order)
        Create a new BesselJ with the given order.
        Parameters:
        order - order of the function computed when using value(double).
    • Method Detail

      • rjBesl

        public static BesselJ.BesselJResult rjBesl​(double x,
                                                   double alpha,
                                                   int nb)
        Calculates Bessel functions \(J_{n+alpha}(x)\) for non-negative argument x, and non-negative order n + alpha.

        Before using the output vector, the user should check that nVals = nb, i.e., all orders have been calculated to the desired accuracy. See BesselResult class javadoc for details on return values.

        Parameters:
        x - non-negative real argument for which J's are to be calculated
        alpha - fractional part of order for which J's or exponentially scaled J's (\(J\cdot e^{x}\)) are to be calculated. 0 <= alpha < 1.0.
        nb - integer number of functions to be calculated, nb > 0. The first function calculated is of order alpha, and the last is of order nb - 1 + alpha.
        Returns:
        BesselJResult a vector of the functions \(J_{alpha}(x)\) through \(J_{nb-1+alpha}(x)\), or the corresponding exponentially scaled functions and an integer output variable indicating possible errors