views:

757

answers:

5

Is there a science/math related C/C++ programming library that includes functions for mathematical integration? This might be useful for finding values for a cumulative distribution function, etc. Symbolic manipulation ideal but not required. Thanks!

P.S. I've looked at GSL but it does not contain functions specific for integration.

+3  A: 

But GSL does have numerical integration capabilities ...is there some other reason this library doesn't meet your needs?

For symbolic math, Mathematica is a popular choice. They support a C API .

Jim Lewis
A: 

Regarding the numerical integration, you can also look at some commercial package, for exmaple, NAG

fairstar
A: 

Wikipedia has lists and comparisons of numerical analysis software (many of which will do numerical integration, and some of which are C/C++ libraries or have an appropriate API), and comparisons of computer algebra software.

Richie Cotton
+1  A: 

You can find cumulative distribution functions using integration, but there are direct methods that far more efficient and more accurate. For example, there is a library, DCDFLIB, for computing CDFs. It's available in C and Fortran here and in managed C++ here.

John D. Cook
+1  A: 

As suggested by John, if you want the Cumulative Distribution Function of a standard function, using a specific solution would be a better approach. He pointed out DCDFLIB. GSL has a very large number of specific CDFs, hidden in Chapter 19, "Random Number Distributions".

To do numerically evaluate the CDF of a unusual function, there are several choices in GSL, e.g., gsl_integration_qag for an integral from a to b, or gsl_integration_qagiu, which does semi-infinite integrals from a to +infinity.

M. S. B.