Class NumericalIntegral.Parser

java.lang.Object
math.numericalmethods.NumericalIntegral.Parser
Enclosing class:
NumericalIntegral

class NumericalIntegral.Parser extends Object
  • Constructor Details

    • Parser

      public Parser(String expression, int mode)
  • Method Details

    • getFunctionFromIntegralCommand

      public Function getFunctionFromIntegralCommand(String expression)
      Method that processes the format that this software will recognize for user input of an integral expression. The general format is: expression,lowerLimit,upperLimit,iterations(optional) e.g... sin(3x-5),2,5.//assuming default number of iterations which will be computed automatically sin(3x-5),2,5,50.//specifies 50 iterations. Please ensure that the function is continuous in the specified range.
      Parameters:
      expression - The expression containing the function to integrate and the lower and upper boundaries of integration.
      Returns:
      an array containing:: At index 0.....the expression to integrate At index 1.....the lower limit of integration At index 2.....the upper limit of integration. At index 3(optional)...the number of iterations to employ in evaluating this expression. intg( F,0,2,3 ) intg(@3x+1,0,2,5) OR intg(F(x),0,2,5) OR intg(F,0,2,5)
    • getFunctionFromSymbolicIntegralCommand

      public Function getFunctionFromSymbolicIntegralCommand(String expression)
      Parses the format: "∫(funxn,x1,x2)dx" Method that processes the format that this software will recognize for user input of an integral expression. The general format is: expression,lowerLimit,upperLimit,iterations(optional) e.g... sin(3x-5),2,5.//assuming default number of iterations which will be computed automatically sin(3x-5),2,5,50.//specifies 50 iterations. Please ensure that the function is continuous in the specified range.
      Parameters:
      expression - The expression containing the function to integrate and the lower and upper boundaries of integration.
      Returns:
      an array containing:: At index 0.....the expression to integrate At index 1.....the lower limit of integration At index 2.....the upper limit of integration. At index 3(optional)...the number of iterations to employ in evaluating this expression. F(x)=3x+1; ∫( F,0,2,3 )dx ∫(@3x+1,0,2,5)dx OR ∫(F(x),0,2,5)dx