AOS4 Topic 8: Integration by Parts

Definition:

Integration by parts is a technique used in calculus to evaluate the integral of a product of two functions. It is derived from the product rule for differentiation and is the counterpart of the product rule for differentiation.

The formula for integration by parts is given by:

\[ \int u \, dv = uv - \int v \, du \]

where \( u \) and \( dv \) are differentiable functions of \( x \), and \( du \) and \( v \) are their respective differentials. The goal of integration by parts is to choose \( u \) and \( dv \) in such a way that the integral on the right-hand side of the equation is easier to evaluate than the original integral.

Note: We can use integration by parts to find an integral \( \int u \, \frac{dv}{dx} dx \) if the integral \( \int v \, \frac{du}{dx} dx \) is easier to find.

Deriving the Integration by Parts Formula:

Understanding how to differentiate a product is crucial. If we have \( y = uv \), the derivative \( \frac{dy}{dx} \) can be expressed as \( u \frac{dv}{dx} + v \frac{du}{dx} \). Rearranging this yields \( u \frac{dv}{dx} = \frac{d(uv)}{dx} - v \frac{du}{dx} \). By integrating both sides, we obtain \( \int u \frac{dv}{dx} \, dx = \int \frac{d(uv)}{dx} \, dx - \int v \frac{du}{dx} \, dx \). Simplifying the first term on the right side results in \( \int u \frac{dv}{dx} \, dx = uv - \int v \frac{du}{dx} \, dx \).


ILATE rule:

We have learned that in integration by parts, we must use the necessary formula when we are given the product of two functions. The left term is regarded as the first function and the second term as the second function when calculating the integral of the two functions. We call this technique the ILATE rule. For instance, when integrating \(x \cdot e^x\), we designate \(x\) as the first function and \(e^x\) as the second function, aligning with the ILATE Rule. This approach ensures that the chosen first function possesses a derivative that can be easily integrated.


Techniques for integration by parts

Using integration by parts more than once:
"Repetitively using integration by parts in complex integration scenarios helps untangle complex integrals, exposing their underlying structure and making evaluation easier."

Using integration by parts by solving for the unknown integral:
"When an elusive integral is encountered, using integration by parts to represent it in terms of itself frequently reveals a way to resolve it, turning ambiguity into clarity."

Using reduction formulas:
"By simplifying difficult integrals into simpler forms through the use of reduction formulae in integration, one can expedite the process and find answers that previously seemed unattainable."


Finding recursive formula:

Find a recursive formula for \( \int x^n e^x \, dx \), where \( n \in \mathbb{N} \).

Solution:

a) For each \( n \in \mathbb{N} \cup \{0\} \), define \( I_n = \int x^n e^x \, dx \).

Now let \( n \in \mathbb{N} \). Using integration by parts, we find:

  1. \( I_n = \int x^n e^x \, dx \)
  2. \( = \int x^n \frac{d}{dx}(e^x) \, dx \)
  3. \( = x^n e^x - \int e^x \frac{d}{dx}(x^n) \, dx \)
  4. \( = x^n e^x - \int e^x n x^{n-1} \, dx \)
  5. \( = x^n e^x - n \int x^{n-1} e^x \, dx \)
  6. \( = x^n e^x - nI_{n-1} \)

We have shown that \( I_n = x^n e^x - nI_{n-1} \) for all \( n \in \mathbb{N} \).


Using integration by parts for definite integrals:
"Integration by parts provides a methodical way to compute areas bounded by curves when dealing with definite integrals. It does this by utilizing the interaction between functions to extract exact answers quickly and accurately."

We can also use integration by parts to evaluate definite integrals:

\[ \int_{a}^{b} u \frac{dv}{dx} \, dx = uv \bigg|_{a}^{b} - \int_{a}^{b} v \frac{du}{dx} \, dx \]



Created with GeoGebra®, by Ravinder Kumar, Link

Example 1

Type 1: Simple

Integrate: \( \int x \cos(x) \, dx \)

How to make the choice of which to integrate and which to differentiate?

Tip: Most of the time (unless other function cannot be integrated), choose the function which can be differentiated to obtain 0.

In this case, since we know how to differentiate and integrate both functions:

Let \( u = x \) and \( v' = \cos(x) \)

Therefore, \( u' = 1 \) and \( v = \sin(x) \)

Now apply the integration by parts formula:

\[ \int u \, dv = uv - \int v \, du \]

Thus, we obtain:

\[ \int x \cos(x) \, dx = x \sin(x) - \int \sin(x) \, dx = x \sin(x) + \cos(x) + C \]

where \( C \in \mathbb{R} \)

Example 2

Type 2: More complex

Sometimes you require more than one integration by parts to obtain the answer.

\[ \int x^2 \sin(x) \, dx \]

Since \( x^2 \) can be easily differentiated to obtain 0 and we know how to integrate \( \sin(x) \)

Let \( u = x^2 \) and \( v' = \sin(x) \)

Therefore, \( u' = 2x \) and \( v = -\cos(x) \)

Applying integration by parts we obtain:

\[ \int x^2 \sin(x) \, dx = -x^2 \cos(x) + 2\int x\cos(x) \, dx \]

As you can see, we do not know how to evaluate the resultant integral so we would need to do another by-parts calculation. However, we already worked this out from the previous example so we can directly substitute it in.

Substituting our answer from the previous example into the above results in:

\[ \int x^2 \sin(x) \, dx = -x^2 \cos(x) + 2(x\sin(x)+\cos(x)) + C, \, C \in \mathbb{R} \]

Then expand the brackets to obtain your final answer.

\[ \int x^2 \sin(x) \, dx = (2-x^2)\cos(x) + 2x\sin(x) + C, \, C \in \mathbb{R} \]

Example 3

Type 3: More difficult

Although in the last two examples we have been able to confidently differentiate and integrate both functions, there are times when we cannot integrate a specific function.

Integrate:

\[ \int x \ln(x) \, dx \]

<

Here we are forced to differentiate ln(x) and integrate x since we do not know how to integrate ln(x).

Therefore \( u = \ln(x) \) and \( v' = x \).

From this we obtain,

\( u' = \frac{1}{x} \) and \( v = \frac{1}{2}x^2 \)

Therefore,

\[ \int x \ln(x) \, dx = \frac{1}{2}x^2 \ln(x) - \int \frac{x}{2} \cdot \frac{1}{2}x^2 \, dx \]

\[ \int x \ln(x) \, dx = \frac{1}{2}x^2 \ln(x) - \int \frac{1}{4}x^3 \, dx \]

\[ \int x \ln(x) \, dx = \frac{1}{2}x^2 \ln(x) - \frac{1}{4} \cdot \frac{x^4}{4} + C, \quad C \in \mathbb{R} \]

Example 4

Type 4: Not really that hard, just a trick you need to know.

\[ \int \sin^{-1}(x) \, dx \]

Although it seems that there is only one function, you can think of it as a product of two functions, \( \arcsin(x) \) and 1.

Like in example 3, we have no idea how to integrate \( \arcsin(x) \), so we must differentiate \( \arcsin(x) \) and integrate 1.

Let \( u = \arcsin(x) \) and \( v' = 1 \)

Therefore, \( u' = \frac{1}{\sqrt{1-x^2}} \) and \( v = x \)

Now applying the integration by parts formula we obtain:

\( \int \sin^{-1}(x) \, dx = x \sin^{-1}(x) - \int \sqrt{1 - x^2} \, dx \)

Applying a u-substitution to help evaluate the 2nd integral (let \( u = x^2 \)) results in:

∴ \( \int \sin^{-1}(x) \, dx = x \sin^{-1}(x) - \frac{1}{2} \int \frac{1}{1 - u} \, du \)

Finally, simplifying the above we obtain:

∴ \( \int \sin^{-1}(x) \, dx = x \sin^{-1}(x) - \frac{1}{2}(1 - x^2) + C \), \( C \in \mathbb{R} \)

Example 5

Type 5: Difficult ones:

\(\int \sin(2x)cos(3x)dx \)

Although we were able to make at least one term into a zero, or something we knew how to differentiate in the previous examples, no matter how many times we apply the integration by parts formula we will never obtain an integral we know how to integrate or a zero :(

As a result, we need to use another method to integrate this.

We will begin as normal. Let \( u = \sin(2x) \) and \( v' = \cos(3x) \) (It does not matter which you choose since you can integrate and differentiate both)

Therefore, \( u' = 2\cos(2x) \) and \( v = \frac{1}{3}\sin(3x) \)

Now apply the integration by parts formula:

\[ \begin{align*} \int \sin(2x)\cos(3x) \, dx & = \frac{1}{3}\sin(2x)\sin(3x) - 2\int \cos(2x)\cos(3x) \, dx \\ & = \frac{1}{3}\sin(2x)\sin(3x) - \frac{2}{3}\int \cos(2x)\sin(3x) \, dx \end{align*} \]

You may notice a pattern emerging where if we applied by parts to a \( \sin(mx)\cos(nx) \) expression we obtain the same thing but reversed.

Using this knowledge, let us try and re-create the original integral by applying this again.

Now focusing on: \( \int \cos(2x)\sin(3x) \, dx \)

Let \( u = \cos(2x) \) and \( v' = \sin(3x) \)

Then, \( u' = -2\sin(2x) \) and \( v = -\frac{1}{3}\cos(3x) \)

Now applying the integration by parts formula we obtain:

\[ \begin{align*} \int \cos(2x)\sin(3x) \, dx & = -\frac{1}{3}\cos(2x)\cos(3x) - \frac{2}{3}\int \sin(2x)\cos(3x) \, dx \\ & = -\frac{1}{3}\cos(2x)\cos(3x) - \frac{2}{3}\int \sin(2x)\cos(3x) \, dx \end{align*} \]

Now substituting our result into our previous equation we obtain:

\[ \begin{align*} \int \sin(2x)\cos(3x) \, dx & = \frac{1}{3}\sin(2x)\sin(3x) - \frac{1}{3}\cos(2x)\cos(3x) - \frac{2}{3}\int \sin(2x)\cos(3x) \, dx \\ & - \frac{1}{3}\cos(2x)\cos(3x) - \frac{2}{3}\int \sin(2x)\cos(3x) \, dx \end{align*} \]

After expanding the brackets of the above equation, we obtain:

\[ \begin{align*} \int \sin(2x)\cos(2x) \, dx & = \frac{1}{3}\sin(2x)\sin(3x) + \frac{2}{9}\cos(2x)\cos(3x) + \frac{4}{9}\int \sin(2x)\cos(3x) \, dx \end{align*} \]

You may notice the same integral on either side, we can now treat it like a variable and re-arrange for it.

\[ \begin{align*} \frac{5}{9}\int \sin(2x)\cos(2x) \, dx & = \frac{1}{3}\sin(2x)\sin(3x) + \frac{2}{9}\cos(2x)\cos(3x) \end{align*} \]

Finally, we can evaluate our integral by simplifying the above expression.

Therefore, \[ \begin{align*} \int \sin(2x)\cos(2x) \, dx & = \frac{3}{5}\sin(2x)\sin(3x) + \frac{2}{5}\cos(2x)\cos(3x) + C, \quad C \in \mathbb{R} \end{align*} \]

Example 6

Using integration by parts more than once

Find \( \int x^2 e^{3x} \, dx \).

Solution:

We have to make a choice and let one of the functions in the product equal \( u \) and one equal \( \frac{dv}{dx} \).

As a general rule, we let \( u \) be the function which will become simpler when we differentiate it. In this case, it makes sense to let \( u = x^2 \) and \( \frac{dv}{dx} = e^{3x} \).

Then, \( \frac{du}{dx} = 2x \) and \( v = \int e^{3x} \, dx = \frac{1}{3} e^{3x} \).

Then, using the formula for integration by parts, \[ \int x^2 e^{3x} \, dx = \frac{1}{3} e^{3x} \cdot x^2 - \int \frac{1}{3} e^{3x} \cdot 2x \, dx \] \[ = \frac{1}{3} x^2 e^{3x} - \int \frac{2}{3} xe^{3x} \, dx \]


The resulting integral is still a product. It is a product of the functions \( \frac{2}{3}x \) and \( e^{3x} \). We can use the formula again. This time we choose \( u = \frac{2}{3}x \) and \( \frac{dv}{dx} = e^{3x} \).

Then \( \frac{du}{dx} = \frac{2}{3} \) and \( v = \int e^{3x} \, dx = \frac{1}{3} e^{3x} \).

So, \[ \int x^2 e^{3x} \, dx = \frac{1}{3} x^2 e^{3x} - \left( \frac{2}{9} x e^{3x} - \frac{2}{27} e^{3x} \right) + C \]

where \( C \) is the constant of integration. So we have done integration by parts twice to arrive at our final answer.

Example 7

Using integration by parts by solving for the unknown integral

Find the integral: \[ \int e^x \cos(x) \, dx \]

Solution:

Let \( u = e^x \) and \( dv/dx = \cos(x) \). Then \( du/dx = e^x \) and \( v = \sin(x) \).

So, using integration by parts, we obtain: \[ \int e^x \cos(x) \, dx = e^x \sin(x) - \int e^x \sin(x) \, dx \tag{1} \]

Similarly, we can use integration by parts to obtain: \[ \int e^x \sin(x) \, dx = -e^x \cos(x) + \int e^x \cos(x) \, dx \tag{2} \]

Substitute (2) into (1) and then rearrange: \[ \int e^x \cos(x) \, dx = e^x \sin(x) - (-e^x \cos(x) + \int e^x \cos(x) \, dx) \] \[ 2\int e^x \cos(x) \, dx = e^x \sin(x) + e^x \cos(x) + c \]

Now dividing by 2 and renaming the constant gives: \[ \int e^x \cos(x) \, dx = \frac{1}{2} e^x (\sin(x) + \cos(x)) + c \]

Example 8

Using reduction formulas

Use recursive formula to find \( \int x^3 e^x \, dx \).

Using the formula

\[ \int x^3 e^x dx = I_3 \quad \text{(by the definition of } I_3 \text{)} \] \[ = x^3 e^x - 3I_2 \quad \text{(expressing } I_3 \text{ in terms of } I_2 \text{)} \] \[ = x^3 e^x - 3x^2 e^x - 2I_1 \quad \text{(expressing } I_2 \text{ in terms of } I_1 \text{)} \] \[ = x^3 e^x - 3x^2 e^x + 6I_1 \]

\[ = x^3 e^x - 3x^2 e^x + 6x e^x - 6I_0 \quad \text{(expressing } I_1 \text{ in terms of } I_0 \text{)} \] \[ = x^3 e^x - 3x^2 e^x + 6x e^x - 6 \int e^x dx \quad \text{(by the definition of } I_0 \text{)} \] \[ = x^3 e^x - 3x^2 e^x + 6x e^x - 6e^x + c \] \[ = (x^3 - 3x^2 + 6x - 6)e^x + c \]

Example 9

Using integration by parts for definite integrals

Evaluate \( \int_{1}^{2} \ln(x) \, dx \)

Solution: Let \( u = \log_e x \) and \( \frac{dv}{dx} = 1 \). Then \( \frac{du}{dx} = \frac{1}{x} \) and \( v = x \).

We have \[ \int_{1}^{2} \log_e x \, dx = x \log_e x \Bigg|_{1}^{2} - \int_{1}^{2} 1 \, dx \] \[ = x \log_e x \Bigg|_{1}^{2} - \frac{x}{2} \Bigg|_{1}^{2} \] \[ = 2\log_e 2 - (2 - 1) \] \[ = 2\log_e 2 - 1 \]


Example 10

Evaluate: \( \int_{0}^{\pi} (4x-3)\sin\left(\frac{x}{4}\right) \, dx \)

$$ \int \sin(x^4)(4x - 3) \, dx $$

Integrate by parts: \[ \int f \, g' = f \, g - \int f' \, g \] \[ f = 4x - 3, \quad g' = \sin(x^4) \] \[ f' = 4, \quad g = -4\cos(x^4) \] \[ \begin{align*} &= -4\cos(x^4)(4x - 3) - \int -16\cos(x^4) \, dx \end{align*} \]

Now solving: \[ \int -16 \cos\left(\frac{x}{4}\right) \, dx \]

Substitute \( u = \frac{x}{4} \) \[ \implies du = \frac{1}{4} \, dx \]

Steps: \[ = -64 \int \cos(u) \, du \]

Now solving: \[ \int \cos(u) \, du \]

This is a standard integral: \[ = \sin(u) \]

Plug in solved integrals: \[ -64 \int \cos(u) \, du = -64 \sin(u) \]

Undo substitution \( u = \frac{x}{4} \): \[ = -64 \sin\left(\frac{x}{4}\right) \]

Plug in solved integrals: \[ -4 \cos\left(\frac{x}{4}\right) \left(4x - 3\right) - \int -16 \cos\left(\frac{x}{4}\right) \, dx \]

The problem is solved: \[ \int \sin\left(\frac{x}{4}\right) \left(4x - 3\right) \, dx = 64 \sin\left(\frac{x}{4}\right) - 4 \cos\left(\frac{x}{4}\right) \left(4x - 3\right) + C \]

\[ \pi \int_{0}^{\pi} f(x) \, dx = -16\pi - 76\sqrt{2} - 12 \]= 6.197051864910682

Example 11

Finding recursive formulaLet \( I_n = \int \cos^n x \, dx \).

a) Show that \( I_n = \frac{1}{n} \sin x \cos^{n-1} x + \frac{n-1}{n} I_{n-2} \).

Proof

Let \( I_n = \int \cos^n x \, dx \).

a) Show that \( I_n = \frac{1}{n} \sin x \cos^{n-1} x + \frac{n-1}{n}I_{n-2} \).

Using integration by parts with \( u = \cos^{n-1} x \) and \( dv = \cos x \, dx \), we have:

\[ du = -(n-1)\cos^{n-2} x \sin x \, dx \]

\[ v = \sin x \]

Using the integration by parts formula: \[ \int u \, dv = uv - \int v \, du \]

We get: \[ I_n = \sin x \cos^{n-1} x - \int \sin x (- (n-1)\cos^{n-2} x \sin x) \, dx \] \[ I_n = \sin x \cos^{n-1} x + (n-1) \int \sin^2 x \cos^{n-2} x \, dx \]

Now, using the identity \( \sin^2 x = 1 - \cos^2 x \), we rewrite the integral: \[ I_n = \sin x \cos^{n-1} x + (n-1) \int (1 - \cos^2 x) \cos^{n-2} x \, dx \] \[ I_n = \sin x \cos^{n-1} x + (n-1) \int \cos^{n-2} x \, dx - (n-1) \int \cos^n x \, dx \]

Notice that the second term \( \int \cos^{n-2} x \, dx \) is \( I_{n-2} \). So, we have: \[ I_n = \sin x \cos^{n-1} x + (n-1)I_{n-2} - (n-1)I_n \]

Solving for \( I_n \), we get: \[ I_n + (n-1)I_n = \sin x \cos^{n-1} x + (n-1)I_{n-2} \] \[ I_n(1 + n-1) = \sin x \cos^{n-1} x + (n-1)I_{n-2} \] \[ I_n = \frac{1}{n} \sin x \cos^{n-1} x + \frac{n-1}{n}I_{n-2} \]

This is the desired result.

Exercise &&1&& (&&1&& Question)

Find an antiderivative of \( \int xe^{-x} \, dx \).

1
Submit

Exercise &&2&& (&&1&& Question)

Find an antiderivative of \( \int x^5 ln(x) \, dx \).

2
Submit

Exercise &&3&& (&&1&& Question)

Find an antiderivative of \( \int x^2 sin(x) \, dx \).

3
Submit

Exercise &&4&& (&&1&& Question)

Find an antiderivative of \( \int e^{2x} cos(3x) \, dx \).

4
Submit

Exercise &&5&& (&&1&& Question)

Find a reduction formula for \( \int (\log_e(x))^n \, dx \).

5
Submit

Exercise &&6&& (&&1&& Question)

Find an antiderivative of \( \int cos(2x)cos(3x) \, dx \).

6
Submit

Exercise &&7&& (&&1&& Question)

Find an antiderivative of \( \int arctan x \,dx \)

7
Submit

Exercise &&8&& (&&1&& Question)

Evaluate the integral: \( \int sin^{3}(x) \, dx \)

8
Submit

Exercise &&9&& (&&1&& Question)

Find \( \int_{0}^{2} x^2e^{2x} \, dx\)

9
Submit

Exercise &&10&& (&&1&& Question)

Find \( \int_{1}^{2} ln(3x) \, dx\)

10
Submit