1 [section:sph_bessel Spherical Bessel Functions of the First and Second Kinds]
5 `#include <boost/math/special_functions/bessel.hpp>`
7 template <class T1, class T2>
8 ``__sf_result`` sph_bessel(unsigned v, T2 x);
10 template <class T1, class T2, class ``__Policy``>
11 ``__sf_result`` sph_bessel(unsigned v, T2 x, const ``__Policy``&);
13 template <class T1, class T2>
14 ``__sf_result`` sph_neumann(unsigned v, T2 x);
16 template <class T1, class T2, class ``__Policy``>
17 ``__sf_result`` sph_neumann(unsigned v, T2 x, const ``__Policy``&);
21 The functions __sph_bessel and __sph_neumann return the result of the
22 Spherical Bessel functions of the first and second kinds respectively:
24 [:sph_bessel(v, x) = j[sub v](x)]
26 [:sph_neumann(v, x) = y[sub v](x) = n[sub v](x)]
32 The return type of these functions is computed using the __arg_promotion_rules
33 for the single argument type T.
37 The functions return the result of __domain_error whenever the result is
38 undefined or complex: this occurs when `x < 0`.
40 The j[sub v] function is cyclic like J[sub v] but differs in its behaviour at the origin:
44 Likewise y[sub v] is also cyclic for large x, but tends to -[infin]
51 There are two sets of test values: spot values calculated using
52 [@http://functions.wolfram.com/ functions.wolfram.com],
53 and a much larger set of tests computed using
54 a simplified version of this implementation
55 (with all the special case handling removed).
65 Other than error handling and a couple of special cases these functions
66 are implemented directly in terms of their definitions:
70 The special cases occur for:
72 [:j[sub 0]= __sinc_pi(x) = sin(x) / x]
74 and for small ['x < 1], we can use the series:
78 which neatly avoids the problem of calculating 0/0 that can occur with the
79 main definition as x [rarr] 0.
81 [endsect] [/section:sph_bessel Spherical Bessel Functions of the First and Second Kinds]
84 Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
85 Distributed under the Boost Software License, Version 1.0.
86 (See accompanying file LICENSE_1_0.txt or copy at
87 http://www.boost.org/LICENSE_1_0.txt).