Use Numerical data to find the integrand function

79 Views Asked by At

Can someone use some numerical data, from numerical differentiation, to find the "original" function without any fitting methods?

For example, there is a function $f(x)=x^2$ for $x\in[0,2]$, taking finite difference with $$f'(x_)=\frac{f(x+h)-f(x-h)}{2h}$$ then

$$ h\equiv 0.1;\ x_0=0, x_1=0.1,\cdots,x_{20}=2$$ and $$ f'(x_n)=\frac{(0.1(n+1))^2)-(0.1(n-1))^2}{2\cdot 0.1}, n=0,1,\cdots,20.$$

We obtain

$$ \begin{array}{c|c} x_n & f'(x_n)\\ \hline 0 & 0\\ 1 & 0.2\\ \vdots & \vdots\\ 20 & 4\\ \end{array}.$$

Now, how can we apply this table above, just only values, to find the "unknown (or original)" function $f(x)=x^2, x\in[0,2]$ without fitting techniques?

3

There are 3 best solutions below

2
On BEST ANSWER

Certainly not. A function can be defined to take on any value outside of the discrete points you've been able to reconstruct. You'd need additional information about the function such as it's continuity and membership in a certain class of functions a priori if you wish to reconstruct it.

0
On

It is well-known that from any set of value pairs $(x,y)$ you can construct an interpolating polynomial, by the Lagrangian formula. And finding its antiderivative is no big deal.

But if you consider this to be a "fitting", then there is little left that you can do.


Note that there is no magical recipe to find a closed-form expression matching given data, better than trial an error.

0
On

Even in exact arithmetic, there is no way to recover $f$ from its derivative $f'$, unless you know at least one value of $f$, say, $y_0 = f(x_0)$. Then you can recover $f$ from the relation $$f(x) = f(x_0) + \int_{x_0}^x f'(t) dt.$$

You can apply, say, the trapezoidal rule to the problem of evaluation the integral. In your case, the approximation $$g_h(t) = \frac{f(t+h) - f(x-h)}{2h}$$ of $f'(t)$ is exact and returns $g_h(t) = 2t$. In general, the trapzoidal rule is exact if the integrand is linear. It follows, that you can recover $f(x)=x^2$ exactly, provided that you are allowed to use, say, $f(0) = 0$.

Keep in mind that this reasoning completely ignores any rounding errors.

In general, neither the space central approximation of the derivative nor the trapezoidal rule are exact and you will not be able to recover $f$ exactly from the approximation of its derivative. There will be an error. Estimating that error is a subject for another question.