bessel_spherical.qbk 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [section:sph_bessel Spherical Bessel Functions of the First and Second Kinds]
  2. [h4 Synopsis]
  3. `#include <boost/math/special_functions/bessel.hpp>`
  4. template <class T1, class T2>
  5. ``__sf_result`` sph_bessel(unsigned v, T2 x);
  6. template <class T1, class T2, class ``__Policy``>
  7. ``__sf_result`` sph_bessel(unsigned v, T2 x, const ``__Policy``&);
  8. template <class T1, class T2>
  9. ``__sf_result`` sph_neumann(unsigned v, T2 x);
  10. template <class T1, class T2, class ``__Policy``>
  11. ``__sf_result`` sph_neumann(unsigned v, T2 x, const ``__Policy``&);
  12. [h4 Description]
  13. The functions __sph_bessel and __sph_neumann return the result of the
  14. Spherical Bessel functions of the first and second kinds respectively:
  15. [:sph_bessel(v, x) = j[sub v](x)]
  16. [:sph_neumann(v, x) = y[sub v](x) = n[sub v](x)]
  17. where:
  18. [equation sbessel2]
  19. The return type of these functions is computed using the __arg_promotion_rules
  20. for the single argument type T.
  21. [optional_policy]
  22. The functions return the result of __domain_error whenever the result is
  23. undefined or complex: this occurs when `x < 0`.
  24. The j[sub v] function is cyclic like J[sub v] but differs in its behaviour at the origin:
  25. [graph sph_bessel]
  26. Likewise y[sub v] is also cyclic for large x, but tends to -[infin]
  27. for small /x/:
  28. [graph sph_neumann]
  29. [h4 Testing]
  30. There are two sets of test values: spot values calculated using
  31. [@http://functions.wolfram.com/ functions.wolfram.com],
  32. and a much larger set of tests computed using
  33. a simplified version of this implementation
  34. (with all the special case handling removed).
  35. [h4 Accuracy]
  36. [table_sph_bessel]
  37. [table_sph_neumann]
  38. [h4 Implementation]
  39. Other than error handling and a couple of special cases these functions
  40. are implemented directly in terms of their definitions:
  41. [equation sbessel2]
  42. The special cases occur for:
  43. [:j[sub 0]= __sinc_pi(x) = sin(x) / x]
  44. and for small ['x < 1], we can use the series:
  45. [equation sbessel5]
  46. which neatly avoids the problem of calculating 0/0 that can occur with the
  47. main definition as x [rarr] 0.
  48. [endsect] [/section:sph_bessel Spherical Bessel Functions of the First and Second Kinds]
  49. [/
  50. Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
  51. Distributed under the Boost Software License, Version 1.0.
  52. (See accompanying file LICENSE_1_0.txt or copy at
  53. http://www.boost.org/LICENSE_1_0.txt).
  54. ]