PHP Classes

Bad method

Recommend this page to a friend!

      integral_diagram  >  All threads  >  Bad method  >  (Un) Subscribe thread alerts  
Subject:Bad method
Summary:Only got one thing to say...
Author:Sebastien Renauld
Date:2006-10-19 18:26:42


  1. Bad method   Reply   Report abuse  
Picture of Sebastien Renauld Sebastien Renauld - 2006-10-19 18:26:42
...anyone could prove that this code spews nonsense if you give it a function that isn't defined on the interval. Try log(x) on [0;1] and enjoy the calculation. It cannot be calculated, because it's infinite...The script will give you a rubbish value.
Even better, try x/sin(x) on -pi;pi. It'll give you something, but the integral cannot be calculated.

The ONLY true way to calculate the area is to find a primitive, and use the range formulas.