Author Topic: Simpson's Rule Problem - I don't have an f(x)!  (Read 909 times)

0 Members and 1 Guest are viewing this topic.

Offline Enigmatic Entity

  • Exemplar Essayer
  • 28
  • Amigo ad infinitum.
Simpson's Rule Problem - I don't have an f(x)!
I have some temperature measurements at 4 circular sections of a cylinder, and have to average them using Simpson's rule, this being a small bottleneck of a larger project at the moment...  :sigh:

The problem is that Simpson's rule seems to use "f(a)", "f(b)", "f(a+b)", etc. Except I have four data points, separated by an equal distance. How do I use Simpson's rule for this?  :confused:
Juvenescence and multifariousness is eternal.

 

Offline Kosh

  • A year behind what's funny
  • 210
Re: Simpson's Rule Problem - I don't have an f(x)!
"The reason for this is that the original Fortran got so convoluted and extensive (10's of millions of lines of code) that no-one can actually figure out how it works, there's a massive project going on to decode the original Fortran and write a more modern system, but until then, the UK communication network is actually relying heavily on 35 year old Fortran that nobody understands." - Flipside

Brain I/O error
Replace and press any key

 

Offline Klaustrophobia

  • 210
  • the REAL Nuke of HLP
    • North Carolina Tigers
Re: Simpson's Rule Problem - I don't have an f(x)!
if you have four data points, that means you have the function evaluated at those points, yes?  namely, you have f(a), f(b), f(c), f(d).  call the distance between them deltaX and you have f(b)=f(a+deltaX), etc.
I like to stare at the sun.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Simpson's Rule Problem - I don't have an f(x)!
You can do Simpson-type approximations for any number of points. A 4-point formula is given here down the page.