I need to calculate a quadrature rule with maximum degree of accuracy that looks like this:

$$ \int_0^\infty e^{-x}f(x)dx = A_1f(x_1) + A_2f(x_2) + R(f) $$

where $f(x) = cox(x)$, presumably.


1) Can this be solved in a general manner, for any single variable function?

2) If $f(x) = cos(x)$, is there a systematic way to split the calculation into two intervals, or do I have to guess, based on how the graph for $e^{-x}cos(x)$ looks like?

PS: In case it's not obvious, I'm in over my head with this, so thanks for the patience.


Try the following approach using orthogonal polynomials $e^{-x}$ is the weight function of the Laguerre polynomials $$\phi_j(x)=\frac{e^x}{j!}\frac{d^j}{dx^j}(e^{-x}x^j)$$ Hence, you should write out $\phi_2$ and take its roots as node points $x_1$, $x_2$. Expand $f$ as follows: $$f(x)=l_1(x)f(x_1)+l_2(x)f(x_2)$$ where $l_i$ are the basis polynomials of the Lagrange interpolation method. Substituting this expansion in the integral we find that the coefficients are determined as follows: $$A_i=\int_0^{\infty}e^{-x}l_i(x)dx$$

  • $\begingroup$ Thanks; Laguerre polinomials do seem to be the ticket, but I think you're missing a $\frac{1}{j!}$ in the first formula. $\endgroup$ – scribu May 25 '12 at 2:05
  • $\begingroup$ indeed, thanks for pointing out $\endgroup$ – Valentin May 25 '12 at 19:13
  • $\begingroup$ Turns out that it's a Gauss formula, with a relatively simple solution, involving a Jacobian and it's eigenvalues and eigenvectors. $\endgroup$ – scribu May 26 '12 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.