56
$\begingroup$

A while back, I was explaining to a friend a method to compute the indefinite integral of $\ln(x)$, by taking $\int \ln(x) \, dx$ and setting $u = \ln(x), du = \frac{1}{x} \, dx, dv = 1 \, dx, v = x$, then proceeding with integration by parts. However, I was wondering if this method could be generalized for any infinitely differentiable function $f(x)$, so I attempted the same method. Below is what I computed:

$\int f(x) \, dx$, so let $u = f(x), du = f'(x)\,dx, dv = 1\, dx, v = x \implies$

$x f(x) - \int x f'(x) \, dx$, so let $u = f'(x), du = f''(x) \, dx, dv = x \, dx, v = \frac{x^2}2 \implies$

$xf(x) - \frac{x^2} 2 f'(x) + \int \frac{x^2}2 f''(x) \, dx$, so let $u = f''(x), du = f'''(x) \, dx, dv = \frac{x^2} 2 \, dx, v = \frac{x^3} 6 \ldots$

This eventually yields $$\int f(x) \, dx= \sum_{n=1}^\infty \frac{x^n}{n!} (-1)^{n - 1} f^{(n-1)}(x),$$ where $f^{(n-1)}(x)$ represents the $(n-1)$-th derivative of $f(x)$ . At first glance, while this looks like a Taylor expansion, it is actually quite different. Firstly, the general Taylor expansion does not contain the $(-1)^{n-1}$ term that this sum does. Secondly, Taylor expansions are centered around some point, while this sum is not. Finally, and perhaps most notably, in a Taylor expansion, the derivatives are evaluated at a specific point, while in this expansion, they are left as functions. My questions, then, are the following:

  1. Is this something new, or has it been documented before? (I've spent a lot of time looking to see if I could find something similar, and so far this has yielded nothing. But, if it has been done, I'd love to read more about it)

  2. If this is novel (or even if it is not), what are some of the interesting consequences of this expression?

I really do appreciate all of your input and advice. I realize this is a little open ended, but it's been nagging at me for quite some while, and I'd love a second look. Thanks!

EDIT: As Alex Kruckman pointed out in the comments, the claim 'this eventually yields' leads to a loss of precision, specifically as it pertains to the $+C$ term in an indefinite integral. After spending some time thinking about this, I noted several remedies to this issue:

  1. Rather than express the integral as an infinite sum, we can represent it as a finite sum added to an 'error' term of sorts. In other words, we can say:

$$\int f(x)\, dx = \sum_{n=1}^k\left[\frac{x^n}{n!} (-1)^{n - 1} f^{(n-1)}(x)\right] + \int \frac{x^k}{k!}(-1)^{k}f^{(k)}(x) \, dx$$

  1. Interestingly, when considering the infinite sum, we note that every term has a polynomial component of at least degree one. This implies that if $x = 0$, the sum should evaluate to $0$ as well. Therefore, setting $G(x) = \int_{a}^{x} f(t) \, dt = F(x) - F(a)$, we see that as $G(0) = 0$, $F(0) - F(a) = 0,$ which implies $a = 0$. In other words, to make my original claim more precise, we can use the definite integral:

$$\int_{0}^{x} f(t) \, dt= \sum_{n=1}^\infty \frac{x^n}{n!} (-1)^{n - 1} f^{(n-1)}(x)$$

I believe these two edits help to eliminate the problem with the $+C$ term.

EDIT 2: I've tried a couple common functions to see how they interact with the formula. Considering $f(x) = e^x$, we have:

$$\begin{aligned}\int e^x \, dx&= \sum_{n=1}^\infty\frac{x^n}{n!} (-1)^{n - 1}e^x\\e^x + C &= e^x\cdot\sum_{n=1}^\infty\frac{x^n}{n!} (-1)^{n - 1}\\&= e^x\cdot(1 - e^{-x})=e^x-1\end{aligned}$$

This implies $C = -1$, a result consistent with the first edit, where we integrate from $0$ to $x$.

Similarly, considering $f(x) = e^{-x}$, we have:

