Content: This page contains an applet for the integration of functions in a single variable and instructions for its use. Moreover, a number of quadrature rules can be visualised (e.g., the midpoint rule or the trapezoidal rule).


Download Applet


Analysis for Computer Scientists, Chapter 11 and 13


Entering the integrand

To visualise the integration of a function by means of different quadrature rules, a function must be defined in the field f(x)= (detailed information on the syntax can be found here). The interval of integration is set in the field Interval in the format [a,b].




To integrate the function entered, press the button Integrate. In the standard configuration, as can be seen from the screenshot, the lower and upper sums are visualised. The combo box Method is used to select one of the following methods:

  • Lower and upper sum
  • Trapezoidal rule
  • Midpoint rule
  • Lower sum
  • Upper sum
  • Left endpoint rule
  • Right endpoint rule

To change the number of subdivisions use the slider or enter the number of subdivisions manually into the field Subdivisions.


If the method lower and upper sum is selected, the output gives the value of the lower sum, the value of the upper sum, the difference between the two, and the exact value (as computed by a Gaussian quadrature rule of order 10). If any other selection is made, the output consists of the sum (which is computed by the selected method), the exact value of the integral, and the error of the approximation.


Integration output


Negative and positive area

In addition, the option Neg./pos. summands in the same colour specifies if the rectangles below and above the x-axis are highlighted in the same colour. To draw the negative areas in a different colour, remove the check from the corresponding check box.

Change of subdivision

The option Activate intervals in the tab Options admits the manual adjustment of the subdivision points. If the option is active the subdivision points are highlighted and can be changed with the mouse as follows:

  • Drag a point while pressing the left mouse button: Move a point;
  • Click at a point with the third mouse button: Delete the point;
  • Click at a free place on the x-axis with the right mouse button: Add a subdivision point.


If you have further questions or comments, or if you found a bug, please send us an e-mail.

 Financially supported by

University of Innsbruck: New Media and Learning Technologies
Austrian Federal Ministry of Education, Science and Research

Nach oben scrollen