# Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world.

### Jacobi Polynomials

##### Synopsis
```#include <boost/math/special_functions/jacobi.hpp>
```
```namespace boost{ namespace math{

template<typename Real>
Real jacobi(unsigned n, Real alpha, Real beta, Real x);

template<typename Real>
Real jacobi_derivative(unsigned n, Real alpha, Real beta, Real x, unsigned k);

template<typename Real>
Real jacobi_prime(unsigned n, Real alpha, Real beta, Real x);

template<typename Real>
Real jacobi_double_prime(unsigned n, Real alpha, Real beta, Real x);

}} // namespaces
```

Jacobi polynomials are a family of orthogonal polynomials.

A basic usage is as follows:

```using boost::math::jacobi;
double x = 0.5;
double alpha = 0.3;
double beta = 7.2;
unsigned n = 3;
double y = jacobi(n, alpha, beta, x);
```

All derivatives of the Jacobi polynomials are available. The k-th derivative of the n-th Gegenbauer polynomial is given by

```using boost::math::jacobi_derivative;
double x = 0.5;
double alpha = 0.3;
double beta = 7.2;
unsigned n = 3;
double y = jacobi_derivative(n, alpha, beta, x, k);
```

For consistency with the rest of the library, `jacobi_prime` is provided which simply returns ```jacobi_derivative(n, lambda, x,1)```.

#### Implementation

The implementation uses the 3-term recurrence for the Jacobi polynomials, rising.

 Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle Walker and Xiaogang Zhang Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
{"ft_lang_label":"__label__en","ft_lang_prob":0.64473623,"math_prob":0.84586644,"size":1331,"snap":"2022-40-2023-06","text_gpt3_token_len":345,"char_repetition_ratio":0.17709118,"word_repetition_ratio":0.2513369,"special_character_ratio":0.2501878,"punctuation_ratio":0.24175824,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9883349,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-06T15:42:40Z\",\"WARC-Record-ID\":\"<urn:uuid:68b562f3-262a-41fa-9b1e-34681e388ff1>\",\"Content-Length\":\"12531\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:84b91838-ea7f-4d7e-b9c5-5931f8d0d6a8>\",\"WARC-Concurrent-To\":\"<urn:uuid:c5588569-c640-4aa6-afbb-94b214b1a91d>\",\"WARC-IP-Address\":\"146.20.110.251\",\"WARC-Target-URI\":\"https://live.boost.org/doc/libs/1_80_0/libs/math/doc/html/math_toolkit/sf_poly/jacobi.html\",\"WARC-Payload-Digest\":\"sha1:ZTNANGLGWX5CTQH7ZN7YK3U7UAOTLJAU\",\"WARC-Block-Digest\":\"sha1:SPTW3YA6S47OGLRN7H4EWUZ4M743ZVHK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500356.92_warc_CC-MAIN-20230206145603-20230206175603-00289.warc.gz\"}"}