Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / math / doc / sf / bessel_spherical.qbk
1
2 [section:sph_bessel Spherical Bessel Functions of the First and Second Kinds]
3
4 [h4 Synopsis]
5
6 `#include <boost/math/special_functions/bessel.hpp>`
7
8    template <class T1, class T2>
9    ``__sf_result`` sph_bessel(unsigned v, T2 x);
10
11    template <class T1, class T2, class ``__Policy``>
12    ``__sf_result`` sph_bessel(unsigned v, T2 x, const ``__Policy``&);
13
14    template <class T1, class T2>
15    ``__sf_result`` sph_neumann(unsigned v, T2 x);
16    
17    template <class T1, class T2, class ``__Policy``>
18    ``__sf_result`` sph_neumann(unsigned v, T2 x, const ``__Policy``&);
19    
20 [h4 Description]
21
22 The functions __sph_bessel and __sph_neumann return the result of the
23 Spherical Bessel functions of the first and second kinds respectively:
24
25 sph_bessel(v, x) = j[sub v](x)
26
27 sph_neumann(v, x) = y[sub v](x) = n[sub v](x)
28
29 where:
30
31 [equation sbessel2]
32
33 The return type of these functions is computed using the __arg_pomotion_rules
34 for the single argument type T.
35
36 [optional_policy]
37
38 The functions return the result of __domain_error whenever the result is
39 undefined or complex: this occurs when `x < 0`.
40
41 The j[sub v][space] function is cyclic like J[sub v][space] but differs
42 in its behaviour at the origin:
43
44 [graph sph_bessel]
45
46 Likewise y[sub v][space] is also cyclic for large x, but tends to -[infin][space]
47 for small /x/:
48
49 [graph sph_neumann]
50
51 [h4 Testing]
52
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).
58
59 [h4 Accuracy]
60
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.
63
64 [h4 Implementation]
65
66 Other than error handling and a couple of special cases these functions
67 are implemented directly in terms of their definitions:
68
69 [equation sbessel2]
70
71 The special cases occur for:
72
73 j[sub 0][space]= __sinc_pi(x) = sin(x) / x
74
75 and for small ['x < 1], we can use the series:
76
77 [equation sbessel5]
78
79 which neatly avoids the problem of calculating 0/0 that can occur with the
80 main definition as x [rarr] 0.
81
82 [endsect]
83
84 [/ 
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).
89 ]