The first differences, (differences between consecutive terms of a single function $f(x)$) can easily be computed for any function $f(x)$ in polynomial form by simplifying $f(x)-f(x-1)$.
For any given function $g(x)$, is there a known way to find a function $f(x)$ such that $f(x)-f(x-1) = g(x)$ evaluated at the same term $x$?
For instance, $f(x)=x^2+x+1$, and $(x^2+x+1)-((x-1)^2+(x-1)^2+1) = 2x$
Suppose we started the function, $g(x)=2x$ and wanted to find $f(x)$ such that $f(x)-f(x-1) = g(x)$? Someone please explain the theory, if any on this. Thanks.