Trapezoid & Simpson's Rule with their respective errors.

In summary, the conversation discusses a problem from the first chapter of a Calculus 2 summer course, specifically finding the integral of (5/x)dx from 1 to e with n=4, 8 using the Trapezoid rule and Simpson's rule. The person knows how to do both rules but is not getting the correct values. They provide their values and ask for help in finding where they went wrong. They also ask about the +/- at the end of each problem and how to input the problem into a calculator. The conversation ends with the person figuring out their mistake and thanking everyone for their help.
  • #1
Jboeding
9
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
  • #2
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.
 
  • #3
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
 

1. What is a trapezoid rule and how is it used in science?

The trapezoid rule is a numerical integration technique used to approximate the area under a curve. It involves dividing the area into trapezoids and calculating the sum of their areas to estimate the total area. In science, it is commonly used to calculate the areas of irregular shapes or to approximate the value of integrals.

2. How is Simpson's rule different from the trapezoid rule?

Simpson's rule is also a numerical integration technique, but it involves approximating the area under a curve using parabolic curves instead of trapezoids. It provides a more accurate estimation than the trapezoid rule, as it considers the curvature of the curve. It is also more complex and requires more calculations.

3. What is the error associated with the trapezoid rule?

The trapezoid rule has a maximum error that is proportional to the width of the intervals used in the calculation. The error decreases as the number of intervals increases. It is also affected by the curvature of the curve, with a larger curvature resulting in a higher error.

4. How is the error calculated for Simpson's rule?

The error for Simpson's rule is calculated using the fourth derivative of the function being integrated. It is proportional to the width of the intervals cubed and decreases as the number of intervals increases. The error is also affected by the curvature of the curve, with a larger curvature resulting in a lower error.

5. Which rule should I use for more accurate results?

In general, Simpson's rule provides a more accurate estimation of the area under a curve than the trapezoid rule. However, the choice of rule depends on the complexity of the function and the required level of accuracy. It is recommended to use Simpson's rule for smoother curves with low to moderate curvature, while the trapezoid rule may be more suitable for highly curved or irregular curves.

Similar threads

Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Replies
8
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
Replies
14
Views
1K
  • Calculus
Replies
3
Views
1K
Replies
2
Views
1K
Replies
6
Views
2K
Replies
2
Views
1K
Replies
6
Views
1K
Back
Top