# Limits and Infinite Integration by Parts

It is well known that $$\int \frac{\sin(x)}{x} \,dx$$ cannot be expressed in terms of elementary functions. However, if we repeatedly use integration by parts, we seem to be able to at least approximate the integral through the formula $$\int f(x) \,dx \approx \sum_{n=1}^a \frac{(-1)^{n-1}\cdot f^{(n-1)}(x)\cdot x^n}{n!}$$ where $$a \in \mathbb{N}$$. When plugging this in to a graphing calculator, it converges, but very slowly. It also tends to converge more quickly for functions that tend to $$0$$ as $$x \to \infty$$. My guess is that $$\int f(x) \,dx = \lim_{a\to\infty}\sum_{n=1}^a \frac{(-1)^{n-1}\cdot f^{(n-1)}(x)\cdot x^n}{n!}$$ at least on a certain interval, but I am uncertain where to look to learn more about these series. Any ideas? Thanks!

You've essentially rediscovered Taylor series. Let $$G(x)$$ be an antiderivative of $$f(x)$$, so $$f^{(k)}(x) = G^{(k+1)}(x)$$ for $$k \ge 0$$. If $$G$$ is analytic in a neighbourhood of $$0$$, and $$x$$ is in that neighbourhood,
$$G(0) = \sum_{k=0}^\infty G^{(k)}(x) \frac{(-x)^k}{k!} = G(x) + \sum_{k=1}^\infty f^{(k-1)}(x) \frac{(-x)^k}{k!}$$
i.e. $$\int_0^x f(t)\; dt = G(x)- G(0) = \sum_{k=1}^\infty f^{(k-1)}(x) \frac{(-1)^{k-1} x^k}{k!}$$