Skip to main content
Mathematics LibreTexts

1.7: Integration by parts

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    The fundamental theorem of calculus tells us that it is very easy to integrate a derivative. In particular, we know that

    \begin{align*} \int \frac{d}{dx}\left( F(x) \right) \, d{x} &= F(x)+C \end{align*}

    We can exploit this in order to develop another rule for integration — in particular a rule to help us integrate products of simpler function such as

    \begin{gather*} \int x e^x \, d{x} \end{gather*}

    In so doing we will arrive at a method called “integration by parts”.

    To do this we start with the product rule and integrate. Recall that the product rule says

    \begin{gather*} \frac{d}{dx} u(x)v(x) = u'(x)\,v(x)+u(x)\,v'(x) \end{gather*}

    Integrating this gives

    \begin{align*} \int \big[u'(x)\,v(x)+u(x)\,v'(x)\big]\, d{x} &=\big[\text{a function whose derivative is $u'v+uv'$}\big] + C\\ &=u(x)v(x) +C \end{align*}

    Now this, by itself, is not terribly useful. In order to apply it we need to have a function whose integrand is a sum of products that is in exactly this form \(u'(x)v(x) + u(x)v'(x)\text{.}\) This is far too specialised.

    However if we tease this apart a little:

    \[\begin{align*} \int \big[ u'(x)\,v(x) + u(x)\,v'(x) \big]\, d{x} &= \int u'(x)\,v(x) \,\, d{x} +\int u(x)\,v'(x) \,\, d{x}\\ \end{align*}\]

    Bring one of the integrals to the left-hand side

    \begin{align*} u(x) v(x) - \int u'(x)\,v(x) \, d{x} &= \int u(x)\,v'(x)\, d{x}\\ \end{align*}

    Swap left and right sides

    \begin{align*} \int u(x)\,v'(x)\, d{x} &= u(x) v(x) - \int u'(x)\,v(x) \, d{x} \end{align*}

    In this form we take the integral of one product and express it in terms of the integral of a different product. If we express it like that, it doesn't seem too useful. However, if the second integral is easier, then this process helps us.

    Let us do a simple example before explaining this more generally.

    Example 1.7.1 \(\int xe^x \, d{x}\)

    Compute the integral \(\displaystyle \int xe^x \, d{x}\text{.}\)


    • We start by taking the equation above

      \begin{align*} \int u(x)\,v'(x)\, d{x} &= u(x) v(x) - \int u'(x)\,v(x) \, d{x} \end{align*}

    • Now set \(u(x)=x\) and \(v'(x)=e^x\text{.}\) How did we know how to make this choice? We will explain some strategies later. For now, let us just accept this choice and keep going.
    • In order to use the formula we need to know \(u'(x)\) and \(v(x)\text{.}\) In this case it is quite straightforward: \(u'(x)=1\) and \(v(x)=e^x\text{.}\)
    • Plug everything into the formula: \[\begin{align*} \int x e^x \, d{x} &= x e^x - \int e^x \, d{x}\\ \end{align*}\]

      So our original more difficult integral has been turned into a question of computing an easy one.

      \begin{align*} &= x e^x - e^x +C \end{align*}
    • We can check our answer by differentiating:

      \begin{align*} \frac{d}{dx} \left(x e^x - e^x +C \right) &= \underbrace{x e^x + 1 \cdot e^x}_{\text{by product rule}} - e^x + 0\\ &= x e^x & \text{as required.} \end{align*}

    The process we have used in the above example is called “integration by parts”. When our integrand is a product we try to write it as \(u(x) v'(x)\) — we need to choose one factor to be \(u(x)\) and the other to be \(v'(x)\text{.}\) We then compute \(u'(x)\) and \(v(x)\) and then apply the following theorem:

    Theorem 1.7.2 Integration by parts

    Let \(u(x)\) and \(v(x)\) be continuously differentiable. Then

    \begin{gather*} \int u(x)\,v'(x)\, d{x} = u(x)\,v(x)-\int v(x)\,u'(x)\, d{x} \end{gather*}

    If we write \(dv\) for \(v'(x)\, d{x}\) and \(\, d{u}\) for \(u'(x)\, d{x}\) (as the substitution rule suggests), then the formula becomes

    \begin{gather*} \int u\, d{v}= u\,v-\int v\, d{u} \end{gather*}

    The application of this formula is known as integration by parts.

    The corresponding statement for definite integrals is

    \begin{gather*} \int_a^b u(x)\,v'(x)\, d{x} = u(b)\,v(b)-u(a)\,v(a)-\int_a^b v(x)\,u'(x)\, d{x} \end{gather*}

    Integration by parts is not as easy to apply as the product rule for derivatives. This is because it relies on us

    1. judiciously choosing \(u(x)\) and \(v'(x)\text{,}\) then
    2. computing \(u'(x)\) and \(v(x)\) — which requires us to antidifferentiate \(v'(x)\text{,}\) and finally
    3. that the integral \(\int u'(x) v(x)\, d{x}\) is easier than the integral we started with.

    Notice that any antiderivative of \(v'(x)\) will do. All antiderivatives of \(v'(x)\) are of the form \(v(x)+A\) with \(A\) a constant. Putting this into the integration by parts formula gives

    \begin{align*} \int u(x) v'(x)\, d{x} &= u(x) \left( v(x)+A \right) - \int u'(x)\left( v(x)+A\right) \, d{x}\\ &= u(x)v(x) + A u(x) - \int u'(x) v(x) \, d{x}- \underbrace{A \int u'(x) \, d{x}}_{= A u(x) + C}\\ &= u(x)v(x) - \int u'(x) v(x)\, d{x} + C \end{align*}

    So that constant \(A\) will always cancel out.

    In most applications (but not all) our integrand will be a product of two factors so we have two choices for \(u(x)\) and \(v'(x)\text{.}\) Typically one of these choices will be “good” (in that it results in a simpler integral) while the other will be “bad” (we cannot antidifferentiate our choice of \(v'(x)\) or the resulting integral is harder). Let us illustrate what we mean by returning to our previous example.

    Example 1.7.3 \(\int xe^x \, d{x}\) — again

    Our integrand is the product of two factors

    \begin{align*} x && \text{and} && e^x \end{align*}

    This gives us two obvious choices of \(u\) and \(v'\text{:}\)

    \begin{align*} u(x)&=x & v'(x)&=e^x\\ \text{ or}\\ u(x)&=e^x & v'(x)&=x \end{align*}

    We should explore both choices:

    1. If take \(u(x)=x\) and \(v'(x)=e^x\text{.}\) We then quickly compute

      \begin{align*} u'(x)&=1 &\text{and} && v(x)=e^x \end{align*}

      which means we will need to integrate (in the right-hand side of the integration by parts formula)

      \begin{align*} \int u'(x) v(x) \, d{x} &= \int 1 \cdot e^x \, d{x} \end{align*}

      which looks straightforward. This is a good indication that this is the right choice of \(u(x)\) and \(v'(x)\text{.}\)
    2. But before we do that, we should also explore the other choice, namely \(u(x)=e^x\) and \(v'(x)=x\text{.}\) This implies that

      \begin{align*} u'(x)&= e^x &\text{and}&& v(x)&= \frac{1}{2}x^2 \end{align*}

      which means we need to integrate

      \begin{align*} \int u'(x) v(x) \, d{x} &= \int \frac{1}{2}x^2 \cdot e^x \, d{x}. \end{align*}

      This is at least as hard as the integral we started with. Hence we should try the first choice.

    With our choice made, we integrate by parts to get

    \begin{align*} \int xe^x \, d{x} &= xe^x - \int e^x \, d{x}\\ &= xe^x - e^x +C. \end{align*}

    The above reasoning is a very typical workflow when using integration by parts.

    Integration by parts is often used

    • to eliminate factors of \(x\) from an integrand like \(xe^x\) by using that \(\frac{d}{dx}x=1\) and
    • to eliminate a \(\log x\) from an integrand by using that \(\frac{d}{dx}\log x=\frac{1}{x}\) and
    • to eliminate inverse trig functions, like \(\arctan x\text{,}\) from an integrand by using that, for example, \(\frac{d}{dx}\arctan x=\frac{1}{1+x^2}\text{.}\)
    Example 1.7.4 \(\int x\sin x\, d{x}\)


    • Again we have a product of two factors giving us two possible choices.
      1. If we choose \(u(x)=x\) and \(v'(x)=\sin x\text{,}\) then we get

        \begin{align*} u'(x) &=1 &\text{and} && v(x) &= -\cos x \end{align*}

        which is looking promising.
      2. On the other hand if we choose \(u(x)=\sin x\) and \(v'(x)=x\text{,}\) then we have

        \begin{align*} u'(x)&=\cos x &\text{and} && v(x) &= \frac{1}{2}x^2 \end{align*}

        which is looking worse — we'd need to integrate \(\int \frac{1}{2}x^2 \cos x \, d{x}\text{.}\)
    • So we stick with the first choice. Plugging \(u(x)=x\text{,}\) \(v(x)=-\cos x\) into integration by parts gives us

      \begin{align*} \int x \sin x \, d{x} &= -x\cos x - \int 1 \cdot (-\cos x) \, d{x}\\ &= -x\cos x + \sin x + C \end{align*}

    • Again we can check our answer by differentiating:

      \begin{align*} \frac{d}{dx}\left( -x\cos x + \sin x + C \right) &= -\cos x + x\sin x + \cos x + 0\\ &= x \sin x \checkmark \end{align*}

    Once we have practised this a bit we do not really need to write as much. Let us solve it again, but showing only what we need to.


    • We use integration by parts to solve the integral.
    • Set \(u(x)=x\) and \(v'(x)=\sin x\text{.}\) Then \(u'(x)=1\) and \(v(x)=-\cos x\text{,}\) and

      \begin{align*} \int x \sin x \, d{x} &= -x\cos x + \int \cos x \, d{x}\\ &= -x\cos x + \sin x + C. \end{align*}

    It is pretty standard practice to reduce the notation even further in these problems. As noted above, many people write the integration by parts formula as

    \begin{align*} \int u\, d{v} &= uv - \int v \, d{u} \end{align*}

    where \(\, d{u}, \, d{v}\) are shorthand for \(u'(x)\, d{x}, v'(x)\, d{x}\text{.}\) Let us write up the previous example using this notation.

    Example 1.7.5 \(\int x\sin x\, d{x}\) yet again


    Using integration by parts, we set \(u=x\) and \(\, d{v}=\sin x\, d{x}\text{.}\) This makes \(\, d{u}= 1\, d{x}\) and \(v=-\cos x\text{.}\) Consequently

    \begin{align*} \int x \sin x \, d{x} &= \int u\, d{v}\\ &= uv - \int v\, d{u}\\ &= -x\cos x + \int \cos x \, d{x}\\ &= -x \cos x +\sin x + C \end{align*}

    You can see that this is a very neat way to write up these problems and we will continue using this shorthand in the examples that follow below.

    We can also use integration by parts to eliminate higher powers of \(x\text{.}\) We just need to apply the method more than once.

    Example 1.7.6 \(\int x^2 e^x \, d{x}\)


    • Let \(u=x^2\) and \(\, d{v}=e^x\, d{x}\text{.}\) This then gives \(\, d{u}=2x\, d{x}\) and \(v=e^x\text{,}\) and

      \begin{align*} \int x^2 e^x \, d{x} &= x^2 e^x - \int 2x e^x \, d{x} \end{align*}

    • So we have reduced the problem of computing the original integral to one of integrating \(2xe^x\text{.}\) We know how to do this — just integrate by parts again:

      \begin{align*} \int x^2 e^x \, d{x} &= x^2 e^x - \int 2x e^x \, d{x} & \text{set $u=2x, \, d{v}=e^x\, d{x}$}\\ &= x^2 e^x - \left( 2xe^x - \int 2 e^x \, d{x} \right) & \text{since $\, d{u}=2\, d{x}, v=e^x$}\\ &= x^2 e^x - 2xe^x + 2e^x + C \end{align*}

    • We can, if needed, check our answer by differentiating:

      \begin{align*} &\frac{d}{dx} \left( x^2 e^x - 2xe^x + 2e^x + C \right)\\ &\hskip1in= \left( x^2 e^x + 2xe^x \right) - \left(2x e^x + 2e^x \right) + 2e^x + 0\\ &\hskip1in= x^2 e^x \checkmark \end{align*}

    A similar iterated application of integration by parts will work for integrals

    \begin{gather*} \int P(x) \left(Ae^{ax} + B\sin(bx) + C\cos(cx) \right) \, d{x} \end{gather*}

    where \(P(x)\) is a polynomial and \(A,B,C,a,b,c\) are constants.

    Now let us look at integrands containing logarithms. We don't know the antiderivative of \(\log x\text{,}\) but we can eliminate \(\log x\) from an integrand by using integration by parts with \(u=\log x\text{.}\) Remember \(\log x = \log_e x = \ln x\text{.}\)

    Example 1.7.7 \(\int x\log x\, d{x}\)


    • We have two choices for \(u\) and \(\, d{v}\text{.}\)
      1. Set \(u=x\) and \(\, d{v}=\log x\, d{x}\text{.}\) This gives \(\, d{u}=\, d{x}\) but \(v\) is hard to compute — we haven't done it yet 1. Before we go further along this path, we should look to see what happens with the other choice.
      2. Set \(u=\log x\) and \(\, d{v}=x\, d{x}\text{.}\) This gives \(\, d{u}=\frac{1}{x}\, d{x}\) and \(v=\frac{1}{2}x^2\text{,}\) and we have to integrate

        \begin{align*} \int v\, \, d{u} &= \int \frac{1}{x} \cdot \frac{1}{2}x^2 \, d{x} \end{align*}

        which is easy.
    • So we proceed with the second choice.

      \begin{align*} \int x \log x \, d{x} &= \frac{1}{2}x^2 \log x - \int \frac{1}{2} x \, d{x}\\ &= \frac{1}{2}x^2 \log x - \frac{1}{4}x^2 +C \end{align*}

    • We can check our answer quickly:

      \begin{align*} \frac{d}{dx} \Big(\frac{x^2}{2} \ln x -\frac{x^2}{4} +C\Big) &= x\,\ln x + \frac{x^2}{2}\,\frac{1}{x} -\frac{x}{2}+0 =x\,\ln x \end{align*}

    Example 1.7.8 \(\int \log x\, d{x}\)

    It is not immediately obvious that one should use integration by parts to compute the integral

    \begin{gather*} \int \log x \, d{x} \end{gather*}

    since the integrand is not a product. But we should persevere — indeed this is a situation where our shorter notation helps to clarify how to proceed.


    • In the previous example we saw that we could remove the factor \(\log x\) by setting \(u=\log x\) and using integration by parts. Let us try repeating this. When we make this choice, we are then forced to take \(\, d{v}=\, d{x}\) — that is we choose \(v'(x)=1\text{.}\) Once we have made this sneaky move everything follows quite directly.
    • We then have \(\, d{u} = \frac{1}{x}\, d{x}\) and \(v = x\text{,}\) and the integration by parts formula gives us

      \begin{align*} \int \log x \, d{x} &= x \log x - \int \frac{1}{x} \cdot x \, d{x}\\ &= x\log x - \int 1 \, d{x}\\ &= x \log x - x + C \end{align*}

    • As always, it is a good idea to check our result by verifying that the derivative of the answer really is the integrand.

      \begin{align*} \frac{d}{dx} \big(x\ln x-x +C\big) &= \ln x + x\,\frac{1}{x} -1+0 =\ln x \end{align*}

    The same method works almost exactly to compute the antiderivatives of \(\arcsin(x)\) and \(\arctan(x)\text{:}\)

    Example 1.7.9 \(\int \arctan(x)\, d{x}\) and \(\int \arcsin(x)\, d{x}\)

    Compute the antiderivatives of the inverse sine and inverse tangent functions.


    • Again neither of these integrands are products, but that is no impediment. In both cases we set \(\, d{v}=\, d{x}\) (ie \(v'(x)=1\)) and choose \(v(x)=x\text{.}\)
    • For inverse tan we choose \(u=\arctan(x)\text{,}\) so \(\, d{u}=\frac{1}{1+x^2}\, d{x}\text{:}\) \[\begin{align*} \int \arctan(x) \, d{x} &= x \arctan(x) - \int x \cdot \frac{1}{1+x^2} \, d{x}\\ \end{align*}\]

      now use substitution rule with \(w(x)=1+x^2, w'(x)=2x\)

      \begin{align*} &= x \arctan(x) - \int \frac{w'(x)}{2} \cdot \frac{1}{w} \, d{x}\\ &= x \arctan(x) - \frac{1}{2} \int \frac{1}{w} \, d{w}\\ &= x \arctan(x) - \frac{1}{2}\log |w| + C\\ &= x \arctan(x) - \frac{1}{2} \log|1+x^2| + C \qquad \text{but $1+x^2 \gt 0$, so}\\ &= x \arctan(x) - \frac{1}{2} \log(1+x^2) + C \end{align*}
    • Similarly for inverse sine we choose \(u=\arcsin(x)\) so \(\, d{u} = \frac{1}{\sqrt{1-x^2}}\, d{x}\text{:}\) \[\begin{align*} \int \arcsin(x) \, d{x} &= x \arcsin(x) - \int \frac{x}{\sqrt{1-x^2}} \, d{x}\\ \end{align*}\]

      Now use substitution rule with \(w(x)=1-x^2, w'(x)=-2x\)

      \begin{align*} &= x \arcsin(x) - \int \frac{-w'(x)}{2} \cdot w^{-1/2} \, d{x}\\ &= x\arcsin(x) + \frac{1}{2} \int w^{-1/2} \, d{w}\\ &= x \arcsin(x) + \frac{1}{2} \cdot 2 w^{1/2} + C\\ &= x\arcsin(x) + \sqrt{1-x^2} + C \end{align*}
    • Both can be checked quite quickly by differentiating — but we leave that as an exercise for the reader.

    There are many other examples we could do, but we'll finish with a tricky one.

    Example 1.7.10 \(\int e^x \sin x\, d{x}\)


    Let us attempt this one a little naively and then we'll come back and do it more carefully (and successfully).

    • We can choose either \(u=e^x, \, d{v}=\sin x\, d{x}\) or the other way around.
      1. Let \(u=e^x, \, d{v}=\sin x\, d{x}\text{.}\) Then \(\, d{u}=e^x\, d{x}\) and \(v=-\cos x\text{.}\) This gives

        \begin{align*} \int e^x \sin x &= -e^x\cos x + \int e^x \cos x \, d{x} \end{align*}

        So we are left with an integrand that is very similar to the one we started with. What about the other choice?
      2. Let \(u=\sin x, \, d{v}=e^x\, d{x}\text{.}\) Then \(\, d{u}=\cos x\, d{x}\) and \(v= e^x\text{.}\) This gives

        \begin{align*} \int e^x \sin x &= e^x\sin x - \int e^x \cos x \, d{x} \end{align*}

        So we are again left with an integrand that is very similar to the one we started with.
    • How do we proceed? — It turns out to be easier if you do both \(\int e^x\sin x\, d{x}\) and \(\int e^x \cos x\, d{x}\) simultaneously. We do so in the next example.
    Example 1.7.11 \(\int_a^b e^x\sin x\, d{x}\) and \(\int_a^b e^x\cos x\, d{x}\)

    This time we're going to do the two integrals

    \begin{align*} I_1&=\int_a^b e^x\sin x\, d{x} & I_2 &=\int_a^b e^x\cos x\, d{x} \end{align*}

    at more or less the same time.

    • First \[\begin{align*} I_1=\int_a^b e^x\sin x\, d{x} &=\int_a^b u \, d{v} \qquad\\ \end{align*}\]

      Choose \(u=e^x, \, d{v} = \sin x\, d{x}\text{,}\) so \(v = -\cos x, \, d{u}= e^x\, d{x}\)

      \begin{align*} &=\Big[-e^x\cos x\Big]_a^b +\int_a^b e^x\cos x\, d{x} \end{align*} We have not found \(I_1\) but we have related it to \(I_2\text{.}\)

      \begin{align*} I_1&=\Big[-e^x\cos x\Big]_a^b +I_2 \end{align*}

    • Now start over with \(I_2\text{.}\) \[\begin{align*} I_2=\int_a^b e^x\cos x\, d{x} &=\int_a^b u\, d{v}\\ \end{align*}\]

      Choose \(u=e^x, \, d{v} = \cos x\, d{x}\text{,}\) so \(v = \sin x, \, d{u}= e^x\, d{x}\)

      \begin{align*} &=\Big[e^x\sin x\Big]_a^b -\int_a^b e^x\sin x\, d{x} \end{align*} Once again, we have not found \(I_2\) but we have related it back to \(I_1\text{.}\)

      \begin{align*} I_2&=\Big[e^x\sin x\Big]_a^b -I_1 \end{align*}

    • So summarising, we have

      \begin{align*} I_1&=\Big[-e^x\cos x\Big]_a^b +I_2 & I_2&=\Big[e^x\sin x\Big]_a^b -I_1 \end{align*}

    • So now, substitute the expression for \(I_2\) from the second equation into the first equation to get

      \begin{align*} I_1 &=\Big[-e^x\cos x +e^x\sin x\Big]_a^b -I_1\\ &\hskip0.5in \text{which implies}\qquad I_1=\frac{1}{2}\Big[e^x\big(\sin x-\cos x\big)\Big]_a^b \end{align*}

      If we substitute the other way around we get

      \begin{align*} I_2 &=\Big[e^x\sin x +e^x\cos x\Big]_a^b -I_2\\ &\hskip0.5in \text{which implies}\qquad I_2=\frac{1}{2}\Big[e^x\big(\sin x+\cos x\big)\Big]_a^b \end{align*}

      That is,

      \begin{align*} \int_a^b e^x\sin x\, d{x}&= \frac{1}{2}\Big[e^x\big(\sin x-\cos x\big)\Big]_a^b\\ \int_a^b e^x\cos x\, d{x}&= \frac{1}{2}\Big[e^x\big(\sin x+\cos x\big)\Big]_a^b \end{align*}

    • This also says, for example, that \(\frac{1}{2}e^x\big(\sin x-\cos x\big)\) is an antiderivative of \(e^x\sin x\) so that

      \begin{gather*} \int e^x\sin x\, d{x}=\frac{1}{2}e^x\big(\sin x-\cos x\big)+C \end{gather*}

    • Note that we can always check whether or not this is correct. It is correct if and only if the derivative of the right hand side is \(e^x\sin x\text{.}\) Here goes. By the product rule

      \begin{align*} &=\frac{d}{dx}\Big[\frac{1}{2}e^x\big(\sin x-\cos x\big)+C\Big]\\ &=\frac{1}{2}\Big[e^x\big(\sin x-\cos x\big)+e^x\big(\cos x+\sin x\big)\Big] =e^x\sin x \end{align*}

      which is the desired derivative.
    • There is another way to find \(\int e^x\sin x\, d{x}\) and \(\int e^x\cos x\, d{x}\) that, in contrast to the above computations, doesn't involve any trickery. But it does require the use of complex numbers and so is beyond the scope of this course. The secret is to use that \(\sin x =\frac{e^{ix}-e^{-ix}}{2i}\) and \(\cos x =\frac{e^{ix}+e^{-ix}}{2}\text{,}\) where \(i\) is the square root of \(-1\) of the complex number system. See Example B.2.6.


    Stage 1


    The method of integration by substitution comes from the \(\Rule{2cm}{1pt}{0pt}\) rule for differentiation.

    The method of integration by parts comes from the \(\Rule{2cm}{1pt}{0pt}\) rule for differentiation.


    Suppose you want to evaluate an integral using integration by parts. You choose part of your integrand to be \(u\text{,}\) and part to be \(\, d{v}\text{.}\) The part chosen as \(u\) will be: (differentiated, antidifferentiated). The part chosen as \(\, d{v}\) will be: (differentiated, antidifferentiated).


    Let \(f(x)\) and \(g(x)\) be differentiable functions. Using the quotient rule for differentiation, give an equivalent expression to \(\displaystyle\int \frac{f'(x)}{g(x)}\, d{x}\text{.}\)


    Suppose we want to use integration by parts to evaluate \(\displaystyle\int u(x)\cdot v'(x) \, d{x}\) for some differentiable functions \(u\) and \(v\text{.}\) We need to find an antiderivative of \(v'(x)\text{,}\) but there are infinitely many choices. Show that every antiderivative of \(v'(x)\) gives an equivalent final answer.


    Suppose you want to evaluate \(\displaystyle\int f(x)\, d{x}\) using integration by parts. Explain why \(\, d{v} = f(x)\, d{x}\text{,}\) \(u=1\) is generally a bad choice.

    Note: compare this to Example 1.7.8, where we chose \(u=f(x)\text{,}\) \(\, d{v}=1\, d{x}\text{.}\)

    Stage 2

    6 (✳)

    Evaluate \({\displaystyle\int x\log x\,\, d{x}}\text{.}\)

    7 (✳)

    Evaluate \({\displaystyle\int \frac{\log x}{x^7}\,\, d{x}}\text{.}\)

    8 (✳)

    Evaluate \(\displaystyle\int_0^\pi x\sin x\,\, d{x}\text{.}\)

    9 (✳)

    Evaluate \(\displaystyle\int_0^{\frac{\pi}{2}} x\cos x\,\, d{x}\text{.}\)


    Evaluate \(\displaystyle\int x^3 e^x \, d{x}\text{.}\)


    Evaluate \(\displaystyle\int x \log^3 x \, d{x}\text{.}\)


    Evaluate \(\displaystyle\int x^2\sin x\, d{x} \text{.}\)


    Evaluate \(\displaystyle\int (3t^2-5t+6)\log t\, d{t}\text{.}\)


    Evaluate \(\displaystyle\int \sqrt{s}e^{\sqrt{s}}\, d{s}\text{.}\)


    Evaluate \(\displaystyle\int \log^2 x \, d{x}\text{.}\)


    Evaluate \(\displaystyle\int 2xe^{x^2+1}\, d{x}\text{.}\)

    17 (✳)

    Evaluate \(\displaystyle\int\arccos y\,\, d{y}\text{.}\)

    Stage 3

    18 (✳)

    Evaluate \(\displaystyle\int 4y\arctan(2y) \,\, d{y}\text{.}\)


    Evaluate \(\displaystyle\int x^2\arctan x \, d{x}\text{.}\)


    Evaluate \(\displaystyle\int e^{x/2}\cos(2x)\, d{x}\text{.}\)


    Evaluate \(\displaystyle\int \sin(\log x)\, d{x}\text{.}\)


    Evaluate \(\displaystyle\int 2^{x+\log_2 x} \, d{x}\text{.}\)


    Evaluate \(\displaystyle\int e^{\cos x}\sin(2x)\, d{x}\text{.}\)


    Evaluate \(\displaystyle\int \dfrac{x e^{-x}}{(1-x)^2}\,\, d{x}\text{.}\)

    25 (✳)

    A reduction formula.

    1. Derive the reduction formula

      \[ \int\sin^n(x)\,\, d{x}=-\frac{\sin^{n-1}(x)\cos(x)}{n} +\frac{n-1}{n}\int\sin^{n-2}(x)\,\, d{x}. \nonumber \]

    2. Calculate \(\displaystyle\int_0^{\pi/2}\sin^8(x)\,\, d{x}\text{.}\)
    26 (✳)

    Let \(R\) be the part of the first quadrant that lies below the curve \(y=\arctan x\) and between the lines \(x=0\) and \(x=1\text{.}\)

    1. Sketch the region \(R\) and determine its area.
    2. Find the volume of the solid obtained by rotating \(R\) about the \(y\)--axis.
    27 (✳)

    Let \(R\) be the region between the curves \(T(x) = \sqrt{x}e^{3x}\) and \(B(x) = \sqrt{x}(1+2x)\) on the interval \(0 \le x \le 3\text{.}\) (It is true that \(T(x)\ge B(x)\) for all \(0\le x\le 3\text{.}\)) Compute the volume of the solid formed by rotating \(R\) about the \(x\)-axis.

    28 (✳)

    Let \(f(0) = 1\text{,}\) \(f(2) = 3\) and \(f'(2) = 4\text{.}\) Calculate \(\displaystyle\int_0^4 f''\big(\sqrt{x}\big)\,\, d{x}\text{.}\)


    Evaluate \(\displaystyle\lim_{n \to \infty}\sum_{i=1}^n \frac{2}{n}\left(\frac{2}{n}i-1\right)e^{\frac{2}{n}i-1}\text{.}\)

    1. We will soon.

    This page titled 1.7: Integration by parts is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?