— Second worksheet on integrals, expanding on 7.2 of our textbook; more to follow — Jochen Denzler Feb 2001

7.2: Integration by Parts – Integration by pArts

The capitalization in the headline is not a typo. Unlike integration of rational functions (outlined in previous notes; more in chapter 7.3 of textbook and my notes expanding that chapter), which is essentially a routine machinery that proceeds mechanically, integration by parts is a very versatile tool whose use can be quite artistic. You will be required to master it in certain simple typical situations (as in the textbook), but to really appreciate it, you should have seen a few more examples. They are really cute.

I cannot give you a systematic approach here, like the one outlined for some of the material in 7.1. The material is a bit unsystematic by its very nature. However, I’ll give you some landmarks for orientation, again pointing out that to simplify (the appearance of an expression through algebra) is not quite the same as to ∫ implify (the structure of an expression, with the purpose to integrate in mind). Adjusting your notion of ∫ implicity and progre∫∫ in calculation means to become able to orient yourself within the landscape of integrals.

7.2.1: Basics

Integration by parts is the translation of the product rule of differentiation into integrals:

Rewrite  (uv)′ = u′v + u · v′  as  u · v′ = (uv)′ − u′v
and integration translates this into  ∫ u v′ dx = uv − ∫ u′ v dx

So, unlike the product rule for differentiation, which says in particular: “If you can find the derivative of u and the derivative of v, then you can find the derivative of uv”, integration by parts does NOT claim that you could find an antiderivative of uv easily, if you can find antiderivatives of u and v separately. Actually, it is quite common that you can’t. For instance, you can find ∫ dx/x and ∫ sin x dx easily, but there is NO simple expression in terms of the standard functions for ∫ \frac{sin x}{x} dx.

Rather, you trade in one integral, ∫ u v′ dx, for a different integral, ∫ u′ v dx, which you still have to handle. It is to some extent dependent on your decisions whether you get a simpler or a more difficult integral. So, you will want some advice in making good decisions. If you have an integral like ∫ x cos x dx, it is your choice whether you want to call u = x, v′ = cos x or rather u = cos x, v′ = x, or, for that matter, u = x cos x, v′ = 1. Example 2 in the textbook is quite instructive, so you can study the effects of either choice, and actually you can make up any products for yourself and see what choices lead to simplifications of an integrand. When you actually try this, don’t be disappointed if neither choice leads to a simplification. For example, \frac{1}{x} sin x would be such a case. Integration by parts will not always produce a happy end.

As you have to make a decision which factors under the integral you want to call u (and then have to differentiate), and which you want to call v′ (and then have to integrate subsequently), you may want to have a rough score system, like chessplayers would assign 8-9 points to a queen, 1 point to a pawn etc., to determine what figures they want to sacrifice for what gain. And like in the case of chess, the scores will work most of the time, but there may be special situations where giving up a queen for apparently nothing will eventually win the game. Here is such a rough scheme by which you can assess how to trade in integrals to your advantage:

powers: usually good for differentiation; but they don’t feel to strong about it. When combined with, e.g., logarithms, rather leave the differentiation to those and integrate the powers.

ln: good for differentiation
sin, cos, sinh, cosh, exponentials: good for either
tan: not too good either way; — however:

tan^{2}: consider making tan^{2} x into (1 + tan^{2} x) − 1, and the first term is good for integration (yields tan x)

inverse trigs and hyps: good for differentiation, and they feel strongly about it. Let’em have their way and rather integrate powers.

1: quite often good to be introduced as a dummy factor; and then it would be integrated.

square roots: not too good either way; an example is available below,

but √ are not typical candidates for integration by parts.

If you look at what you get when you either differentiate or integrate the functions in the left column, you will probably agree with the judgements in the right column: you want to use a factor for that operation that returns a result simpler than the original factor.

Discussion in our class why we should have a slight preference for differentiating powers rather than integrating them: One student suggests that we don’t want these annoying denominators when integrating powers. My sympathy. But the integrals don’t care about constant factors: they may move in and out of the integral freely. When fighting with integrals, we just tolerate such slight nuisances equanimously. This is part of the vital distinction between simple and ∫ imple. Our wicked good rea∫ oning says us: we can do it again, and if we differentiate powers often enough, they are gone altogether!!

Now, with this compass in mind, you can handle all textbook examples and understand how they work. [You may forget about tan and root in the table, but should be aware of the rest of the table.] I will not repeat them, because it’s already a lot of voluntary extra work to type these things here, so why parrot the book?

But you want to write down your calculations in such a way that you can see what you are doing. I can suggest essentially two models; both have one line of intermediate calculations between the lines of ongoing calculation, and a careful alignment of the “=” signs in the main calculation is helpful to organize things clearly:

∫ \underbrace{x^{3}}_{v′} \underbrace{(ln x)^{2}}_{u} dx = \frac{x^{4}}{4} (ln x)^{2} − ∫ \underbrace{\frac{x^{4}}{4} · \frac{2}{x}}_{v′=x^{3}/2} \underbrace{(ln x)}_{u} dx

v=x^{4}/4 u′=2(ln x)/x  v=x^{4}/8  u′=1/x
= \frac{x^{4}}{4} (ln x)^{2} − \frac{x^{4}}{8} (ln x) + ∫ \frac{x^{3}}{8} dx
= \frac{x^{4}}{4} (ln x)^{2} − \frac{x^{4}}{8} (ln x) + \frac{x^{4}}{32} + C

Note that u, v have a different meaning in the two integrals of the first line.

A different notation would be to use downwards arrows ↓ for differentiation, and upward arrows ↑ for untegration, also known as untiderivatives. (Ok, it doesn’t rhyme that well, but well enough for the purpose.) So the direction of the arrow points always towards the derivative. The disadvantage of this notation is, that it is exotic, so you couldn’t expect people to be familiar with it, an advantage is that it avoids confusion if your variable of integration happens to be u or v. So, here is the same again:

∫ x^{3}(ln x)^{2} dx = \frac{x^{4}}{4} (ln x)^{2} − ∫ \frac{x^{4}}{4} · \frac{2}{x} (ln x) dx
↑ ↓  ↑ ↑ ↓
\frac{x^{4}}{4} \frac{2 ln x}{x}  \frac{x^{4}}{8}  \frac{1}{x}
= \frac{x^{4}}{4} (ln x)^{2} − \frac{x^{4}}{8} (ln x) + ∫ \frac{x^{3}}{8} dx etc

Note that the integrated term uv is obtained from combining the tails of the arrows, the new integrand u′v occurs in the line under the old integrand v′u. And (as in the 2nd integral) you may use multiple arrows rather than underbraces, but will of course still integrate the ENTIRE expression v′ = (x^{4}/4)(2/x), NOT its single factors x^{4}/4 and 2/x separately. If you feel multiple arrows may lure you into such a trap, don’t use them.

7.2.2: Textbook Examples

As of this moment, I will assume that you have already worked through examples 2, 3, 4, 5, 6 of chapter 7.2 of the textbook. And now, I will show you a few more:

7.2.3: Some Other Cute Examples

There’s no rule without exception. Usually I want you to digest maths NOT like in a cinema (i.e., wait and see what happens) but to think of what you would naturally do next, and to understand the motives for each step. But these examples work only by experience-based ingenuity. So don’t feel you should have been able to come up with these. Relax and watch the artistic performance.

(Actually, the trick in example 6, where it doesn’t look like exchanging ∫ e^{x} cos x dx for ∫ e^{x} sin x dx should be called progress, but you still go ahead, get even back what you started with, and wonder even more what the heck all the work should then have been good for, but then, surprise, we can solve for the unknown integral, — this trick goes in the same artistic category. But unlike the following examples, they would want you to have learnt this trick by now and to be able to apply it to “exponentials times trigs”.)

The trick of returning to the original integrals after some integration(s) by parts and of subsequently solving the equation obtained for the unknown integral reoccurs in other cases every once in a while, thus confirming the saying:

Blessed are those who go around in circles, for they shall be known as big wheels.

\underline{Here is one example:} (Explanation of steps after the formulas)

\begin{matrix}∫ 1 · \sqrt{a^{2} − x^{2}} dx = & x \sqrt{a^{2} − x^{2}} − ∫ x \frac{−2x}{2\sqrt{a^{2} − x^{2}}} dx \\ ↑  ↓  = & x \sqrt{a^{2} − x^{2}} − ∫ \frac{(a^{2} − x^{2}) − a^{2}}{\sqrt{a^{2} − x^{2}}} dx \\ = & x \sqrt{a^{2} − x^{2}} − ∫ \sqrt{a^{2} − x^{2}} dx + a^{2} ∫ \frac{1}{\sqrt{a^{2} − x^{2}}} dx \\ 2 ∫ \sqrt{a^{2} − x^{2}} dx = & x \sqrt{a^{2} − x^{2}}  + a^{2} arcsin \frac{x}{a} + C \end{matrix}

line 1: integration by parts; v′ = 1, u = \sqrt{a^{2} − x^{2}}. line 2: we have ∫ implified −x^{2} in the numerator of the integral into (a^{2} − x^{2}) − a^{2}.

The purpose is that we can now (line 3) separate fractions, get our original integral back from one of the terms, whereas

the second term returns a familiar integral line 4: unknown integral has been moved to the left; need only divide by 2 and done!

Note the ∫ implification – not simplification! – in line 2. Algebraic simplification has the appearance of the expression in mind (‘simple’ means, it needs little ink to write down), whereas ∫ implification has the structure of the expression for the intended purpose of integration in mind. Anything that can be integrated by reference to standard integrals (like 1/\sqrt{a^{2} − x^{2}}), is to be considered as just as ∫ imple (albeit not as simple) as zero.

You’ll familiarize yourself with a less sophisticated method to calculate this integral later. When I say “familiarize” I mean you can do it already now, but may still need to be told the trick how: namely, substitute x = a sin t in the integral and then use either a trig identity on the resulting integral or else one integration by parts and the trigonometric Pythagoras (sin^{2} + cos^{2} = 1). Go ahead and try to carry this out right away!

\underline{Another, extra-cute one}: Turn a defeat into a success

Just imagine you had forgotten the arctan-integral and you tried to calculate ∫ \frac{1}{x^{2}+1} dx by parts. Here’s what you get (and it’s line by line following the model of the previous example):

\begin{matrix}∫ 1 · \frac{1}{x^{2} + 1} dx = & x \frac{1}{x^{2} + 1} − ∫ x \frac{−2x}{(x^{2} + 1)^{2}} dx \\ ↑  ↓  = & \frac{x}{x^{2} + 1} + 2 ∫ \frac{(x^{2} + 1) − 1}{(x^{2} + 1)^{2}} dx \\ = & \frac{x}{x^{2} + 1} + 2 ∫ \frac{1}{x^{2} + 1} dx − 2 ∫ \frac{1}{(x^{2} + 1)^{2}} dx \\ − ∫ \frac{1}{x^{2} + 1} dx = & \frac{x}{x^{2} + 1}  − 2 ∫ \frac{1}{(x^{2} + 1)^{2}} dx \end{matrix}

Defeat… – We can’t do the remaining integral on the right hand side, and it’s actually worse than the one we started with. But now that our attempt hasn’t worked out, we think of something else and yes, suddenly we remember that all the work was unnecessary: We do know ∫ \frac{1}{x^{2}+1} dx, it’s arctan x + C.

But we don’t throw away our calculation in anger: rather we enjoy the accidential finding and conclude

∫ \frac{1}{(x^{2} + 1)^{2}} dx = \frac{1}{2} (arctan x + \frac{x}{x^{2} + 1}) + C

an integral that would have caused us a lot of trouble, if we had tried to attack it directly.

7.2.4: A Joke

You’ll have to do a lot of logarithm type integrals soon. Natural logarithms are so natural in calculus that many mathematicians don’t even call them natural any more, but simply ‘logarithm’. What other logarithm could it be but the natural one! And then, consequently, they write ‘log’ rather than ‘ln’. Therefore ∫ \frac{dt}{t} = log t. (No joke so far, you will really see ‘log’ used for ‘ln’ occasionally.)

But now, we don’t need to call the variable t. And computer scientists have funnier variable names anyway (e.g., count=count+1;). If they can have these fancy variable names, then why couldn’t we? Therefore you conclude:

∫ \frac{d cabin}{cabin} = log cabin

No, wait a minute, this will only give you 6 out of 10 points. The evaluation is not complete. Something’s missing. Think a bit. For the answer, you’ll need a mirror:

It should rather be log cabin + C = house boat.

7.2.5: What’s wrong here?

Integration by parts is a very useful tool for obtaining such surprising statements like 0 = 1. Cambleevit? Then try and find out the mistake…

Here is an attempt to find ∫ e^{x} cosh x dx by the same method as we did with ∫ e^{x} cos x dx, namely by two integrations by parts, each of which will be set up such as to integrate the exponential and differentiate the hyperbolic. Alas the calculation does not yield the integral (think of how you would actually get this integral), but instead it leads to… — well, see:

∫ e^{x} cosh x dx = e^{x} cosh x − ∫ e^{x} sinh x dx = e^{x} cosh x − e^{x} sinh x + ∫ e^{x} cosh x dx

Subtracting from both sides of the equation the unknown integral leads to 0 = e^{x} cosh x − e^{x} sinh x.

But the right hand side is e^{x}(cosh x − sinh x) = e^{x}e^{−x} = 1. Therefore we conclude that 0 = 1, which is a really revolutionary discovery!