tags:

views:

131

answers:

4

Hello!

I need to develop a program in Java to solve some integrals. Integrals like this:

alt text

I've looked for some functions to do this, in java.Math but I didn't find anything.

Has anyone an idea to get a solution for this? (maybe some extra libraries or something like that)

Thanks a lot!!

+8  A: 

Check this out: http://en.wikipedia.org/wiki/Numerical_integration#Methods_for_one-dimensional_integrals

You should have no problem implementing the "trapezoidal" or "rectangle" rule.

adamse
+2  A: 

Check out Simpson's Rule on Wikipedia.

Will A
Thanks for your answer!!!
dafero
+2  A: 

Take a look at JScience

renick
+7  A: 

The Apache Commons Math library contains, in the Numerical Analysis section, four different numerical integrators:

  • Romberg's method
  • Simpson's method
  • trapezoid method
  • Legendre-Gauss method
Greg Hewgill