Consider the following differential equation
f(x) = g'(x)
I have a build a code that spits out values of the function f(x)
for the variable x
, where x
goes from 0
to very large
.
Now, I'm looking for a scheme that will analyse these values of f(x)
in order to determine g(x)
. Does anybody have any suggestions? The main problem is that if I would calculate g(x) = Integral (f(x) * dx)
, then I'll end up with just a number (i.e. the area under the graph), but I need to know the actual function of g(x)
.
I've cross-posted this question here: https://math.stackexchange.com/questions/1326854/looking-for-a-particular-algorithm-for-numerical-integration
numerical integration always return just a number
Polynomial approach
f(x)
f(x)
for any givenx
algebraic integration
f(x)
because we do not know how to integrate everything[edit1] As the function
f(x)
is just a table in formdouble f[][2]={ x1,f(x1),x2,f(x2),...xn,f(xn) };
g(x)=Integral(f(x))
at interval<0,x>
so:
this is just a table so if you want actual function you need to convert this to polynomial via L'Grange or any other interpolation...