Trapezoid & Simpson's Rule with their respective errors.

  • Context: MHB 
  • Thread starter Thread starter Jboeding
  • Start date Start date
  • Tags Tags
    Errors Trapezoid
Click For Summary
SUMMARY

The discussion focuses on calculating the integral of (5/x)dx from 1 to e using the Trapezoid and Simpson's rules with n=4 and n=8. Jacob initially miscalculated the Trapezoid rule, obtaining a value of 5.46027 instead of the correct approximation of 5.065195. The errors associated with the approximations were identified as T(Error) = 0.016535 and S(Error) = 0.000315. Jacob resolved his confusion by breaking down the calculations into smaller parts and increasing the precision of his floating-point numbers.

PREREQUISITES
  • Understanding of integral calculus, specifically Riemann sums
  • Familiarity with the Trapezoid rule and Simpson's rule
  • Proficiency in using a TI-89 calculator for numerical integration
  • Knowledge of error analysis in numerical methods
NEXT STEPS
  • Learn how to implement the Trapezoid rule in Python using NumPy
  • Study the derivation and application of Simpson's rule in numerical integration
  • Explore error estimation techniques for numerical integration methods
  • Practice using the TI-89 calculator for various numerical integration problems
USEFUL FOR

Students in calculus courses, educators teaching numerical methods, and anyone interested in improving their skills in numerical integration techniques.

Jboeding
Messages
9
Reaction score
0
Hey Everyone,

I know I just posted yesterday, but I have another problem from the first chapter of my Calc 2 summer course that I would like to iron out.

Integral of (5/x)dx from 1 to e
with n=4, 8 finding both Trapezoid rule and Simpson's rule approximations, and their errors.

I know how to do both trapezoid rule and the Simpson's rule, but I never get the correct values for this problem, for an unknown reason.

So, from 1 to e, with n=4, I get these values:
∆x = (b-a)/n = (e-1)/4
Values: 1, ((e/4) + (3/4)), ((e/2) + (1/2)), ((3e/4) + (1/4)), e

Plug into the formula:
∆x[(1/2)f(x1) + f(x2) + f(x3) +... + (1/2)f(xn)]

I get: 5.46027, but the answer is different below.

What am I doing wrong?
What is with the +/- at the end of each problem (it is online work).
Is there a way to input this into your calculator for when the n values are up there? (I have a TI-89)

Answer:
Trapezoid(4) = 5.06195 +/- .000004 -OR- 5.065192 +/- .000004
Trapezoid(8) = 5.01635 +/- .000004 -OR- 5.016532 +/- .000004
Simpson's(8) = 5.00315 +/- .000004 -OR- 5.00312 +/- .000004
T(Error) = .016535
S(Error) = .000315

Thanks everyone,
- Jacob
 
Physics news on Phys.org
Jboeding said:
Plug into the formula:
∆x[(1/2)f(x1) + f(x2) + f(x3) +... + (1/2)f(xn)]

I get: 5.46027, but the answer is different below.
I get 5.065195. Perhaps you can post your values for $x_1,\dots,x_5$, $f(x_1),\dots,f(x_5)$ and $\Delta x$ so that we can check.

Jboeding said:
What is with the +/- at the end of each problem (it is online work).
I am not sure what you mean.
 
Evgeny.Makarov said:
I get 5.065195. Perhaps you can post your values for $x_1,\dots,x_5$, $f(x_1),\dots,f(x_5)$ and $\Delta x$ so that we can check.

I am not sure what you mean.

I got it now, thanks for your help.
I think I was just clumping them all together when I should've done it piece by piece. I also changed my float number to include more decimals.

- Jacob
 

Similar threads

Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K