Description
What kind of problems is it mostly used for? Please describe.
As most of those familiar with Gauss-Legendre quadratures, a one-dimensional integral can be aproximated to ∑(f(xᵢ)*wᵢ)
. where xᵢ
and wᵢ
depend on various factors. this equation notably uses just zero-order derivative information (just the function evaluated at the nodes). Gauss-Turán quadratures are an extension to this scheme, allowing the use of higher derivative information. This allows to higher precision with less nodes (given that you also have derivative information at the nodes).
Describe the algorithm you’d like
The Gauss-Turán Quadrature is just expressed as a double sum:
∑wᵢ*∑(aᵢₖ∂ᵏf(xᵢ))
where ∂ᵏf(xᵢ)
is just the k-th derivative evaluated at the i-th node, and wᵢ
,aᵢₖ
are just precomputed weights.
The main algorithm needed is the one that calculates those weights and nodes, for one or more polynomial interpolants (like Legendre or Chebyshev).
Other implementations to know about
I haven't found other implementations online, but i did whip up an example with the weights and nodes in [1]. the code below is for a 5-point, k = 2 (value at the point, first and second derivative, the paper allows odd values only, so in the paper notation, it is 5-node, n = k/2 = 1 order quadrature)
xgt51 = [0.171573532582957e-02,
0.516674690067835e-01,
0.256596242621252e+00,
0.614259881077552e+00,
0.929575800557533e+00]
agt51 = [(0.121637123277610E-01,0.283102654629310E-04,0.214239866660517E-07),
(0.114788544658756E+00,0.141096832290629E-02,0.357587075122775E-04),
(0.296358604286158E+00,0.391442503354071E-02,0.677935112926019E-03),
(0.373459975331693E+00,-0.111299945126195E-02,0.139576858045244E-02),
(0.203229163395632E+00,-0.455530407798230E-02,0.226019273068948E-03)
]
function gt51(f,a,b)
X = xgt51
A = agt51
A11,A21,A31 = A[1]
#x1 = (y1 - a)/(b - a)
y1 = X[1]*(b - a) + a
f1,df1,d2f1 = f(y1)
res = zero(f1)
res += A11*f1 + A21*df1 + A31*d2f1
for i in 2:5
Ai1,Ai2,Ai3 = A[i]
yi = X[i]*(b - a) + a
fi,dfi,d2fi = f(yi)
res += Ai1*fi + Ai2*dfi + Ai3*d2fi
end
return res*(b - a)
end
References
[1] Kovačević, M. A. (2000). Construction of generalized Gauss-Turán quadrature rules for systems of arbitrary functions. Computers & Mathematics with Applications (Oxford, England: 1987), 40(8–9), 895–909. doi:10.1016/s0898-1221(00)85001-4
[2] Gori, L., & Micchelli, C. (1996). On weight functions which admit explicit Gauss-Turán quadrature formulas. Mathematics of computation, 65(216), 1567-1581. link