MathAnalysisCalculusIntegrals

Integration by parts

10 minutes read

The process of finding antiderivatives can feel a bit frightening as integrands become more complicated. Luckily there are certain techniques that can help us identify and adequately tackle more intricate indefinite integrals. In this topic, you'll take a look at the Integration by Parts technique. You'll also see how it can help you when integrands involve the product of two (or more) functions.

Integration by Parts

As its name suggests, this method consists of separating the original integrand into parts. Before elaborating further, let's recall the rule to find derivatives of products of two functions u(x)u(x) and v(x)v(x)

(uv)=uv+uv(u \cdot v)' = u' \cdot v + u \cdot v'Rearranging terms

uv=(uv)uvu \cdot v' = (u \cdot v)' - u' \cdot vIntegrating both sides of the equation

uv dx=uvuv dx\int u \cdot v' \ dx = u \cdot v - \int u' \cdot v \ dxWe know that du=u(x) dxdu = u'(x) \ dx and dv=v(x) dxdv = v'(x) \ dx, so our expression becomes

udv=uvvdu\boxed{\quad \int u \cdot dv = u \cdot v - \int v \cdot du \quad}which is the main formula for this method.

Here, udvu \cdot dv represents the original integrand, including the differential. This integrand represents the product of two (or more) functions: uu is usually a function that becomes easier to integrate after differentiation. dvdv is the product of dxdx times a function whose antiderivative vv is known beforehand or can be determined without much effort.

If applied properly, the resulting integral vdu\int v \cdot du should be at least easier to solve than the original one. It can even be immediately solved as in one of the cases you've seen previously.

For example, let's consider the following integral

xexdx\int x e^x dxFirst, let's define both uu and dvdv as follows:

u=xdv=exdxu = x \qquad dv = e^x dxThen, you need to find both vv and dudu:

dudx=1    du=dxdv=exdx    v=ex\frac{du}{dx} = 1 \implies du = dx \qquad \int dv=\int e^x dx \implies v=e^xNow, you can substitute these expressions following the formula above, like so

udv=uvvdu    xexdx=xexexdx\int u \cdot dv = u \cdot v - \int v \cdot du \implies \int x \cdot e^x dx = x \cdot e^x - \int e^x \cdot dxYou can see how your initial integral has become a simpler one. In fact, you know the resulting integral has a direct antiderivative:

exdx=ex+C\int e^x \cdot dx = e^x + CThus,

xexdx=xexex+C=ex(x1)+C\begin{align*} \int x \cdot e^x dx &= x \cdot e^x - e^x + C \\ &= e^x \cdot (x-1) + C \end{align*}

Integral of logarithmic functions

In order to find the antiderivative of a logarithmic function

ln(x)dx\int \ln(x) dx

you can use the integration by parts method. By rewriting your integrand, you can identify both uu and vv and their derivatives:

