0
$\begingroup$

Some terminological questions about numerical integration:

  1. When a question states trapezoidal rule with 2 points, does that mean 2 subintervals or 3 subintervals? Since 3 subintervals have 2 points other than the end points.

  2. How about a Gaussian rule with 2 quadrature points? Does that mean when $n=2$? So the integral can be approximated by $$\sum_{i=0}^{2}A_if(x_i)=A_0f(x_0)+A_1f(x_1)+A_2f(x_2)$$ But then there will be 3 $x_i$'s? Which means there are "3 points"? Or does "Gaussian rule with 2 points" mean $n=1$?

Thanks for the clarification.

$\endgroup$
  • $\begingroup$ Two points = one interval $\endgroup$ – fosho Apr 26 '16 at 11:35
0
$\begingroup$

Quadrature rules are (typically) defined using a minimal set of nodes and then extended trivivally.

1) The trapezoidal rule uses two points, the endpoints of a single interval, whereas the composite trapezoidal rule, is the extention of the trapezoidal rule to $N$ subintervals. These are typically, but not necessarily, back-to-back and so there are (typically) N+1 relevant nodes.

2) A Gaussian rule with two nodes is of form $A_0 f(x_0) + A_1 f(x_1)$. Your example has three nodes.

I have to switch between mathematics, MATLAB, Fortran and C several times a week. It helps me to forget about the starting index and formulate algorithms/thought processes in terms of the "first" element and the number of elements, rather than a range of indices.

$\endgroup$

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.