2 [section:sph_bessel Spherical Bessel Functions of the First and Second Kinds]
6 `#include <boost/math/special_functions/bessel.hpp>`
8 template <class T1, class T2>
9 ``__sf_result`` sph_bessel(unsigned v, T2 x);
11 template <class T1, class T2, class ``__Policy``>
12 ``__sf_result`` sph_bessel(unsigned v, T2 x, const ``__Policy``&);
14 template <class T1, class T2>
15 ``__sf_result`` sph_neumann(unsigned v, T2 x);
17 template <class T1, class T2, class ``__Policy``>
18 ``__sf_result`` sph_neumann(unsigned v, T2 x, const ``__Policy``&);
22 The functions __sph_bessel and __sph_neumann return the result of the
23 Spherical Bessel functions of the first and second kinds respectively:
25 sph_bessel(v, x) = j[sub v](x)
27 sph_neumann(v, x) = y[sub v](x) = n[sub v](x)
33 The return type of these functions is computed using the __arg_pomotion_rules
34 for the single argument type T.
38 The functions return the result of __domain_error whenever the result is
39 undefined or complex: this occurs when `x < 0`.
41 The j[sub v][space] function is cyclic like J[sub v][space] but differs
42 in its behaviour at the origin:
46 Likewise y[sub v][space] is also cyclic for large x, but tends to -[infin][space]
53 There are two sets of test values: spot values calculated using
54 [@http://functions.wolfram.com/ functions.wolfram.com],
55 and a much larger set of tests computed using
56 a simplified version of this implementation
57 (with all the special case handling removed).
61 Other than for some special cases, these functions are computed in terms of
62 __cyl_bessel_j and __cyl_neumann: refer to these functions for accuracy data.
66 Other than error handling and a couple of special cases these functions
67 are implemented directly in terms of their definitions:
71 The special cases occur for:
73 j[sub 0][space]= __sinc_pi(x) = sin(x) / x
75 and for small ['x < 1], we can use the series:
79 which neatly avoids the problem of calculating 0/0 that can occur with the
80 main definition as x [rarr] 0.
85 Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
86 Distributed under the Boost Software License, Version 1.0.
87 (See accompanying file LICENSE_1_0.txt or copy at
88 http://www.boost.org/LICENSE_1_0.txt).