|
| double | hummingbird::LegendrePolynomial (const int n, const double x) |
| | Computes the Legendre polynomial of degree n at a point x using the formula:
|
| double | hummingbird::LegendrePolynomialPrime (const int n, const double x) |
| | Computes the first derivative of the Legendre polynomial of degree n at a point x using the recurrence relation:
|
| double | hummingbird::LegendrePolynomialPrimePrime (const int n, const double x) |
| | Computes the second derivative of the Legendre polynomial of degree n using Legendre's differential equation:
|
| std::vector< double > | hummingbird::AllLegendreRoots (const int n) |
| | Compute all roots of the Legendre polynomial of order n.
|
| double | hummingbird::LegendreRoot (const int n, const int k) |
| | Computes the k-th root of the n-th order Legendre polynomial by first approximating the root with ApproximateLegendreRoot, then using Newton's method to converge to the root.
|
| double | hummingbird::ApproximateLegendreRoot (const int n, const int k) |
| | Approximates the k-th root of the n-th order Legendre polynomial with:
|
| std::vector< double > | hummingbird::AllLegendrePrimeRoots (const int n) |
| | Computes all roots of the \(P'_n(x)\) polynomial. A total of n-1 roots will be computed and returned.
|
| double | hummingbird::LegendrePrimeRoot (const int n, const int k) |
| | Computes the k-th root of the n-th order first derivative of the Legendre polynomial by first approximating with ApproximateLegendrePrimeRoot, then using Newton's method to converge.
|
| double | hummingbird::ApproximateLegendrePrimeRoot (const int n, const int k) |
| | Approximates the k-th root of the first derivative of the n-th degree Legendre polynomial using the average of the approximations (ApproximateLegendreRoot()) of the surrounding roots of the n-th degree Legendre polynomial. Note that zero-indexing is used, so the roots of the \(P'_4 (x)\) polynomial are \(k=0,1,2\). The approximations of these are given by:
|