com.hedgehog.math.functions
Class BesselFunction

java.lang.Object
  extended by com.hedgehog.HObject
      extended by com.hedgehog.math.functions.Function
          extended by com.hedgehog.math.functions.BesselFunction
All Implemented Interfaces:
java.lang.Comparable, java.util.Comparator

public final class BesselFunction
extends Function

Title: BesselFunction - represents Bessel functions.

Description: Provides static Bessel functions.

Bessel's second order differential equation occurs repeatedly in astronomy, heat conduction, electricity, stress in beams, etc. The general equation of order no is x^2y'' + xy' + (x^2-n^2) = 0.

For detailed information regarding Bessel functions refer to any good mathematics book, such as Chapter 6 of Peter O'Neil's "Advanced Engineering Mathematics", Wadsworth Pub., 1983.

Copyright: Copyright (c) Hedgehog Software 2007-2009.

Company: Hedgehog Software.

Since:
1.0
Version:
1.1

Field Summary
 
Fields inherited from class com.hedgehog.math.functions.Function
method
 
Fields inherited from class com.hedgehog.HObject
mID, mName
 
Constructor Summary
BesselFunction()
          Default constructor.
BesselFunction(BesselFunction object)
          Copy constructor.
 
Method Summary
 boolean isValid()
          Tests whether or not a valid object.
static double j0(double x)
          Evaluates J0(x).
 OneVariablePolynomial j0Polynomial(int nTerms)
          Returns J0(x) as a polynomial object.
 double[] j0Roots(int numberOfRoots)
          Returns the roots of J0(x)=0 upto and including the specified number of roots, which cannot exceed 30.
static double j1(double x)
          Evaluates J1(x).
static double jn(int n, double x)
          Evaluates Jn(x).
 OneVariablePolynomial jnPolynomial(int n, int nTerms)
          Returns Jn(x) as a polynomial object.
static double y0(double x)
          Evaluates Y0(x).
static double y1(double x)
          Evaluates Y1(x).
static double yn(int n, double x)
          Evaluates Yn(x).
 
Methods inherited from class com.hedgehog.math.functions.Function
getMethod, setMethod, toString
 
Methods inherited from class com.hedgehog.HObject
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BesselFunction

public BesselFunction()
Default constructor.


BesselFunction

public BesselFunction(BesselFunction object)
Copy constructor.

Parameters:
object - Object to copy.
Method Detail

j0

public static double j0(double x)
Evaluates J0(x).

Parameters:
x - Value of x.
Returns:
The Bessel function of the first kind of order 0 of the argument; J0(x).

j1

public static double j1(double x)
Evaluates J1(x).

Parameters:
x - Value of x.
Returns:
The Bessel function of the first kind of order 1 of the argument; J1(x).

jn

public static double jn(int n,
                        double x)
Evaluates Jn(x).

Parameters:
n - Order.
x - Value of x.
Returns:
The Bessel function of the first kind of order n of the argument; Jn(x).

y0

public static double y0(double x)
Evaluates Y0(x).

Parameters:
x - Value of x.
Returns:
Value of Y0(x).

y1

public static double y1(double x)
Evaluates Y1(x).

Parameters:
x - Value of x.
Returns:
Value of Y1(x).

yn

public static double yn(int n,
                        double x)
Evaluates Yn(x).

Parameters:
n - Order.
x - Value of x.
Returns:
Value of Yn(x).

jnPolynomial

public OneVariablePolynomial jnPolynomial(int n,
                                          int nTerms)
                                   throws java.lang.IllegalArgumentException
Returns Jn(x) as a polynomial object.

Parameters:
n - Order of Jn(x).
nTerms - Number of terms in polynomial.
Returns:
Jn(x) as polynomial.
Throws:
java.lang.IllegalArgumentException - Thrown if n < 0 or nTerms <= 0.

j0Polynomial

public OneVariablePolynomial j0Polynomial(int nTerms)
                                   throws java.lang.IllegalArgumentException
Returns J0(x) as a polynomial object.

Parameters:
nTerms - Number of terms in polynomial.
Returns:
J0(x) as polynomial.
Throws:
java.lang.IllegalArgumentException - Thrown if nTerms <= 0.

j0Roots

public double[] j0Roots(int numberOfRoots)
                 throws java.lang.IllegalArgumentException
Returns the roots of J0(x)=0 upto and including the specified number of roots, which cannot exceed 30. The positive roots of J0(x)=0 are frequently required when dealing with Bessel functions.

Parameters:
numberOfRoots - The number of roots in range [1:30].
Returns:
1D Java array of roots.
Throws:
java.lang.IllegalArgumentException - Thrown if numberOfRoots outside range [1:30].

isValid

public boolean isValid()
Description copied from class: Function
Tests whether or not a valid object.

Specified by:
isValid in class Function
Returns:
Logical-true if a valid object, else logical-false.