Formula(s) for composite/multiple-segment trapezoidal rule

  • Thread starter Thread starter s3a
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on the discrepancies in formulas for the composite/multiple-segment trapezoidal rule used for approximating integrals. Three different formulas are presented: the first formula includes a summation from 2 to N-1, the second from 2 to N, and the third adds a factor of 2 for the inner terms. The consensus leans towards the first formula as the most accurate, with the second and third formulas deemed incorrect due to their summation limits. A practical example using three trapezoids is suggested to illustrate the differences in outcomes.

PREREQUISITES
  • Understanding of integral calculus
  • Familiarity with numerical methods for integration
  • Knowledge of summation notation
  • Basic programming skills for implementing numerical algorithms
NEXT STEPS
  • Study the derivation of the trapezoidal rule in numerical analysis
  • Learn about error analysis in numerical integration techniques
  • Explore the implementation of the trapezoidal rule in Python using NumPy
  • Investigate alternative numerical integration methods, such as Simpson's rule
USEFUL FOR

Students of calculus, educators teaching numerical methods, and software developers implementing numerical integration algorithms.

s3a
Messages
828
Reaction score
8

Homework Statement


Hello, everyone. :)

I'm looking at several different sources for the composite/multiple-segment trapezoidal rule (for approximating the value of an integral), but the formulas don't seem to agree.

Homework Equations


One place says I ≈ Δx/2 [f(a) + f(b)] + Δx Σ_(i=2)^(N-1) f(x_i).

Another place says I ≈ Δx/2 [f(a) + f(b)] + Δx Σ_(i=2)^(N) f(x_i).

Yet another place says I ≈ Δx/2 [f(a) + f(b) + 2 Σ_(i=1)^(N-1) f(a + iΔx)].

The Attempt at a Solution


Only the first one seems correct to me. Basically, the second one seems to me like it should end at N-1, not N, and the third one seems to me like it should end at N-2, not N-1.

Am I right?
 
Physics news on Phys.org
You could set up a simple example, like if you are splitting your integral into 3 trapezoids. Then see how each of these formulas plays out in figuring it.
 

Similar threads

Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
2K
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K