Class Polynomials

java.lang.Object
org.episteme.core.mathematics.analysis.polynomials.Polynomials

public final class Polynomials extends Object
Utility class for computing orthogonal polynomials. * @author Silvere Martin-Michiellot
Since:
1.0
Author:
Gemini AI (Google DeepMind)
  • Method Details

    • legendre

      public static Real legendre(int n, Real x)
      Evaluates the Legendre polynomial P_n(x) at the given point. Uses the recurrence relation: P_0(x) = 1 P_1(x) = x (n+1) P_{n+1}(x) = (2n+1) x P_n(x) - n P_{n-1}(x)
      Parameters:
      n - degree of the polynomial
      x - point at which to evaluate
      Returns:
      P_n(x)
    • legendreDerivative

      public static Real legendreDerivative(int n, Real x)
      Evaluates the derivative of the Legendre polynomial P'_n(x) at the given point. Uses the relation: P'_n(x) = n (x P_n(x) - P_{n-1}(x)) / (x^2 - 1) for x != ±1
      Parameters:
      n - degree of the polynomial
      x - point at which to evaluate
      Returns:
      P'_n(x)
    • chebyshevT

      public static Real chebyshevT(int n, Real x)
      Evaluates the Chebyshev polynomial of the first kind T_n(x). T_n(cos(θ)) = cos(nθ)
      Parameters:
      n - degree
      x - point (typically in [-1, 1])
      Returns:
      T_n(x)
    • chebyshevU

      public static Real chebyshevU(int n, Real x)
      Evaluates the Chebyshev polynomial of the second kind U_n(x).
      Parameters:
      n - degree
      x - point
      Returns:
      U_n(x)
    • hermite

      public static Real hermite(int n, Real x)
      Evaluates the Hermite polynomial H_n(x) (physicist's convention). H_0(x) = 1, H_1(x) = 2x, H_{n+1}(x) = 2x H_n(x) - 2n H_{n-1}(x)
      Parameters:
      n - degree
      x - point
      Returns:
      H_n(x)
    • laguerre

      public static Real laguerre(int n, Real x)
      Evaluates the Laguerre polynomial L_n(x). L_0(x) = 1, L_1(x) = 1-x, (n+1) L_{n+1}(x) = (2n+1-x) L_n(x) - n L_{n-1}(x)
      Parameters:
      n - degree
      x - point
      Returns:
      L_n(x)