$$\begin{aligned}\int e^{-x} \, dx= \sum_{n=1}^\infty \frac{x^n}{n!} (-1)^{n - 1} e^{-x} * (-1)^{(n-1)} = \sum_{n=1}^\infty \frac{x^n}{n!} * e^{-x}\\-e^{-x} + C = e^{-x} * \sum_{n=1}^\infty \frac{x^n}{n!} = e^{-x} * (e^x - 1) = 1 - e^{-x}\end{aligned}$$

This implies $C = 1$, which we would again get if we integrated from $0$ to $x$.

Now, I decided to consider $f(x) =\ln(x)$, a decidedly harder function to analyze in this respect, which also is not defined at 0. Here, we have:

$$\begin{aligned}\int\ln(x) \, dx&=\sum_{n=1}^\infty\frac{x^n}{n!}(-1)^{n - 1}\frac{d^{(n-1)}}{dx^{(n-1)}}\ln(x)\\x\cdot\ln(x)-x+C&=x\cdot\ln(x)+\sum_{n=2}^\infty\frac{x^n}{n!} (-1)^{n - 1} \frac{d^{(n-1)}}{dx^{(n-1)}}\ln(x)\\&=x\cdot\ln(x)-x+C&=x\cdot\ln(x)+\sum_{n=2}^\infty\frac{x^n}{n!} (-1)^{n - 1} \frac{(n-2)!}{x^{n-1}}\cdot(-1)^n\\x\cdot\ln(x)-x+C&=x\cdot\ln(x)-\sum_{n=2}^\infty\frac{x}{n(n-1)}\\&=x\cdot\ln(x)-x\end{aligned}$$

Interestingly, here, we see that $C = 0$. While $ln(x)$ is not defined at $0$, this intuitively still makes some sense, as we note $\lim\limits_{x\to0} (x\cdot\ln(x) - x) = 0$.

$\endgroup$
13
  • 10
    $\begingroup$ Awesome question, thanks for asking it. +1 $\endgroup$
    – user223391
    Commented Feb 13, 2017 at 2:16
  • 2
    $\begingroup$ Your way of using the arrow $\Longrightarrow$ is frequently seen among undergraduates in lower-level math courses. But in correct usage $A\implies B$ should mean "If $A$ then $B$" or "From $A$ we logically deduce $B$". The two propositions $A$ and $B$ should in fact be propositions i.e. things that can be true or false. $\endgroup$ Commented Feb 13, 2017 at 2:21
  • 3
    $\begingroup$ @Petru Not quite. Notice that the other terms depend on $n$ too. $\endgroup$ Commented Feb 13, 2017 at 2:33
  • 5
    $\begingroup$ You forgot a $+C$. More seriously, just because you can rewrite an expression as a longer and longer sum, it's not necessarily the case that the expression is equal to the resulting infinite sum. As a silly example, $n = -1 + (n+1)$ for all $n$, so $1 = -1 + 2 = -1 + -1 + 3 = -1 + -1 + -1 + 4$ etc. But $1 \neq -1 + -1 + -1 + \dots$. $\endgroup$ Commented Feb 13, 2017 at 2:34
  • 1
    $\begingroup$ @cool.coolcoolcool The $+C$ comment was meant to get you thinking about how much to trust the supposed identity in the question. In particular, the right hand side is a function of $x$, while the left hand side is an indefinite integral, which represents a family of functions of $x$ (all of which differ by a constant "$+C$", if $f$ is continuous). The usual integration by parts formula has an indefinite integral on both sides, so both sides are families of functions. But when you make the dubious move of writing "this eventually yields", you lose the integral and the $+C$. $\endgroup$ Commented Feb 13, 2017 at 3:07

2 Answers 2

34
+50
$\begingroup$

