Maybe this is really a clarification on the theory, not on what gretl
does, but I will start by asking here.
Gretl gives weights and nodes for Gauss-Legendre quadrature for
arbitrary finite lower and upper limits of integration, not only the
default (-1,1).
Suppose I have a definite integral \int f(x) dx, with limits (a,b). I
ask Gretl for help through the quadtabe command, say for five nodes
matrix GLegm = quadtable (5,2, a,b) .
gretl obliges, and I get my nodes and my weights. Should I then also
make the transformation y = 2*(x-a)/(b-a) - 1, and evaluate the
integrand by [(b-a)/2]*SUM {w_i* f[a+(y_i+1)*(b-a)/2]},
where w_i are the weights I got and y_i the nodes I got,
or should I evaluate the integrand by SUM {w_i f(x_i)}, where here the
nodes I got interval are represented by x_i?
I ended up laughing with how confused this one has got me. The confusion
stems from the question "since I adjust the nodes and weights to the
actual interval (a,b), why should I also adjust the integrand?" But I
remember reading a tutorial on the matter, and it appeared to suggest
that we should do both: get weights and nodes for the (a,b) interval
/and /apply the transformation.
Any suggestions?
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos