Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

JROOT Function

computes the first nonzero roots of a Bessel function of the first kind and the derivative of the Bessel function at each root

JROOT( \nu, n)

The JROOT function returns an n ×2 matrix with the calculated roots in the first column and the derivatives in the second column.

The inputs to the JROOT function are as follows:
\nu
is a scalar denoting the order of the Bessel function, with \nu \gt -1.

n
is a positive integer denoting the number of roots.

The JROOT function returns a matrix in which the first column contains the first n roots of the Bessel function; these roots are the solutions to the equation
J_{\nu}(x_i) = 0 ,\hspace*{0.20in} i = 1, ... , n
The second column of this matrix contains the derivatives J^'_\nu(x_i) of the Bessel function at each of the roots xi. The expression J_\nu(x) is a solution to the differential equation
x^2 \frac{d^2 J_{\nu}}{dx^2} + x \frac{dJ_{\nu}}{dx}
+ (x^2 - \nu^2)J_{\nu} = 0
One of the expressions for such a function is given by the series
J_{\nu}(x) = ( \frac{1}2 z )^{\nu} 
 \sum_{k=0}^{\infty} 
 \frac{ ( -\frac{1}4 z^2 )^k}
 {k! \Gamma(\nu + k + 1)}
where \Gamma(\cdot) is the gamma function. Refer to Abramowitz and Stegun (1973) for more details concerning the Bessel and gamma functions. The algorithm is a Newton method coupled with a reasonable initial guess. For large values of n or \nu, the algorithm could fail due to machine limitations. In this case, JROOT returns a matrix with zero rows and zero columns. The values that cause the algorithm to fail are machine dependent.

The following code provides an example:

proc iml;
  x = jroot(1,4);
  print x;

To obtain only the roots, you can use the following statement, which extracts the first column of the returned matrix:

  x = jroot(1,4)[,1];

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.