Class GaussJacobiQuadratureIntegrator1D

  • All Implemented Interfaces:
    Integrator<Double,​Double,​Function<Double,​Double>>

    public class GaussJacobiQuadratureIntegrator1D
    extends GaussianQuadratureIntegrator1D
    Gauss-Jacobi quadrature approximates the value of integrals of the form $$ \begin{align*} \int_{-1}^{1} (1 - x)^\alpha (1 + x)^\beta f(x) dx \end{align*} $$ The weights and abscissas are generated by GaussJacobiWeightAndAbscissaFunction.

    In this integrator, $\alpha = 0$ and $\beta = 0$, which means that no adjustment to the function must be performed. However, the function is scaled in such a way as to allow any values for the limits of the integrals.

    • Constructor Detail

      • GaussJacobiQuadratureIntegrator1D

        public GaussJacobiQuadratureIntegrator1D​(int n)
        Parameters:
        n - The number of sample points to be used in the integration, not negative or zero
    • Method Detail

      • getIntegralFunction

        public Function<Double,​Double> getIntegralFunction​(Function<Double,​Double> function,
                                                                 Double lower,
                                                                 Double upper)
        Returns a function that is valid for both the type of quadrature and the limits of integration. To evaluate an integral over $[a, b]$, a change of interval must be performed: $$ \begin{align*} \int_a^b f(x)dx &= \frac{b - a}{2}\int_{-1}^1 f(\frac{b - a}{2} x + \frac{a + b}{2})dx\\ &\approx \frac{b - a}{2}\sum_{i=1}^n w_i f(\frac{b - a}{2} x + \frac{a + b}{2}) \end{align*} $$
        Specified by:
        getIntegralFunction in class GaussianQuadratureIntegrator1D
        Parameters:
        function - The function to be integrated, not null
        lower - The lower integration limit, not null
        upper - The upper integration limit, not null
        Returns:
        A function in the appropriate form for integration