I am making a Java function to calculate $\int_{0}^{\pi/2}x/sin(x) dx$ using Simpsons rule. When the function equals $0$ or $0/\sin(0)$ should I just add $1$ (limit) or $10^{-10}$ (limit). My professor said to use $10^{-10}$ why would this be?public static double simpsonsRuleFunction1(double valueN, double valueA, double valueB, double valueDx) {    double e = 0.0;    double simpsonsRule = 0.0;    double valueHolder = 0.0;    valueN = 2;    valueA = 0;    valueB = (Math.PI)/2;     for(int i = 1; i<=valueN+1 ; i++){        valueDx = (valueB-valueA)/valueN;        e = valueA + ((i-1)*valueDx);        if (i==1) {        // Limit as x -> 0        simpsonsRule += Math.pow(10,-10);        }        else if ((i % 2 == 0) && ( i > 1) && (i < valueN+1 ))  {        simpsonsRule += 4*(e/((Math.sin(e))));        }        else if ((i % 2 != 0) && ( i > 1) && (i < valueN+1 )) {        simpsonsRule += 2*(e/((Math.sin(e))));           }        else if (i == valueN+1 ) {            simpsonsRule += (e/((Math.sin(e))));        }    }    simpsonsRule = simpsonsRule *((valueDx)/3);    System.out.println(\nsimpsonsRule + simpsonsRule);     while(Math.abs(valueHolder - simpsonsRule) > Math.pow(10,-6)) {           System.out.println(\nValueHolder + valueHolder);           valueHolder = simpsonsRule;           valueN +=2;           valueDx = (valueB-valueA)/valueN;           simpsonsRule = 0;    for(int i = 1; i<=valueN + 1; i++){        e = valueA + ((i-1)*valueDx);        if (i==1) {        // Limit as x -> 0        simpsonsRule += Math.pow(10,-10);        }        else if (i % 2 == 0) {        simpsonsRule += 4*(e/((Math.sin(e))));        }        else if ((i % 2 != 0) && ( i > 1) && (i < valueN + 1)) {        simpsonsRule += 2*(e/((Math.sin(e))));           }        else if (i == valueN + 1) {            simpsonsRule += (e/((Math.sin(e))));        }    }    simpsonsRule = simpsonsRule *((valueDx)/3);    }    return valueN;}
Simpsons Rule 10
homework;calculus;java