To use this applet, do the following:
- Enter an equation of the form y = f(x) into the equation box.
Valid operators include: +, -, *, /, and ^. Parentheses may be used for grouping.
Valid functions of x include: abs(), acos(), asin(), atan(), cos(), exp(),
int(), ln(), log(), sin(), sqr(), sqrt(), and tan().
- Enter starting and ending values for x into the x0 and xn boxes.
- Enter the number of integration intervals into the # intervals box.
- Choose the desired shading for the graph by checking one of the five
radio buttons.
- Click the "Evaluate" button. If there is a syntax error, then you will
receive a message to that effect in the "Syntax Check" box. Otherwise,
the graph of the equation will be displayed, and the values of the
trapezoid, Simpson, left endpoint, midpoint and right endpoint
approximations will be shown to the right of the graph. The graph will be
shaded in accordance with the checked radio button. If desired, you can use
the radio buttons to change the shading after the graph is displayed.
Note: Simpson's rule requires an even number of intervals. If the number
of intervals entered is odd, then no value will be given for the Simpson
approximation, and if the Simpson radio button is checked, then no shading
will be shown.
- If the program encounters a division by zero or some other operation that fails
to produce a number, then it will respond with the symbol NaN (Java's
designation for "Not a Number").