# What is integration by parts, really?

Integration by parts comes up a lot - for instance, it appears in the definition of a weak derivative / distributional derivative, or as a tool that one can use to turn information about higher derivatives of a function into information about an integral of that function. Concrete examples of this latter category include: proving that $f \in C^2(S^1)$ implies that the Fourier series of $f$ converges absolutely and uniformly, and the Taylor series expansion with the integral formula for remainder.

However, I don't feel like I really understand what integration by parts is really doing. To me, it is just an algebraic trick that follows from the fundamental theorem of calculus and the product rule. Is there some more conceptual way to think about it?

-
It is the product rule. –  Jp McCarthy Jun 9 '14 at 7:13
And integral substitution corresponds to differentiation's chain rule. Same idea. –  mvw Jun 9 '14 at 13:26

I've always found it helpful to think about it like this: (picture source)

The area of the gray areas combined is $u_2v_2 - u_1 v_1$, which is where the $uv$ term comes from.

-
This is very nice explanation ! Thanks. –  Claude Leibovici Jun 9 '14 at 7:12
I am new to the math SE. What software/tool did you use to make this (beautiful) plot+captions? –  boardbite Jun 9 '14 at 22:52
I saw something like this in my high school calc textbook, but I found this one through Google. If I were to make one like this, I'd probably use a vector graphics tool like Inkscape. –  Henry Swanson Jun 9 '14 at 23:24
@boardbite - the linked blog shows the entire python source of that plot. –  Bach Jun 10 '14 at 9:08
$\LARGE{+1}$ for SWAN –  Stahl Jun 30 '14 at 2:32

Integration by parts is a corollary of the product rule:

$(uv)' = uv' + u'v$

Take the integral of both sides to get $uv = \int u \ dv + \int v \ du$.

If you were supposed to remember it separately from the product rule then it's not as easy to work with as you have to make guesses as to what to assign $u$ and what to assign $dv$ (usually $dv = f(t) dt$). But if you have knowledge of product rule then you take the integrand (in terms of $t$) call it $F(t)$ and use the product rule on it first. Then your choices of $u, dv$ are readily obvious.

-
More precisely, $uv = \int u\ dv + \int v\ du\ \mathbf{+\ C}$. Otherwise, you run into trouble. –  200_success Jun 9 '14 at 18:53
This is the crapiest answer I've ever made and it nets me 160 points. Wtf... Just a consequence of the number of views I guess. –  Enjoys Math Jun 11 '14 at 6:43
Welcome to economics 101. Society's utility from your answer is a function of the demand as well as the quality. ;-) –  Jørgen Fogh Jun 11 '14 at 8:23
@EnjoysMath Haha - I guess it answered somebody's question, if not mine. Just as good. :-) –  AreaMan Jun 11 '14 at 22:42

One idea is that integration by parts expresses the fact that the adjoint of $\frac{d}{dx}$ is $-\frac{d}{dx}$ (in a setting where boundary terms vanish). In the multivariable case, integration by parts expresses the fact that the adjoint of $\nabla$ is $-\text{div}$.

-
+1 This is a very good way to look at it. In terms of matrices, it might be helpful to think about the (symmetric) discretized first derivative operator which looks, down the diagonal away from the edges, like $$D = \pmatrix{ 0 && \frac 1 2 && \\ -\frac 1 2 && 0 && \frac 1 2 \\ && -\frac 1 2 && 0 && \frac 1 2 \\ && && -\frac 1 2 && 0 }$$ and obviously has the adjoint $-D$, again away from the boundaries. –  Sharkos Jun 9 '14 at 9:06
I like the adjoint interpretation. It encourages thinking of an integral of a product as a scalar product on $L^2$ –  Tim Seguine Jun 9 '14 at 11:29

Might not be rigorous but this takes the cake for me:

$$\sum_{k=m}^n f_k(g_{k+1}-g_k) = [f_{n+1}g_{n+1} - f_m g_m] - \sum_{k=m}^n g_{k+1}(f_{k+1}- f_k).$$

$$\int u\,dv = uv - \int v\,du$$

The first formula takes a sum that includes a $f\Delta g$ term and transforms it to a sum containing a $g\Delta f$. Integration by parts takes an integral with a $u\,dv$ term and transforms it to an integral with a $v\,du$ term.

-
This is not intuitive at all, which is what the OP was looking for; it is simply a statement regurgitated directly from Wikipedia. –  alexqwx Jul 2 '14 at 22:28
This shows how integration by parts and summation by parts are related using Riemann Sums. Summation by parts is easily verified, so this gives an understandable validation of integration by parts. –  robjohn Jul 7 '14 at 0:02

Consider the integral $I=\int f(x)g(x)dx$, ie. the integral of the product of two functions.

Now imagine sliding $f(x)$ a small distance $\epsilon$ along the $x$-axis relative to $g$. With reasonable assumptions about differentiability, the integral becomes $$\int f(x+\epsilon)g(x)dx=\int (f(x)+\epsilon f'(x))g(x)dx+O(\epsilon^2)$$ which becomes $$I+\epsilon\int f'(x)g(x)dx+O(\epsilon^2).$$

So $\int f'(x)g(x)dx$ tells you how $I$ changes as you slide $f$. But this must be the opposite of sliding $g$ the other way. So it should also equal $\int f(x)g'(x)dx$, modulo some bits that fall off the end as you slide if your integration region has endpoints.

If you look at many applications of integration by parts, you may find this explanation fits well. It can help make the derivation of the Euler-Lagrange equations clearer and gives insight into its frequent use in domains like electromagnetism and quantum mechanics. For example it becomes completely obvious that the $p$ operator from quantum mechanics is Hermitian and it's clear how this is directly related to its role as the generator of translations.

-
Suppose that my integral is computed over the interval $[a,b]$. Could you elaborate on why terms that fall off at the endpoints have the form $fg|_{a}^b$? I have half-baked ideas about that, but I'm not finding them very convincing. Otherwise I like this explanation very much, thank you for posting it. –  AreaMan Jun 11 '14 at 17:58
Imagine we're standing still watching $f$ sliding along between $a$ and $b$, with $g$ "at rest", and calculating $I$. Now we switch to a frame of reference where $f$ is at rest and $g$ is sliding along. The situation is almost the same, and we can use what I said above, but in this new frame of reference the endpoints $a$ and $b$ are moving. So to calculate the rate at which $I$ is changing we need to include the fact that to first order, if we slide a distance $\epsilon$, $\epsilon f(a)g(a)$ drops off one end and $\epsilon f(b)g(b)$ appears at the other end. –  Dan Piponi Jun 11 '14 at 19:28

A mathematical idea is useful for what you can use it for. A "conceptual" explanation may be attractive, but is relatively worthless for actually using integration by parts to do anything.

Instead, you should think of integration by parts in terms of how it lets you manipulate integrals; e.g. when you have $x$ or $\ln x$ or $\arctan x$ in an integrand, you can arrange to apply integration by parts differentiate it away into $1$ or $\frac{1}{x}$ or $\frac{1}{1+x^2}$ respectively, which potentially gives an integrand simpler than what you started with, depending on what the antiderivative of the cofactor is.

Or as another example, in the case of the distributional derivative, it let's you remove a derivative from one factor in an integrand by differentiating the other factor.

This isn't really something one understands a priori: instead, by working through problems, one gains experience and eventually an intuitive understanding of how it can be used to simplify an integrand.

-
I don't understand why you are being downvoted, as there is certainly some merit to an answer like this. However, I do disagree with your first paragraph - conceptual explanations can sometimes help one be creative with applications, in a way that simply getting used integration by parts as a calculational tool does not. For instance, I think that the description of this idea as an adjoint (when the boundary terms vanish) leads very naturally to considering distributions as a dual of the space of test functions. I think that that insight took a long time to achieve, historically speaking. –  AreaMan Jun 9 '14 at 13:35
Dear @user54092 : I dunno: invalidating the user's pursuit of a conceptual explanation and then emphasizing focus what a process is useful for seems like it is encouraging all the bad thought patterns of students who think mathematics is "memorization and repetition of techniques that are useful for solving math problems." I know what Hurkyl is referring to, but in this case it seems like there are plenty of useful conceptual explanations to be had, so maybe that's why someone was critical... (didn't downvote btw) –  rschwieb Jun 9 '14 at 13:41
@rschwieb That make sense. I do think that this response conveys something of that negative attitude, but I have also found that sometimes the best way to understand an idea is to understand how it is useful to other ideas. It can sometimes be easier to understand what something does than what it is (this is especially true outside of mathematics), though I don't think one should generalize that experience to say that ideas should only be thought of as tool for other means - they have an independent life. I was asking for how each user thinks of this idea, so this is valid response in my mind. –  AreaMan Jun 9 '14 at 14:40
@user54092 : Right, I think so too :) –  rschwieb Jun 9 '14 at 14:42
This answer is not very useful since OP clearly understands what the superficial utility of by-parts is and wants a deeper understanding. I wouldn't downvote it though, nor upvote. –  PA6OTA Jun 10 '14 at 3:49

I like to think of integration by parts as Fubini's Theorem. So if $$F(x) = \int_a^x f(y) \, dy, \quad G(x) = \int_a^x g(y) \, dy ,$$ then $$\int_a^b F(x) g(x) \, dx + \int_a^b f(x) G(x) \, dx$$ $$= \int_{x=a}^b \int_{y=a}^x f(y) g(x) \, dy \, dx + \int_{x=a}^b \int_{y=a}^x f(x) g(y) \, dy \, dx$$ $$= \int_{x=a}^b \int_{y=x}^b f(x) g(y) \, dy \, dx + \int_{x=a}^b \int_{y=a}^x f(x) g(y) \, dy \, dx$$ where in the first half I switched the roles of $x$ and $y$, and then interchanged the order of integration $$= \int_{x=a}^b \int_{y=a}^b f(x) g(y) \, dy \, dx = F(b) G(b) = [ F(x)G(x) ]_{x=a}^b$$ remembering that $F(a) = G(a) = 0$. (I know in essence this is the same as Henry Swanson's answer, but this is a different perspective.)

-
This looks similar to the fact that the product rule is an instance of a higher dimensional chain rule. If we have a product of two functions, $f(x)g(x)$, then we may write that as a composition of $(x,y)\mapsto (f(x), g(y))$ followed by the map, $(x,y)\mapsto xy$. If we apply the higher dimensional chain rule to this, then we get the product rule. –  Baby Dragon Jun 11 '14 at 16:13