Simpson's Rule question, which I hate

  • Thread starter Hootenanny
  • Start date
In summary, the conversation discusses using Simpson's rule with five ordinates to approximate the integral of cos[e^(1/2x)] from 0 to 4. The figures for y0-y4 are provided and plugged into the formula for Simpson's rule. The resulting approximation is compared to the answer in the textbook, with a minor discrepancy due to a calculation error. The conversation ends with a clarification on the formula used.
  • #1
Hootenanny
Staff Emeritus
Science Advisor
Gold Member
9,623
9
The question is use simpson's rule with five ordinates to find an approximation for
[tex] \int_{0}^{4} cos \left[ e^{\frac{1}{2} x} \right] dx [/tex]
Here are my figures (working in radians)
[tex] y_0 = 0.540302305 [/tex]
[tex] y_1 = -0.077846103 [/tex]
[tex] y_2 = -0.911733914 [/tex]
[tex] y_3 = -0.228658946 [/tex]
[tex] y_4 = 0.448356241 [/tex]
Plugging these into the formula for Simpson's rule gives:
[tex] \int_{0}^{4} cos \left[ e^{\frac{1}{2} x} \right] dx \approx \frac{1}{3} \left[ (0.540302305 + 0.448356241) + 4(-0.077846103 -0.228658946) + 2(0.448356241 -0.911733914) \right] [/tex]
This gives - 0.388... when the answer in the textbook is -0.6869. I know its a lot of number crunching but any help would be appreciated.
 
Physics news on Phys.org
  • #2
I don't really know what you are doing there..

if you just go

1/3 (y0 + 4y1 + 2y2 + 4y3 + y4) it works properly
 
  • #3
I was using the formula we have been given, you've just expanded the brackets. I've obviously just punched the numbers into my calculator wrong. Thank's.
 

1. What is Simpson's Rule?

Simpson's Rule is a numerical method for approximating the area under a curve. It is named after the mathematician Thomas Simpson.

2. How does Simpson's Rule work?

Simpson's Rule works by dividing the area under a curve into a series of smaller trapezoids and using their combined area to approximate the integral. It is a more accurate method than other numerical integration techniques, such as the trapezoidal rule or midpoint rule.

3. When is Simpson's Rule used?

Simpson's Rule is commonly used in calculus and other areas of mathematics to approximate integrals when an exact solution is not feasible. It is also used in physics and engineering to calculate areas, volumes, and other quantities that involve integration.

4. What are the limitations of Simpson's Rule?

Simpson's Rule is most accurate for functions that are smooth and continuous. It may not give accurate results for functions with sharp corners or discontinuities. Additionally, it may not work well for functions with a high degree of oscillation.

5. Can Simpson's Rule be used for any type of curve?

No, Simpson's Rule is only applicable for curves that can be represented by a mathematical function. It cannot be used for irregular or non-mathematical shapes. In these cases, other methods, such as Monte Carlo integration, may be more suitable.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
277
  • Calculus and Beyond Homework Help
Replies
5
Views
289
  • Calculus and Beyond Homework Help
Replies
16
Views
564
  • Calculus and Beyond Homework Help
Replies
5
Views
684
  • Calculus and Beyond Homework Help
Replies
2
Views
544
  • Calculus and Beyond Homework Help
Replies
1
Views
216
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
620
  • Calculus and Beyond Homework Help
Replies
10
Views
368
Back
Top