The calculation of definite integrals is performed using the Gauss method. To calculate a definite integral, you need to run the command: \Nint (f, a, b, epsilon, N); Where: (a, b) - integration interval, f - integrand function, epsilon - the number of exact decimal places after the decimal point (optional), N is the number of points in the Gaussian formula (optional). The last three parameters can be omitted. The precision can be specified explicitly (using the epsilon parameter), or using the MachineEpsilon constant in the current ring.
To calculate the improper integral on an infinite interval, you must run the command: \Nint (f, a, b, [...], epsilon, N); Where: (a, b) - interval of integration, where any of the boundaries of integration can be either a finite number or pm infty; f - integrand function, [...] - extremum points of the integrand in the interval (a, b) (optional), epsilon - the number of exact decimal places after the decimal point (optional), N is the number of points in the Gaussian formula (optional). The last three parameters can be omitted.
If the extremum points are not indicated, then the correctness of the result is ensured in the case when the integrand is monotonic on the interval of integration.
Improper integrals of the first kind are calculated using the following algorithm: Let, for definiteness, the interval of integration have the form: [a, \infty). We consider the integral of the function f (x) with a step of 3N. We get the segments: [a, a + 3N], [a + 3N, a + 6N], ... When the value of the integral on the next segment becomes less than the value of the integral on the previous segment, the step is increased by a factor of 10. The calculation of the integral stops when the value of the integral in the current segment becomes less than the value of the integral in the previous segment and less than the machine zero (MachineEpsilon).