Integration and differentiation of an approximation to a function - order of approximation For my research I am working with approximations to functions which I then integrate or differentiate and I am wondering how this affects the order of approximation.
Consider as a minimal example the case of $e^x$ for which integration and differentiation doesn't change anything. Now if I would approximate this function with a second order taylor series I get:
$$e^x\approx 1+x+\frac{x^2}{2}+O(x^3) \tag{1}$$
If I were to integrate this function I get:
$$ \int 1+x+\frac{x^2}{2}+O(x^3) dx = C+x+\frac{x^2}{2}+\frac{x^3}{6}+O(x^{?4?}) \tag{2}$$
I wrote $O^{?4?}$ because that is what my question is about: do I indeed get a higher order approximation when I do this integration or is it appropriate to cut-off the solution to the integral at $O(x^3)$, thus removing the $\frac{x^3}{6}$ term?
And what about differentiation? In that case I seem to lose an order of accuracy, is that indeed the case?

This is indeed a very interesting question about the use of truncated series for integration and differentiation.
Taking you example of $e^x$, if we write $$f(x) =1+x+\frac{x^2}{2}+O\left(x^3\right)$$ from a formal point of view (at least, in my opinion), the derivative should write $$f'(x) =1+x+O\left(x^2\right)$$ and the antiderivative should write $$\int f(x) dx=C+x+\frac{x^2}{2}+\frac{x^3}{6}+O\left(x^4\right)$$