ln(x)dx =ln(x)1 dx    {u=ln(x)    du=1xdxdv=1dx    v=x\int \ln(x)dx \ = \int \ln(x) \cdot 1 \ dx \implies \begin{cases} u =\ln(x) &\implies du = \frac{1}{x} dx \\ dv = 1 \cdot dx &\implies v = x \end{cases}Substituting these expressions in your integration by parts formula, you obtain

ln(x)1 dx=ln(x)x1xx dx\int \ln(x) \cdot 1 \ dx = \ln(x) \cdot x - \int \frac{1}{x} \cdot x \ dxAnd so,

ln(x)dx=xln(x)1xx dx=xln(x)1 dx=xln(x)x+Cln(x)dx=x(ln(x)1)+C\begin{align*} \int \ln(x)dx &= x \ln(x) - \int \frac{1}{x} \cdot x \ dx \\ &= x \ln(x) - \int 1 \ dx \\ &= x \ln(x) - x + C \\ \int \ln(x)dx &= x \cdot (\ln(x) - 1) + C \end{align*}

You can generalize this to logarithms of any base using the change of base property of logarithms:

logab=logcblogca\log_ab = \frac{\log_cb}{\log_ca}Then,

loga(x)dx=1ln(a)ln(x)dx=x(ln(x)1ln(a))+Cloga(x)dx=x(loga(x)1ln(a))+C\begin{align*} \int \log_a(x)dx = \frac{1}{\ln(a)} \int \ln(x)dx &= x \cdot \left(\frac{\ln(x)-1}{\ln(a)}\right) + C \\ \int \log_a(x)dx &= x \cdot \left(\log_a(x) - \frac{1}{\ln(a)}\right) + C \end{align*}

Algebra and integrals

Let's consider the following integral

I=sin(x)2x dxI = \int \sin(x) \cdot 2^x \ dx

Where II is a placeholder for the result of the integral.

You can apply integration by parts in order to expand the expression, like so

2xsin(x) dx    {u=2x    du=ln(2)2x dxdv=sin(x)dx    v=cos(x)\int 2^x \cdot \sin(x) \ dx \implies \begin{cases} u =2^x &\implies du = \ln(2) \cdot 2^x \ dx \\ dv = \sin(x)dx &\implies v = -\cos(x) \end{cases}Thus,

I=cos(x)2x+cos(x)2xln(2) dx=cos(x)2x+ln(2)cos(x)2x dxI = -\cos(x) \cdot 2^x + \int \cos(x) \cdot 2^x \cdot \ln(2) \ dx = -\cos(x) \cdot 2^x + \ln(2) \int \cos(x) \cdot 2^x \ dxNow, you have a new integral to solve. Applying integration by parts again

2xcos(x) dx    {u=2x    du=ln(2)2x dxdv=cos(x)dx    v=sin(x)\int 2^x \cdot \cos(x) \ dx \implies \begin{cases} u =2^x &\implies du = \ln(2) \cdot 2^x \ dx \\ dv = \cos(x)dx &\implies v = \sin(x) \end{cases}Then,

I=cos(x)2x+ln(2)cos(x)2x dx=cos(x)2x+ln(2)[sin(x)2xsin(x)2xln(2) dx]I=cos(x)2x+ln(2)sin(x)2xln2(2)sin(x)2x dx\begin{align*} I &= -\cos(x) \cdot 2^x + \ln(2) \int \cos(x) \cdot 2^x \ dx \\ &= -\cos(x) \cdot 2^x + \ln(2) \cdot \left[ \sin(x) \cdot 2^x - \int \sin(x) \cdot 2^x \cdot \ln(2) \ dx \right] \\ I&= -\cos(x) \cdot 2^x + \ln(2) \cdot \sin(x) \cdot 2^x - \ln^2(2) \int \sin(x) \cdot 2^x \ dx \end{align*}But wait! What is in that last term on the right-hand side of your equation? Recall your original integral:

I=sin(x)2x dxI = \int \sin(x) \cdot 2^x \ dxSubstituting in, and solving for II

I=cos(x)2x+ln(2)sin(x)2xln2(2)I(ln2(2)+1)I=cos(x)2x+ln(2)sin(x)2xI=cos(x)2x+ln(2)sin(x)2xln2(2)+1+C\begin{align*} I&= -\cos(x) \cdot 2^x + \ln(2) \cdot \sin(x) \cdot 2^x - \ln^2(2) \cdot I \\ (\ln^2(2) + 1) \cdot I&= -\cos(x) \cdot 2^x + \ln(2) \cdot \sin(x) \cdot 2^x \\ I&= \frac{-\cos(x) \cdot 2^x + \ln(2) \cdot \sin(x) \cdot 2^x}{\ln^2(2) + 1} + C\\ \end{align*}[ALERT] Remember to add the constant of integration! [/ALERT]

Finally, you have

sin(x)2x dx=cos(x)2x+ln(2)sin(x)2xln2(2)+1+C\int \sin(x) \cdot 2^x \ dx = \frac{-\cos(x) \cdot 2^x + \ln(2) \cdot \sin(x) \cdot 2^x}{\ln^2(2) + 1} + C

For some integrands, the cyclical relationship between their derivatives and antiderivatives appears when using the integration-by-parts method. As you saw in this example, which deals with an integrand comprised of sines and cosines, the re-appearing integrand can be grouped together with the original one to solve these integrals.

Tips for newcomers

The actual skill behind the Integration by Parts method lies in developing an intuition to correctly identify both uu and dvdv. This intuition is built with practice by solving integrals over and over, and there's no way around that. However, when it comes to new learners trying to solve their first integrals, there are a few useful tips to remember:

  • Derivatives of logarithmic, inverse trigonometric, and polynomial functions all result in "simpler" expressions: ddxln(x)=1xddxarctan(x)=11+x2ddx(x2+5x+3)=x+5\begin{align*} & \frac{d}{dx} \ln(x) = \frac{1}{x} \\ \\ & \frac{d}{dx} \arctan(x) = \frac{1}{1+x^2} \\ \\ &\frac{d}{dx} (x^2 + 5x + 3) = x + 5 \\ \end{align*}While their antiderivatives are more intricate:ln(x)dx=x(ln(x)1)+Carctan(x) dx=xarctan(x)12lnx2+1+C(x2+5x+3) dx=x33+5x22+3x+C\begin{align*} & \int \ln(x)dx = x \cdot (\ln(x) - 1) + C \\ \\ & \int \arctan(x) \ dx = x \cdot \arctan(x) - \frac{1}{2} \ln |x^2 + 1| + C \\ \\ & \int (x^2 + 5x + 3) \ dx = \frac{x^3}{3} + \frac{5x^2}{2} + 3x +C \\ \end{align*}Thus, these types of functions are good candidates for uu

  • Neither differentiation nor integration of exponential and (non-inverse) trigonometric functions usually result in "simpler" integrals: ddxex=exddxsin(x)=cos(x)ex dx=ex+Csin(x) dx=cos(x)+C\begin{align*} & \frac{d}{dx} e^x = e^{x} \\ \\ & \frac{d}{dx} \sin(x) = \cos(x) \\ \\ & \int e^x \ dx = e^{x} + C \\ \\ & \int \sin(x) \ dx = - \cos(x) + C \\ \end{align*}If differentiating another factor uu in the original integrand simplifies the whole expression, it can be beneficial to integrate these. Thus, these types of functions are good candidates for dvdv

An example:

Let's consider the following integral:

xsin(x) dx\int x \sin(x) \ dxIdentifying both uu and dvdv is a pretty straightforward process using our tips:

xsin(x) dx    {u=x    du=dxdv=sin(x)dx    v=cos(x)\int x \cdot \sin(x) \ dx \implies \begin{cases} u =x &\implies du = dx \\ dv = \sin(x)dx &\implies v = -\cos(x) \end{cases}Then, you are left with an easier integral to solve:
xsin(x) dx=xcos(x)+cos(x)dx\int x \sin(x) \ dx = -x \cos(x) + \int \cos(x) dx

A counterexample:

It is good to remember that these tips are not rules, but guidelines to which there can be many exceptions. As a counter-example, let's consider the following integral:

xex(x+1)2 dx\int \frac{x e^x}{(x + 1)^2} \ dxIf you were to choose uu and dvdv as follows

xex(x+1)2 dx    {u=x(x+1)2    du=x1(x+1)3dxdv=exdx    v=ex\int \frac{x e^x}{(x + 1)^2} \ dx \implies \begin{cases} u = \frac{x}{(x+1)^2} &\implies du = \frac{x-1}{(x+1)^3} dx \\ dv = e^x dx &\implies v = e^x \end{cases}You would be left with an even more difficult integral to solve

xex(x+1)2 dx=xex(x+1)2(x1) ex(x+1)3dx\int \frac{x e^x}{(x + 1)^2} \ dx = \frac{x e^x}{(x+1)^2} - \int \frac{(x-1) \ e^x}{(x+1)^3} dxIf instead, you were to choose uu and dvdv in this other manner:

xex(x+1)2 dx    {u=xex    du=ex(x+1) dxdv=1(x+1)2dx    v=1x+1\int \frac{x e^x}{(x + 1)^2} \ dx \implies \begin{cases} u = xe^x &\implies du = e^x \cdot(x+1) \ dx \\ dv = \frac{1}{(x+1)^2} dx &\implies v = - \frac{1}{x+1} \end{cases}You would obtain a much easier integral to solve

xex(x+1)2 dx=xexx+1+exdx\int \frac{x e^x}{(x + 1)^2} \ dx = -\frac{x e^x}{x+1} + \int e^x dxIn summary, a good rule of thumb is comparing the resulting integral to the original one; if the integrand became more difficult to integrate then it probably wasn't the right choice. Remember, there is no shame in going back and choosing again!

Conclusion

In this topic, you have learned about the integration by parts method. This integration method can be summarized as follows:

udv=uvvdu\int u \cdot dv = u \cdot v - \int v \cdot du

In addition, you've also learned the rule to determine the antiderivative for logarithmic functions:

f(x)=loga(x)    loga(x)dx=x(loga(x)1ln(a))+Cf(x) = \log_a(x) \implies \int \log_a(x)dx = x \cdot \left(\log_a(x) - \frac{1}{\ln(a)}\right) + C

You also learned that certain integrands can re-appear after applying the integration by parts method and that elementary algebra can help us solve these integrals.

Finally, you learned that even though certain functions can usually fit better as either uu or dvdv, there can be exceptions. Therefore, an intuition must be developed in order to make sure the resulting integral is easier to solve that the original one.

5 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo