views:

166

answers:

5

What I need is: plots creation, stuff for interpolation, stuff for counting such things as

alt text

and

alt text

where L(x) is an interpolation built from some data (points) generated from original known function f(x). meaning we know original function. we have a range (-a, a) - known. We need library to help us calculate data points in range. we need to calculate L(x) a polinom using that data in that range.

I need this library to be free and opensource

+1  A: 

What about using Mathematica?

Giorgi
It is not free or open source. It is awesome, but that wasn't one of the requirements.
GregS
An open source and free library was explicitly asked for.
Edgar Sánchez
It's also not C#. Octave is free, open source, and awesome (it's a MatLab clone) and would do everything requested, but it still is not C#.
Ben Voigt
+2  A: 

Check this other answer http://stackoverflow.com/questions/1387430/recommended-math-library-for-c-net, in particular several people think that MathDotNet is nice.

Edgar Sánchez
+3  A: 

Perhaps Math.NET can help you.

duffymo
Math.NET doesn't provide anything to compute integrals numerically.
Alexandre C.
Found this in the docs: "numerical function integration (quadrature) routines" - quadrature is a form of numerical integration. Maybe you should read up on it.
duffymo
@duffymo: I read http://www.mathdotnet.com/doc/IridiumFeatures.ashx and didn't find quadrature methods inside. Perhaps I should reconsider Math.NET if it provides enough stuff not documented there.
Alexandre C.
@Alexandre C. - I didn't look in the code itself or exercise their capabilities. I'm going on published docs, so if it's vaporware I wouldn't know it. I think it deserves a deeper dive.
duffymo
+1  A: 

Math.NET and ILNumerics.Net are both open source and will both solve your equations.

Larry Smithmier
A: 

For plot creation, you may want excel interop (why not ?), or ILNumerics.NET.

But I don't understand the other requirements. You want to measure interpolation errors (in the max and L1 norm) from a function you don't know ? This is not a programming question, it is a math question.

I suggest you look at interpolation libraries (Math.NET contains one for instance, but many others also do) and see if they provide such things as "error estimation".

Otherwise, what you need is a math book which will explain you the assumptions on f that you need to estimate the interpolation error. It depends on what you know about the regularity of f and the interpolation method.

Edit, regarding additional information provided: There are closed form formulas for interpolation errors (here as a starting point). But any numerical integration routine (which Math.NET does not provide) will get what you want. Have a look at libraries other people pointed out, this link will get you started.

Since you seem to have regular functions (since you do polynomial interpolation), I'd go with simple Romberg integration, which is quite simple to implement in case you don't find a library that suits your need (I doubt it). Have a look at Numerical Recipes, 3rd edition for sample code.

Alexandre C.
added information.
Kabumbus
@Kabumbus: Edited.
Alexandre C.