View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
MrShorty MrShorty is offline
external usenet poster
 
Posts: 1
Default Calculating or estimating the area between to curves


Not sure I understand why Simpson's rule (or any other Riemann sum)
wouldn't converge to the correct answer in your case. It's been a
while since I took calculus, but it seems to me that it can be proven
that, for a "nice" continuous function, Riemann sums have to converge
to the correct answer in the limit as the number of subdivisions goes
to infinity. Perhaps your problem stems from not having enough data
points to accurately determine the curves, or perhaps you are using too
few intervals in your application of Simpson's rule.

Along the lines of "counting pixels," there's another method of
numerical integration that I think is referred to as "Monte Carlo"
integration. Basically, you bound the functions within a rectangle,
for which you can easily determine the area. Then select several
(thousand?) points at random from within that rectangle. Test each
point to see if it lies within the region of interest. You then end up
with a ratio of points within the region to the total number of points
selected [n(in)/n(tot)]. The area between the curves then is this
ratio multiplied by the area of the selected box. I have no practical
experience with this method, having always used Riemann sums or the
Fundamental Theorom to get the area between two curves. I can't say
for sure if it will be easier for you to implement than Riemann sums or
not, nor am I intimiately familiar with all of the possible pitfalls.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=571133