XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ bfqad()

void bfqad ( double(*)(double)  f,
double  t[],
double  bcoef[],
int  n,
int  k,
int  id,
double  x1,
double  x2,
double  tol,
double *  quad,
double  work[],
int *  info 
)

Integral of product of arbitrary function and B-representation of B-spline

Purpose
This routine computes the integral on [x1, x2] of a product of a function f(x) and the id-th derivative of a k-th order B-spline, using the B-representation (t[], bcoef[], n, k). [x1, x2] must be a subinterval of [t[k-1], t[k]].

Then integration routine using adaptive 8-point Gauss-Legendre rule integrates the product on subintervals of [x1, x2] formed by included (distinct) knots.
Parameters
[in]fUser supplied subroutine which calculates the integrand function f(x) defined as follows.
double f(double x)
{
return the value of f(x);
}
[in]t[]Array t[lt] (lt >= n + k)
Knot vector.
[in]bcoef()Array bcoef[lbcoef] (lbcoef >= n)
B-spline coefficients.
[in]nNumber of B-spline coefficients. (n = sum of knot multiplicities - k)
[in]kOrder of B-spline. (1 <= k)
[in]idOrder of the spline derivative. (0 <= id <= k - 1)
id = 0 gives the spline function.
[in]x1Lower end point of quadrature interval. (t[k] <= x1 <= t[n+1])
[in]x2Upper end point of quadrature interval. (t[k] <= x2 <= t[n+1])
[in]tolDesired accuracy for the quadrature. (dtol < tol <= 0.1 where dtol is max(1.0e-18, double precision unit roundoff for the machine (= d1mach(4))).
[out]quadIntegral of f(x)*(id-th derivative of a k-th order B-spline) on [x1, x2].
[out]work[]Array work[lwork] (lwork >= 3*k)
Work array.
[out]info= 0: Successful exit
= -4: The argument n had an illegal value (n < k)
= -5: The argument k had an illegal value (k < 1)
= -6: The argument id had an illegal value (id < 0 or id >= k)
= -7: The argument x1 had an illegal value (x1 < t[k-1] or x1 > t[n])
= -8: The argument x2 had an illegal value (x2 < t[k-1] or x2 > t[n])
= -9: The argument tol had an illegal value (tol < dtol or tol > 0.1)
= 1: Some quadrature on [x1, x2] does not meet the requested tolerance
Reference
SLATEC