This dialog box is opened when you select the Integrate Function... command from the Analysis menu.
Pressing the Integrate button performs a numerical integration of a user defined function. In the background QtiPlot uses CPPQUADPACK, the C++ port of QUADPACK, a FORTRAN library for numerical integration of one-dimensional functions that is in the public domain.
An analytical function depending on only one variable, x by default, must be entered in the Function text box. The numerical result of the integration is displayed in the Log Panel.
The Σ button pops-up a menu listing all built-in mathematical functions provided by QtiPlot. Pressing one of the actions from this menu copies the displayed function into the edit box at the position of the text cursor.
Clicking on the button displaying a pencil icon opens a menu which lists recently used
functions. By pressing one of the menu items, the selected function is inserted into the edit text box at
the current position of the cursor.
Clicking the Clear button removes the contents of the
Function text box.
The Variable input field displays the name of the independent variable of the function (i.e., the variable of integration). By default it is set to x.
The Tolerance parameter has a default value of 1e-09 that should work for most functions. For some functions, especially those containing singularities and discontinuities, you may need to experiment with the tolerance value to obtain acceptable results.
The next two fields From and To are the lower and upper limits of integration. By unchecking these two boxes it is possible to define infinite intervals. For integration over a finite interval, when both limit boxes are checked, QtiPlot uses the QAGS routine from QUADPACK which is an adaptive quadrature based on 21-point Gauss-Kronrod quadrature within each subinterval. For integration over infinite intervals, QtiPlot uses the QAGI routine from QUADPACK which maps the infinite interval onto the semi-open interval (0,1] using a transformation then uses the same approach as QAGS, except with 15-point rather than 21-point Gauss-Kronrod quadrature.
The numerical format used to display the results can be chosen from the Format list box. The value set in the Precision input box has a different meaning depending on the numeric format. The following format and precision options are available:
Decimal or scientific e-notation, whichever is the most concise. The Precision value represents the maximum number of significant figures in the output (trailing zeroes are omitted).
Decimal notation. The Precision value represents the number of digits after the decimal point.
Scientific e-notation where the letter e
is used to represent "times ten raised to the power of" and is followed by the value of the exponent. The Precision value represents the number of digits after the decimal point.
Scientific e-notation where the letter E
is used to represent "times ten raised to the power of" and is followed by the value of the exponent. The Precision value represents the number of digits after the decimal point.
The Plot Area option should be checked if you want that QtiPlot draws a plot of the integrated function on the currently active layer. A table of the plotted data can be generated by right clicking on the curve and selecting the Worksheet command.