0
$\begingroup$

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.

Questions:

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.

1 Answers 1