Class SimpsonIntegral

    • Field Detail

      • strapezoid

        protected double strapezoid
      • lowerlimit

        protected double lowerlimit
      • upperlimit

        protected double upperlimit
      • maxsteps

        protected int maxsteps
      • accuracy

        protected double accuracy
    • Constructor Detail

      • SimpsonIntegral

        public SimpsonIntegral()
    • Method Detail

      • simpson

        protected double simpson()
        Calculate the integral with the simpson method of the equation implemented in the method equation
        Returns:
        Throws:
        Exception
      • trapezoid

        protected double trapezoid​(int n)
        Calculate the integral with the trapezoidal algorithm of the equation implemented in the method equation
        Parameters:
        n - - number of steps to perform
        Returns:
      • equation

        protected abstract double equation​(double x)
        Equation to integrate
        Parameters:
        x - - point in which to calculate the function
        Returns: