Integrals: functions and by parts

Integration by parts

Integration by parts, ∫fg′ dx=fg−∫f′g dx\int f g'\,dx=fg-\int f' g\,dx, is the product rule used in reverse.

∫f(x)g′(x) dx=f(x)g(x)−∫f′(x)g(x) dx\begin{gathered} \int f(x)g'(x)\,dx \\[4pt] =f(x)g(x)-\int f'(x)g(x)\,dx \end{gathered}

Integration by parts is the product rule (fg)′=f′g+fg′(fg)'=f'g+fg' integrated and rearranged.

∫fg′ dx=fg−∫f′g dx\int f g'\,dx=fg-\int f' g\,dx

The key decision is which factor to differentiate: choose the one that gets simpler (xx or log⁡x\log x) as ff. For xlog⁡xx\log x, differentiate log⁡x\log x.

Examples

  1. 01What is the uvuv part?∫xex dx(u=x,  v′=ex  ⇒  v=ex)\displaystyle \begin{gathered} \displaystyle \int x e^x \, dx \\[6pt] \displaystyle (u=x,\; v'=e^{x} \;\Rightarrow\; v=e^{x}) \end{gathered}AnswerHide
    Answerxex\displaystyle x e^x

    Steps

    1. vv is the integral of v′v'; multiply it by uu
    2. x⋅ex\displaystyle x \cdot e^{x}=xex\displaystyle = x e^x
  2. 02What is ∫u′v dx\int u'v\,dx? (omit CC)∫xlog⁡ex dx=x22log⁡ex−∫u′v dx\displaystyle \int x \log_e x \, dx = \frac{x^{2}}{2} \log_e x - \int u'v \, dxAnswerHide
    Answerx24\displaystyle \frac{x^{2}}{4}

    Steps

    1. u=log⁡exu=\log_e x differentiates to u′=1xu'=\dfrac{1}{x}, and v=x22v=\dfrac{x^{2}}{2}
    2. ∫1x⋅x22 dx\displaystyle \int \frac{1}{x} \cdot \frac{x^{2}}{2} \, dx=x24\displaystyle = \frac{x^{2}}{4}
  3. 03Integrate∫xsin⁡x dx=−xcos⁡x−(−sin⁡x)\displaystyle \int x \sin x \, dx = -x \cos x - (-\sin x)AnswerHide
    Answer−xcos⁡x+sin⁡x+C\displaystyle -x \cos x + \sin x+C
  4. 04What is the uvuv part?∫xlog⁡ex dx(u=log⁡ex,  v′=x  ⇒  v=x22)\displaystyle \begin{gathered} \displaystyle \int x \log_e x \, dx \\[6pt] \displaystyle (u=\log_e x,\; v'=x \;\Rightarrow\; v=\frac{x^{2}}{2}) \end{gathered}AnswerHide
    Answerx22log⁡ex\displaystyle \frac{x^{2}}{2} \log_e x

    Steps

    1. vv is the integral of v′v'; multiply it by uu
    2. (log⁡ex)⋅x22\displaystyle (\log_e x) \cdot \frac{x^{2}}{2}=x22log⁡ex\displaystyle = \frac{x^{2}}{2} \log_e x
  5. 05What is the uvuv part?∫xsin⁡x dx(u=x,  v′=sin⁡x  ⇒  v=−cos⁡x)\displaystyle \begin{gathered} \displaystyle \int x \sin x \, dx \\[6pt] \displaystyle (u=x,\; v'=\sin x \;\Rightarrow\; v=-\cos x) \end{gathered}AnswerHide
    Answer−xcos⁡x\displaystyle -x \cos x

    Steps

    1. vv is the integral of v′v'; multiply it by uu
    2. x⋅(−cos⁡x)\displaystyle x \cdot (-\cos x)=−xcos⁡x\displaystyle = -x \cos x
  6. 06What is ∫u′v dx\int u'v\,dx? (omit CC)∫log⁡ex dx=xlog⁡ex−∫u′v dx\displaystyle \int \log_e x \, dx = x \log_e x - \int u'v \, dxAnswerHide
    Answerx\displaystyle x

    Steps

    1. u=log⁡exu=\log_e x differentiates to u′=1xu'=\dfrac{1}{x}, and v=xv=x
    2. ∫1x⋅x dx\displaystyle \int \frac{1}{x} \cdot x \, dx=x\displaystyle = x

FAQ

How do I choose f and g'?
Make f the factor that gets simpler when differentiated. log⁡x\log x and x get simpler, so they go on the f side; exe^x and sin⁡x\sin x are easy to integrate, so they go on the g′g' side.

Published 2026-09-03 · Updated 2026-10-14