Integration by Parts Is Actually Goated | 08/21/2024

Integration by parts is not just a way of evaluating integrals explicitly, like $\int x \sin(x) dx$ or the occasional trick with $\int \ln(x) dx$. Let me introduce the newest Theorem, in the highest sense of the word, to your analysis toolbox.

Theorem: Integration by Parts $$ \int u dv = uv - \int v du$$

Deriving Taylor's formula

When Taylor's formula was introduced out of the blue in my second calculus course, alongside the unfamiliarity that came with series, it seemed like some blackbox that could only have been proven with obscure theorems. However, though I have become more and more familiar with the power of this theorem, now I know it can be proved using one of the first integration tools introduced: the Goated Integration by Parts Theorem. The following is the proof of Taylor's Theorem, Integral Remainder Version, that was given in my honors real analysis 2 course (Math 131BH).
Theorem: Taylor's Formula

Let $f \in C^n([a, x])$ for some $n \in \mathbb{N}$. Then $$f(x) = \sum_{k=0}^{n-1} \frac{f^{(k)}(a)}{k!} (x-a)^k + R_n(x)$$ where the remainder term is $$ R_n(x) = \int_a^x \frac{(x-t)^{n-1}}{(n-1)!} f^{(n)}(t) dt$$

Proof. By the Fundamental Theorem of Calculus and Goated Integration by Parts, we have $$ \begin{align*} f(x) &= f(a) + \int_a^x f'(t) dt \\ &= f(a) + \int_a^x f'(t) d(t + c) \\ &= f(a) + \left. f'(t)(t+c) \right|_a^x - \int_a^x (t+c) f''(t) dt\\ &= f(a) + f'(x)(x+c) - f'(a)(a+c) - \int_a^x (t+c) f''(t) dt\\ \end{align*} $$ where we cleverly noted that we can write $dt$ as $d(t+c)$ for any constant $c$. To simplify the equation, choose $c = -x$. Then we have $$ f(a) + f'(a)(x - a) + \int_a^x (x - t) f''(t) dt $$ This is the expression we want for $n = 2$. The rest of the proof, though notationally complicated, is induction facilitated by GIBP and a little bit of wrangling negative signs:

Assume inductively for $J < n$ that $$f(x) = \sum_{k=0}^{J-1} \frac{f^{(k)}(a)}{k!}(x-a)^k + \int_a^x \frac{(x-t)^{J-1}}{(J-1)!} f^{(J)}(t) dt$$ Applying GIBP to the integral, we have $$\begin{align*} f(x) - \sum_{k=0}^{J-1} \frac{f^{(k)}(a)}{k!}(x-a)^k &= (-1)^{J-1}\int_a^x f^{(J)}(t) d \left( \frac{(t-x)^J}{J!} \right) \\ &= (-1)^{J-1} f^{(J)}(t) \left. \frac{(t-x)^J}{J!} \right|_a^x - (-1)^{J-1} \int_a^x f^{(J+1)}(t) \frac{(t-x)^J}{J!} dt \\ &= \frac{f^{(J)}(t)}{J!} (x-a)^J + \int_a^x \frac{(x-t)^J}{J!} f^{(J+1)}(t) dt\\ &= \frac{f^{(J)}(t)}{J!} (x-a)^J + R_{J+1}(x) \end{align*} $$ So collapsing into the summation yields, as desired, $$ f(x) = \sum_{k=0}^{J} \frac{f^{(k)}(a)}{k!}(x-a)^k + R_{J+1}(x)$$

Approximating functions

In particular, showing that a special case of the Riemann-Lebesgue theorem$\text{\textemdash}$very important to Fourier analysis, one of my favorite branches of math$\text{\textemdash}$holds:

Problem

Let $f \in C_0(\mathbb{R})$ [continuous functions compactly supported in $\mathbb{R}$]. Show that $$ \lim_{n \to \infty} \int f(x) \sin(nx) dx = 0$$ Hint: Assume first that $f \in C_0^\infty(\mathbb{R})$.

When I got this for homework in Math 131BH, it was not an immediately obvious statement. Modulating a compactly supported function by a sine wave did not seem like it would make the integral zero, even if we can make it oscillate as fast as desired. But I knew it must be true, for it was a homework problem.

Proof. Assume that $f$ is infinitely differentiable$\text{\textemdash}$that is, we take a function that is epsilon-close to $f$ or less than that at all points, which exists by Stone-Weierstrass Theorem. (Note that we have satisfied the condition of being on a compact interval, say $[-R, R]$, since $f$ is compactly supported.) Then we apply the Goated Integration by Parts to it, and choose $f$ to be the part differentiated: $$ \begin{align*} \int f(x) \sin(nx) dx &= \int_{-R}^{R} f(x) \sin(nx) dx\\ &= \left. -\frac{1}{n} \cos(nx) f'(x) \right|_{-R}^{R}+ \frac{1}{n} \int_{-R}^{R} \cos(nx) f'(x) dx \\ &= \frac{1}{n} \int_{-R}^{R} \cos(nx) f'(x) dx \end{align*} $$ by cosine's evenness. We want this to go to zero with $n$. Though this quantity depends on $n$ inside the integral, cosine's value never exceeds $1$, so the magnitude of this integral is just a number no bigger than $$ \left| \frac{1}{n} \int_{-R}^{R} f'(x) dx \right| \leq \frac{1}{n} \int_{-R}^{R} \left| f'(x) \right| dx $$ And since $f'$ is continuous and thus integrable over $[-R, R]$, its maximum value is some constant $M < \infty$: $$ \frac{1}{n} \int_{-R}^{R} \left| f'(x) \right| dx \leq \frac{1}{n} \cdot 2R \cdot M$$ Thus, $\int f(x) \sin(nx) dx$ tends to $0$ as $n \to \infty$, just as desired!

However, this was not our real function but an impostor procured by the Stone-Weierstrass Theorem, epsilon-close. But intuitively, if we let $f_\epsilon$ denote our uniform approximation function to $f$, it makes sense that our smallness (in a sense) of $f_\epsilon$ would imply the smallness (in the same sense) for $f$ since the two are very close. To show this formally, we use the classic "add zero and apply the triangle inequality" trick: $$ \begin{align*} \left| \int f(x) \sin(nx) dx \right| &= \left| \int (f(x) - f_\epsilon(x)) \sin(nx) dx + \int f_\epsilon(x) \sin(nx) dx \right| \end{align*} $$ by linearity of integrals. By triangle inequality we bound this from above by $$\leq \int \left| f(x) - f_\epsilon(x) \right| dx + \left| \int f_\epsilon(x) \sin(nx) dx \right| $$ All that is left is unpacking these terms to show that they are arbitrarily small. Replacing the second term with our result above, $$ \leq \int \left| f(x) - f_\epsilon(x) \right| dx + \frac{1}{n} 2R M $$ So choosing epsilon to be $1/n$$\text{\textemdash}$and thus choosing different approximation functions$\text{\textemdash}$we can make this quantity as small as we want, bounding our integral from above: $$ \leq \int \left| f(x) - f_\frac{1}{n}(x) \right| dx + \frac{1}{n} 2RM \leq \frac{1}{n}2R + \frac{1}{n}2RM $$ which tends to $0$ as $n \to \infty$ as desired.

Reflection

Even though there were a lot of tricks involved, the trick that most surprised me when I was shown these proofs was knowing to apply integration by parts in the first place. The rest of the theorems were standard heavy analysis tools, like the Stone-Weierstrass Theorem$\text{\textemdash}$but the little ol' integration by parts formula? Why being shown this was shocking$\text{\textemdash}$which was eventually why I decided to write this up and share$\text{\textemdash}$was that this broke that implicit barrier between "Calculus 2 Things" and "Higher Theorems." It revealed that how I conceive the space of mathematical concepts can be highly misaligned with how it really is.

Fly home, Buddy! I work alone.