// Calculate the integral of 1/(sqrt(1-x^^2) * (x+1.5)). // Another way to write this integrand is // (x-(-1))^^(-0.5) * (1-x)^^0.5 / (x+1.5), // so we set alpha = beta = -0.5. real f(real x) { return 1/(x + 1.5L); } auto i = integrateQAWS(&f, -1.0L, 1.0L, -0.5L, -0.5L, Weight.unity, 1e-15L);
Calculate an integral over the finite interval (a,b), where the integrand has algebraic and/or logarithmic endpoint singularities of a known type.
The integrand is taken to be on the form
where f(x) is the given function and w(x) is specified by setting the weight parameter to one of the following:
A globally adaptive subdivision strategy is applied, with modified Clenshaw–Curtis integration on those subintervals which contain a or b.