## Name:

integral computes an interval bounding the integral of a function on an interval.

## Library name:

sollya_obj_t sollya_lib_integral(sollya_obj_t, sollya_obj_t)

## Usage:

integral(f,I) : (function, range) -> range

## Parameters:

• f is a function.
• I is an interval.

## Description:

• integral(f,I) returns an interval J such that the exact value of the integral of f on I lies in J.
• This command is safe but very inefficient. Use dirtyintegral if you just want an approximate value.
• The result of this command depends on the global variable diam. The method used is the following: I is cut into intervals of length not greater then d*|I| where d is the value of global variable diam. On each small interval J, an evaluation of f by interval is performed. The result is multiplied by the length of J. Finally all values are summed.

## Example 1:

> sin(10);
-0.54402111088936981340474766185137728168364301291622
> integral(cos(x),[0;10]);
[-0.54710197983579690224097637163525943075698599257333;-0.54094015130013183848150540881373370744053741191729]
> diam=1e-5!;
> integral(cos(x),[0;10]);
[-0.54432915685955427101857780295936956775293876382777;-0.54371306401249969508039644221927489010425803173555]