Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / math / doc / sf / jacobi.qbk
1 [/
2   Copyright 2019, Nick Thompson
3   Distributed under the Boost Software License, Version 1.0.
4   (See accompanying file LICENSE_1_0.txt or copy at
5   http://www.boost.org/LICENSE_1_0.txt).
6 ]
7
8 [section:jacobi Jacobi Polynomials]
9
10 [h4 Synopsis]
11
12 ``
13 #include <boost/math/special_functions/jacobi.hpp>
14 ``
15
16    namespace boost{ namespace math{
17
18    template<typename Real>
19    Real jacobi(unsigned n, Real alpha, Real beta, Real x);
20
21    template<typename Real>
22    Real jacobi_derivative(unsigned n, Real alpha, Real beta, Real x, unsigned k);
23
24    template<typename Real>
25    Real jacobi_prime(unsigned n, Real alpha, Real beta, Real x);
26
27    template<typename Real>
28    Real jacobi_double_prime(unsigned n, Real alpha, Real beta, Real x);
29
30    }} // namespaces
31
32 Jacobi polynomials are a family of orthogonal polynomials.
33
34 A basic usage is as follows:
35
36     using boost::math::jacobi;
37     double x = 0.5;
38     double alpha = 0.3;
39     double beta = 7.2;
40     unsigned n = 3;
41     double y = jacobi(n, alpha, beta, x);
42
43 All derivatives of the Jacobi polynomials are available.
44 The /k/-th derivative of the /n/-th Gegenbauer polynomial is given by
45
46     using boost::math::jacobi_derivative;
47     double x = 0.5;
48     double alpha = 0.3;
49     double beta = 7.2;
50     unsigned n = 3;
51     double y = jacobi_derivative(n, alpha, beta, x, k);
52
53 For consistency with the rest of the library, `jacobi_prime` is provided which simply returns `jacobi_derivative(n, lambda, x,1)`.
54
55 [$../graphs/jacobi.svg]
56
57 [h3 Implementation]
58
59 The implementation uses the 3-term recurrence for the Jacobi polynomials, rising.
60
61
62 [endsect]