Simpson's Rule with negative values

  • Context: Undergrad 
  • Thread starter Thread starter amanno
  • Start date Start date
  • Tags Tags
    Negative
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
amanno
Messages
22
Reaction score
0
Hey guys,

Not claiming to be an expert on numerical methods here but I am doing some digital integration using simpson's rule that takes 10 samples a second to provide me with the "approximate" integral for that time period.

Right now I am currently taking the magnitude of the value I receive (before integrating it), it is possible that for some of my samples, within the 1 second time period, could be negative. What does this do to the result of simpsons rule? Will it still provide accurate results or is the error greater?

Thanks!
 
Physics news on Phys.org
Whether or not there are negative function values does not change the accuracy of Simpson's. You can, in fact, add a fixed number to each value- adding that number times the length of the interval to the integral but not changing the accuracy.