title: Calculate exact area under curve in Java
body: <p>Are there any methods which do that? I have an application where I need the area under the curve, and I am given the formula, so if I can do the integration on hand, I should be able to do it programatically? I can't find the name of the method I'm referring to, but this image demonstrates it: <a href="http://www.mathwords.com/a/a_assets/area%20under%20curve%20ex1work.gif" rel="noreferrer">http://www.mathwords.com/a/a_assets/area%20under%20curve%20ex1work.gif</a></p>
  
  <p>Edit: to everyone replying, I have already implemented rectangular, trapezoidal and Simpson's rule. However, they take like 10k+ stripes to be accurate, and should I not be able to find programatically the integrated version of a function? If not, there must be a bloody good reason for that.</p>