1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How can Simpson's Rule have a large margin of error?

  1. Feb 25, 2010 #1
    [tex]\int tan(x)dx [/tex]

    with the limits of 0 to 1.55, with n=10. Using Simpson's Rule, my answer was 4.923651704. But I don't understand why Simpson's Rule varies from my calculator's answer (TI-84 Plus) which is 3.873050987. I thought the higher N with Simpson's Rule would make your answer even more accurate?
     
  2. jcsd
  3. Feb 25, 2010 #2
    The calculator seems to give you the exact answer, which is -Log[Cos(1.55)]. When you do numerical integration, you have to be careful when you are close to singularities. In this case 1.55 is close to pi/2 where tan diverges.
     
  4. Feb 25, 2010 #3
    Yes, I understand that tan(pi/2) diverges but I still am having a little trouble as to why that Simpson's Rule over-estimates the actual answer.
     
  5. Feb 25, 2010 #4
    I guess you have to do a detailed investigation of the error term in Simpson's rule, study how it behaves near an 1/x -like singularity.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook