Schematic Integration by Parts

By definition, \displaystyle\int f g\;dx can be expressed as

\displaystyle \int f \left(\int g\; dx \right)' \;dx.

Applying integration by parts,

\displaystyle\int fg\;dx

\overset{g_1=\int g\;dx }{=} \displaystyle\int f g_1'\;dx  = f g_1 - \underline{\int f' g_1\;dx}

\overset{g_2 = \int g_1\;dx}{=} f g_1 -\left(f' g_2 -\displaystyle \int f'' g_2\;dx\right)

= f g_1 -f' g_2 + \displaystyle \int f'' g_2\;dx

\overset{g_3 = \int g_2\;dx}{=} f g_1 -f' g_2 + \left(f'' g_3 - \displaystyle\int f^{(3)} g_3\;dx\right)

\ddots

= fg_1 - f'g_2 + f^{''}g_3 + \dots + (-1)^{n-1} f^{(n-1)} g_n +(-1)^n\displaystyle\int f^{n}g_n\;dx

=  \sum\limits_{i=1}^{n}(-1)^{i-1}f^{i-1}g_i + (-1)^n\displaystyle\int f^{(n)}g_n\;dx

Note a pattern has emerged – namely,

\displaystyle \int fg\;dx =  fg_1 - f'g_2 + f^{''}g_3 + \dots + (-1)^{n-1} f^{(n-1)} g_n +(-1)^n\displaystyle\int f^{n}g_n\;dx

holds for all n‘s (see (*) ). Consequently, it introduces a schematic method of evaluating certain integrals. For example, to determine

I_1 = \displaystyle \int x^5 \sin(x)\;dx,

let f=x^5 and g=\sin(x). Write f' in one column and \displaystyle\int g\; dx in another, continuing to the row in which f^{(n)} = 0:

\displaystyle I_1=-x^5\cos(x) + 5x^4\sin(x)+20x^3\cos(x)-60x^2\sin(x)-120x\cos(x)+120\sin(x)

To evaluate

I_2 = \displaystyle\int e^{ax}\cos(bx)\;dx,

let f = e^{ax} and g=\sin(bx). Proceed as before, but continuing to the row in which the f_n g_n is a constant multiple of I_2‘s integrand:

I_2 =  e^{ax}\cdot\frac{\sin(bx)}{b} + ae^{ax}\cdot\frac{cos(bx)}{b^2} - \frac{a^2}{b^2}I_2.

Solving for I_2, we obtain

I_2 = \frac{e^{ax}(b\cdot\sin(bx)+a\cdot\cos(bx))}{a^2+b^2}


Prove:

\forall n \in \mathbb{N}, \displaystyle \int fg\;dx = \sum\limits_{i=1}^{n}(-1)^{i-1}f^{i-1}g_i + (-1)^n\displaystyle\int f^{(n)}g_n\;dx\quad\quad\quad(*)

where f^{(0)} = f, f^{(n)} = (f^{(n-1)})'; g_{0} = g, g_{n} = \displaystyle\int g_{n-1}\;dx.

proof

When n=1, the right-hand side of (*) is

\sum\limits_{i=1}^{1}(-1)^{i-1}f^{i-1}g_i + (-1)^1\displaystyle\int f^{(1)}g_1\;dx

= f^{(0)} g_1 - \displaystyle\int f^{(1)}g_1\;dx

= f\displaystyle\int g_0\;dx - \int f' \left(\int g_0\;dx \right)\;dx

= \displaystyle\int f  \left(\int g_0\;dx\right)'\;dx

= \displaystyle\int f g\;dx

which is the left-hand side of (*).

Suppose when n = k,

\displaystyle\int f\cdot g\;dx = \sum\limits_{i=1}^{k}(-1)^{i-1}f^{i-1}g_i + (-1)^k\displaystyle\int f^{(k)}g_k\;dx.

Then

\displaystyle\int f\cdot g\;dx = \sum\limits_{i=1}^{k}(-1)^{i-1} f^{(i-1)}g_i +(-1)^k\displaystyle\int f^{(k)}(g_{k+1})'\; dx

= \sum\limits_{i=1}^{k}(-1)^{i-1} f^{(i-1)}g_i +(-1)^k \left(f^{(k)}g_{k+1} - \displaystyle\int f^{(k+1)}g_{k+1}\;dx\right)

= \sum\limits_{i=1}^{k}(-1)^{i-1} f^{(i-1)}g_i +(-1)^k f^{(k)}g_{k+1} +(-1)^{k+1}\displaystyle\int f^{(k+1)}g_{k+1}\;dx

=\underbrace{\sum\limits_{i=1}^{k}(-1)^{i-1} f^{(i-1)}g_i +(-1)^{(k+1-1)} f^{(k+1-1)}g_{k+1}}_{\sum\limits_{i=1}^{k+1}(-1)^{i-1} f^{(i-1)}g_i} +(-1)^{k+1}\displaystyle\int f^{(k+1)}g_{k+1}\;dx

=\sum\limits_{i=1}^{k+1}(-1)^{i-1} f^{(i-1)}g_i + (-1)^{k+1}\displaystyle\int f^{(k+1)}g_{k+1}\;dx.

And so, when n=k+1,

\displaystyle \int f g\;dx =\sum\limits_{i=1}^{k+1}(-1)^{i-1} f^{(i-1)}g_i + (-1)^{k+1}\displaystyle\int f^{(k+1)}g_{k+1}\;dx.

See also “The Russian multiplication method“.


Exercise-1 Evaluate I_3 = \displaystyle\int xe^x\cos(2x)\;dx by the schematic method (hint: f=xe^{x}, g=\cos(2x) and I_2)