Simpson's Rule/Trapezoidal Approximation - Error rate help

Click For Summary
SUMMARY

The discussion centers on the error rates of the Trapezoidal Approximation and Simpson's Rule for the integral of sin(x) from 0 to π. The user calculated the trapezoidal approximation as 1.5708 and Simpson's Rule as 2.0944, both of which align with textbook values. However, the user incorrectly assumed that the maximum values of the second and fourth derivatives (M) were zero, leading to a miscalculation of the error. The correct error for the trapezoidal approximation is π³/48 (approximately 0.65) and for Simpson's Rule is π⁵/2880 (approximately 0.1).

PREREQUISITES
  • Understanding of integral calculus, specifically definite integrals.
  • Familiarity with numerical methods for integration, including Trapezoidal and Simpson's Rule.
  • Knowledge of derivatives and their significance in error estimation.
  • Basic proficiency in evaluating limits and maximum values of functions over an interval.
NEXT STEPS
  • Study the derivation of error formulas for the Trapezoidal Rule and Simpson's Rule.
  • Learn how to determine maximum values of derivatives over a specified interval.
  • Explore numerical integration techniques beyond Trapezoidal and Simpson's Rule, such as Romberg integration.
  • Practice solving similar integral problems to reinforce understanding of error analysis in numerical methods.
USEFUL FOR

Students in calculus courses, educators teaching numerical methods, and anyone interested in understanding the accuracy of numerical integration techniques.

Asphyxiated
Messages
263
Reaction score
0

Homework Statement



\int^{ \pi}_{0} sin(x)dx \;\;\;\;\;\;\;\; dx=\frac{ \pi}{2}

Homework Equations



Trapezoidal Approximation:

|f''(x)| \leq M \;\;\;\;\; for \;\;\;\;\; a \leq x \leq b

\frac {b-a}{12}(M)(dx)^{2} = Error

Simpson's Rule:

|f^{(4)}(x)| \leq M \;\;\;\;\; for \;\;\;\;\; a \leq x \leq b

\frac{b-a}{180}(M)(dx)^{4} = Error

The Attempt at a Solution



Ok so I have found the correct estimations using both methods easily, the trapezoidal approximation is: 1.5708 and Simpson's Rule is: 2.0944, those numbers check out in the back of the book, but when it comes to finding the error I think that it should be 0 because the max (M) is zero for both the second and fourth derivative but the book says otherwise. Heres what I did:

y=sin(x)

y'=cos(x)

y''=-sin(x)

y^{(3)}= -cos(x)

y^{(4)}= sin(x)

and Trapezoidal Rule using y'' is:

|y''( \pi)|=0

and

|y''(0)|=0

and that follows the same for y^{(4)} so M is 0 and thus the entire equation is 0 and Error = 0 but the book states that the error for the trapezoidal approximation is:

\frac { \pi^{3}}{48} \;\;\;\;\; or \;\;\;\; .65

and the Error for Simpson's Rule is:

\frac { \pi^{5}}{2880} \;\;\;\; or \;\;\;\; .1

I don't see how they got this... but I don't think the actual error rate is zero either because if it were then the trapezoidal and simpson approximation would be exactly equal, so where did I go wrong?
 
Physics news on Phys.org
Asphyxiated said:

Homework Statement



\int^{ \pi}_{0} sin(x)dx \;\;\;\;\;\;\;\; dx=\frac{ \pi}{2}

Homework Equations



Trapezoidal Approximation:

|f''(x)| \leq M \;\;\;\;\; for \;\;\;\;\; a \leq x \leq b

\frac {b-a}{12}(M)(dx)^{2} = Error

Simpson's Rule:

|f^{(4)}(x)| \leq M \;\;\;\;\; for \;\;\;\;\; a \leq x \leq b

\frac{b-a}{180}(M)(dx)^{4} = Error

The Attempt at a Solution



Ok so I have found the correct estimations using both methods easily, the trapezoidal approximation is: 1.5708 and Simpson's Rule is: 2.0944, those numbers check out in the back of the book, but when it comes to finding the error I think that it should be 0 because the max (M) is zero for both the second and fourth derivative but the book says otherwise.
f''(x) = -sin(x) and f(4)(x) = sin(x). The maximum value of the absolute values of these functions is not zero. What you're looking for is the maximum value over the entire interval [0, pi].
Asphyxiated said:
Heres what I did:

y=sin(x)

y'=cos(x)

y''=-sin(x)

y^{(3)}= -cos(x)

y^{(4)}= sin(x)

and Trapezoidal Rule using y'' is:

|y''( \pi)|=0

and

|y''(0)|=0

and that follows the same for y^{(4)} so M is 0 and thus the entire equation is 0 and Error = 0 but the book states that the error for the trapezoidal approximation is:

\frac { \pi^{3}}{48} \;\;\;\;\; or \;\;\;\; .65

and the Error for Simpson's Rule is:

\frac { \pi^{5}}{2880} \;\;\;\; or \;\;\;\; .1

I don't see how they got this... but I don't think the actual error rate is zero either because if it were then the trapezoidal and simpson approximation would be exactly equal, so where did I go wrong?
 

Similar threads

Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K