Integration By Parts

Integration by parts is a common approach to simplify an integral, it is often useful when two fucntions are multiplied together, the rule is like this: u(x) is a funtion, its independent variable is x, dependent variable is u, v(x) is another funtion with x as independent variable and u as its dependent variable,  then we have:

(1)   \begin{equation*} \int u v dx = u \int v dx - \int \dfrac{du}{dx} \cdot (\int v dx) dx \end{equation*}

For example, if we want to compute:

    \[\int x \cos (x) dx\]

here we have u = x and v = \cos (x), so

    \[\dfrac{du}{dx} = 1\]

    \[\int v dx = \int \cos (x) dx = \sin (x)\]

Put everything together, we have

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

This rule is very helpful if \dfrac{du}{dx} is simpler than u and \int{vdx} is easy to compute. Where does this rule come from? Here is a way to get it through Product Rule for derivatives:

(2)   \begin{equation*} \dfrac{d(uv)}{dx} = u \cdot \dfrac{dv}{dx} + v \cdot \dfrac{du}{dx} \end{equation*}

Integrate both side and rearrange, we will have:

    \[\int \dfrac{d(uv)}{dx} dx = \int {u \cdot \dfrac{dv}{dx}} dx + \int {v \cdot \dfrac{du}{dx}} dx\]

    \[uv = \int {u \cdot \dfrac{dv}{dx}} dx + \int {v \cdot \dfrac{du}{dx}} dx\]

    \[\int {u \cdot \dfrac{dv}{dx}} dx = uv - \int {v \cdot \dfrac{du}{dx}} dx\]

if we assume \dfrac{dv}{dx} = w, so we have v = \int{wdx}, replace the terms with v in the equation above, we will have:

    \[\int u w dx = u \int {w dx} - \int \dfrac{du}{dx} \cdot (\int w dx) dx\]

This is exactly the integration by parts equation we give at the begin, only with v replaced by w.