# Integrate using 'Integration by parts'

### From Substepr

## Understanding

- Integration by parts is used to integrate a product of two continuously integrable and differentiable functions.

- On this page, \(U(x)\) and \(V(x)\) are two differentiable functions.

- According to the product rule of differentiation:

\( \begin{aligned} \frac{d}{dx}(U(x)V(x)) & = U(x)\frac{dV}{dx} + V(x)\frac{dU}{dx} \end{aligned} \)

where \( \begin{aligned} \frac{d}{dx}(U(x)V(x))\end{aligned} \) is the differential with respect to \(x\) of the product \(U(x)V(x)\).

If you integrate both sides you get:

\( \begin{aligned} U(x)V(x) & = \int U(x)\frac{dV}{dx}dx + \int V(x)\frac{dU}{dx}dx \end{aligned} \)

Rearranging to make the first term on the left the subject of the equation:

\( \begin{aligned} \int U(x)\frac{dV}{dx}dx & = U(x)V(x) - \int V(x)\frac{dU}{dx}dx \end{aligned} \)

The notation can be simplified to:

\( \begin{aligned} \int U \, dV & = U \, V - \int V \, dU \end{aligned} \)

This is the equation that's used to construct an integration by parts.

## Method

### Example: \( \begin{aligned}\int x \sin(x) \, dx \end{aligned} \)

- Write down the formula \( \begin{aligned} \int U \, dV = \, U \, V - \int V \, dU \end{aligned} \).
- Let \(\begin{aligned}U = x \end{aligned}\) and \(\begin{aligned}dV & = \sin(x) \, dx\end{aligned}\)
- Find the unknown terms of the integration by parts formula.
- Determine \(dU\).
- Evaluate \(\begin{aligned}\frac{dU}{dx}\end{aligned}\)
- \(\begin{aligned}\frac{dU}{dx}=\frac{d}{dx} x = 1 \end{aligned}\)

- Multiply each side by \(dx\) to give: \(dU = 1 \, dx\)

- Evaluate \(\begin{aligned}\frac{dU}{dx}\end{aligned}\)
- Determine \(\begin{aligned}V = \int dV\end{aligned}\):
- Evaluate \(\begin{aligned}\int dV = \, \int \sin(x) \, dx = -\cos(x) + C\end{aligned}\) for an indefinite integral or \(-\cos(x)\) for a definite integral, where C is a constant.

- Determine \(dU\).
- Insert them into the equation for integration by parts to get: \( \qquad \begin{aligned}\,\int x \sin(x) = U \, V - \int V \, dU = x (-\cos(x)) - \int (-\cos(x)) \, dx \qquad \end{aligned}\)
- Simplify.
- Cancel the signs and remove the brackets: \(\begin{aligned} \int x \sin(x) = - x \cos(x) + \int \cos(x) \, dx \end{aligned}\)
- Integrate \(\cos(x)\): \(\begin{aligned}\qquad \qquad \qquad \qquad \qquad \qquad \quad \quad = - x \cos(x) + \sin(x) + D \end{aligned}\) , where \(D\) is a constant.