You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
1.5 KiB

The sequence of poles is [2:1:10].
The quadrature formula should be exact for integrals of the form:
int_{-1}^{1} ( (x-a).^(-1) ) dx, for a = 2,...,10.
Exact maximal relative error on the approximations: 1.8657659241435624e-15
We now reverse the order of the poles:
The new sequence of poles is [10:-1:2].
The quadrature formula should be exact for the same integrals as before.
Exact maximal relative error on the approximations: 1.7413815292006581e-15
Theoretically the nodes and weights do not depend on the
order of the poles. Hence, the weights should be identical
for both sequences of poles.
In practice, however, the weights can contain large errors.
When comparing the computed weights for both sequences of poles,
we obtain a minimal relative distance: 7.5336888536851936e-05
Despite the large errors, both quadrature formulae perform
equally well for the approximation of integrals of the form:
int_{-1}^{1} f(x) dx, where the function f is arbitrary.
Consider the case in which f(x) = (x-1.8).^(-1).
Note that none of poles coincides with the pole of f at x = 1.8.
The exact value for the integral: -1.2527629684953678e+00
The approximation obtained from the first sequence of poles: -1.2527629716740507e+00
with exact relative error: 2.5373378303887123e-09
The approximation obtained from the second sequence of poles: -1.2527629716389368e+00
with exact relative error: 2.5093086559468681e-09
The relative distance between the two approximations: 2.8029174370724948e-11