This is a restatement of the proof of Taylor's theorem using integration by parts. We have $$g(x)=g(a)+(x-a)g'(a)+\dots+ \frac{(x-a)^{n}}{n!}g^{(n)}(a)+\frac{1}{n!}\int_{a}^{x}g^{(n+1)} (t) (x-t) ^{n}\,dt\tag{1}$$ Now we put $g(x) = \int_{a}^{x} f(t) \, dt$ to get $$\int_{a} ^{x} f(t) \, dt=(x-a)f(a)+\dots+\frac{(x-a)^{n}}{n!}f^{(n-1)}(a)+\frac{1}{n!}\int_{a}^{x}f^{(n)}(t)(x-t)^{n}\,dt\tag{2}$$ Putting $x=0$ in the above equation we get your formula with $a$ in place of $x$.

It is no wonder that you used integration by parts to arrive at your formula because the equation $(1)$ above is also obtained via integration by parts and is presented in a routine manner in many textbooks and also on Wikipedia. But since you arrived at this sincerely by your own efforts hats off to you! +1 for your question.

$\endgroup$
5
$\begingroup$

Proof and Some Intuition


The OP claims that $$\int_{0}^{x} f(t) \, dt= \sum_{n=1}^\infty \frac{x^n}{n!} (-1)^{n - 1} f^{(n-1)}(x)$$ We can rewrite the RHS to get

$$\int_{0}^{x} f(t) \, dt=\sum_{n=0}^\infty \frac{x^{n+1}}{n!} (-1)^n f^{(n)}(x)$$ Differentiating both sides and assuming $f(0)=0$ we get $$f(x)=\sum_{n=0}^\infty\frac{(-1)^n x^n \left[x f^{(n + 1)}(x) + (n + 1) f^{(n)}(x)\right]}{(n + 1)!}$$ $$f(x)=\sum_{n=1}^\infty\frac{(-1)^{n-1} x^nf^{(n)}(x)}{n!}+\sum_{n=0}^\infty\frac{(-1)^n x^n f^{(n)}(x)}{n!}$$


Edit:

@MattWatkins pointed out that the partial sums cancel out. Now that I see this, it is obvious; notice that the series are the same but with flipped sign except for the first term of the second series, which never gets canceled. We thus see that our series will telescope, and what we are left with is $$f(x) = \frac{(-1)^0 x^0 f^{(0)}(x)}{0!} = f(x)$$ which proves the OP's result and provides a bit of the motivation for the series. I would still be interested in seeing if this could be applied though.


Edit 2

We can look at the OP's series and turn it into some sort of Taylor Series $$\sum_{n=1}^\infty \frac{x^n}{n!} (-1)^{n - 1} f^{(n-1)}(x)$$ $$= -\sum_{n=1}^\infty \frac{(0-x)^n}{n!} f^{(n-1)}(x)$$ $$= -\sum_{n=0}^\infty \frac{(0-x)^{n+1}}{(n+1)!} f^{n}(x)$$ Notice that this immediately looks like the integral of a Taylor Series, providing further motivation and hinting that there is an intuitive justification for the OP's series.

$\endgroup$
4
  • 1
    $\begingroup$ Just an observation from some partial sums... This leads to $$0=xf'(x)-\frac{x^2}{2}f''(x)-xf'(x)+\frac{x^3}{6}f^{(3)}(x)+\frac{x^2}{2}f''(x)-\frac{x^4}{24}f^{(4)}(x)-\frac{x^3}{6}f^{(3)}(x)+\cdots$$, and so sort of trivially $f(x)=f(x).$ $\endgroup$
    – MattW
    Commented Feb 14, 2017 at 2:21
  • $\begingroup$ @MattWatkins Ah, telescoping. I see what you are saying. I don't get how I missed that. I will add it into the post if you don't mind. $\endgroup$ Commented Feb 14, 2017 at 2:26
  • $\begingroup$ @BrevanEllefsen interesting point in edit 2! Subbing in $-x$ makes it resemble a Taylor series a lot (except for the fact that we have $f^n{x}$ instead of $f^n{a}$) $\endgroup$ Commented Feb 14, 2017 at 3:47
  • 2
    $\begingroup$ I appear to have been downvoted a minute ago. Would this person mind explaining the cause for the downvote? $\endgroup$ Commented Feb 21, 2017 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .