Differentials and integrals: Integration techniques
Integration by parts
In the last example of the substitution method for integration we pulled a trick to calculate the primitive of \(u\, e^{-u}\). The method of integration by parts, also known as partial integration, had also done the job. This method is based on the product rule for differentiation, which is formulated in terms of differentials as \[f(x)\, \dd\bigl(g(x)\bigr)= \dd\bigl(f(x)g(x)\bigr)-g(x)\,\dd\bigl(f(x)\bigr)\] that is \[f(x)\, g'(x)\,\dd x= \dd\bigl(f(x)g(x)\bigr)-g(x)\,f'(x)\,\dd x\] So the following equality is valid:
Integration by parts \[\int f(x)g'(x)\,\dd x= f(x)g(x)-\int g(x)f'(x)\,\dd x\]
If \(u=f(x)\) and \(v=g(x)\), and thus \(\dd u=f'(x)\,\dd x\) and \(\dd v=g'(x)\,\dd x\), then the above integration rule could also be written in the following way:
Integration by parts in terms of differentials \[\int u\,\dd v=uv-\int v\,\dd u\]
Calculate the following integral via integration by parts: \[\int x\,e^{-x}\,\dd x\] Worked-out solution:
Take \(u=x,\;\dd v=e^{-x}\,\dd x\). Then \(\dd u=\dd x\) and for \(v\) we may choose \(v=\int \dd v=\int e^{-x}\dd x=-e^{-x}\) because the constant of integration does not matter at this stage.
Then the following reasoning is valid: \[\begin{aligned}\int x\,e^{-x}\,\dd x&= \Biggl[\int u\,\dd v = uv-\int v\,\dd u\Biggr]\\ &\phantom{uvwxyz}\blue{\text{rule for partial integration in terms of differentials}}\\[0.25cm] &=-xe^{-x}-\int \left(-e^{-x}\right)\,\dd x\\ &\phantom{uvwxyz}\blue{\text{application of the rule for integration by parts}}\\[0.25cm] &=-xe^{-x}-e^{-x}+c\\ &\phantom{uvwxyz}\blue{\text{integration}}\\[0.25cm] &=-(x+1)e^{-x}+c \\ &\phantom{uvwxyz}\blue{\text{rewriting via factorisation}}\end{aligned}\] This example illustrates that, in partial integration, `one brings some factor of the integrand behind the \(\dd\)'. Which factor is most convenient can only be ascertained by trial and error. It is just boils down to selecting one factor and regard it as a derivative of a function, and selecting the remaining factor as a part of the integrand that is easily differentiated. One must do the selection of parts in such way that the integral on the right-hand side of the rule for integration by parts is simpler than the integral with which one began. In this example, we considered the factor \(e^{-x}\) as the one for which we could easily find an antiderivative (namely \(-e^{-x}\)) and considered the factor \(x\) as a part of the integrand with a simple derivative (namely the derivative 1). In the end, applying the rule for integration by parts we were left with an easier integral than we started with (only an exponential function remained).
Calculate the following integral via integration by parts: \[\int x\cos x\,\dd x\] Worked-out solution:
There are four choices for \(u\) and \(\dd v\) :
\[\begin{aligned} \mathit {choice\;1:}\qquad & u=1 & \text{and}\qquad & \dd v=x\cos x\, \dd x\\
\mathit {choice\;2:}\qquad & u=x\cos x & \text{and}\qquad & \dd v=\dd x\\
\mathit {choice\;3:}\qquad & u=\cos x & \text{and}\qquad & \dd v=x\, \dd x\\
\mathit {choice\;4:}\qquad & u=x& \text{and}\qquad & \dd v=\cos x\, \dd x\end{aligned}\]
The first three choices lead to integrals which we do not know how to calculate.
Choice 1: this leads to nothing, because then we must just be able calculate the requested integral.
\(\phantom{x}\)
Choice 2: Then \(\dd u=(\cos x-x\sin x)\,\dd x\) and \(v=\int \dd v=\int \dd x=x\), and so this leads to the integral \(\int x(\cos x-x\sin x)\,\dd x=\int (x\cos x-x^2\sin x)\,\dd x\). It gets more problematic.
\(\phantom{x}\)
Choice 3: Then \(\dd u=-\sin x\,\dd x\) and \(v=\int \dd v=\int x\,\dd x=\tfrac{1}{2}x^2\), and so this leads to the integral \(\int \tfrac{1}{2}x^2\sin x\,\dd x\). We still did not get closer to a solution. That only happens in choice 4.
\(\phantom{x}\)
Choice 4: Then \(\dd u=\dd x\) and \(v=\int \dd v=\int \cos x\, \dd x=\sin x\) (the constant of integration can be set to 0). According to the rule for integration by parts we find \[\begin{aligned}\int x\cos x\,\dd x&=x\sin x-\int \sin x\,\dd x\\ &\phantom{uvwxyz}\blue{\text{application of the rule for partial integration}}\\[0.25cm] &= x\sin x+\cos x+ c \\ &\phantom{uvwxyz}\blue{\text{standard integral of the sine function}}\end{aligned}\]
#\phantom{x}#
A few more examples will help you understand integration by parts.
\( \int x\, \sin (3\, x)\,\dd x={}\)\(-{{x\, \cos (3\, x)}\over{3}}+{{\sin (3 x)}\over{9}}+c\)
If \(u=x\) and \(\dd v=\sin (3 x)\,\dd x\), then \(\dd u=\dd x\) and \(v=\int \dd v=\int \sin (3 x)\,\dd x=-{{\cos (3 x)}\over{3}}\).
Via integration by parts we get:
\[\begin{aligned}\int x\, \sin (3\, x)\,\dd x&= \Biggl[\int u\,dv = uv-\int v\,\dd u\Biggr]\\ &\phantom{uvwxyz}\blue{\text{rule for partial integration in terms of differentials}}\\[0.25cm] &= x\cdot -{{\cos (3 x)}\over{3}}- \int -{{\cos (3 x)}\over{3}}\,\dd x\\ &\phantom{uvwxyz}\blue{\text{application of the rule for partial integration}} \\[0.25cm] &=-{{x\, \cos (3\, x)}\over{3}}+\int {{\cos (3 x)}\over{3}}\,\dd x\\ &\phantom{uvaxyz}\blue{\text{simplification}} \\[0.25cm] &= -{{x\, \cos (3\, x)}\over{3}}+{{\sin (3 x)}\over{9}}+c\\ &\phantom{uvaxyz}\blue{\text{calculation of the antiderivative}}\end{aligned}\]
#\phantom{x}#
Sometimes you must repeatedly apply the rule for partial integration. We give examples:
If \(u=z^2\) and \(\dd v=e^{-5z}\,\dd z\), then \(\dd u=2z\,\dd z\) and \(v=\int \dd v=\int e^{-5 z}\,\dd z=-{{1}\over{5}} e^{-5 z}\).
Via the rule for integration by parts we get: \[\begin{aligned} \int z^2 e^{-5z}\,\dd z &= \Biggl[\int u\,\dd v = uv-\int v\,\dd u\Biggr]\\ &\phantom{uvwxyz}\blue{\text{rule for partial integration in terms of differentials}}\\[0.25cm] &=-{{1}\over{5}} z^2e^{-5 z}-\int -{{1}\over{5}} e^{-5 z}\cdot 2z \,\dd z\\ &\phantom{uvwxyz}\blue{\text{application of the rule for partial integration}}\\[0.25cm] &=-{{1}\over{5}} z^2e^{-5 z}+{{2}\over{5}}\int z\,e^{-5z}\,\dd z\\ &\phantom{uvwxyz}\blue{\text{simplification}}\end{aligned}\] Perhaps you think that we have not made much progress, but the grade of the power of \(z\) in front of the exponential term is decreased by 1. We can repeat this process, until we have obtained an integral with only one exponential term. This happens in this example rather quickly: \[\begin{aligned} \int z\,e^{-5 z}\,\dd z &= -{{1}\over{5}} z\,e^{-5 z} - \int 1\cdot -{{1}\over{5}} e^{-5z}\,\dd z\\ &\phantom{uvwxyz}\blue{\text{partial integration}} \\[0.25cm] &= -{{1}\over{5}} z\,e^{-5z}+{{1}\over{5}} \int e^{-5z}\,\dd z\\ &\phantom{uvwxyz}\blue{\text{simplification}} \\[0.25cm] &= -{{1}\over{5}} z\,e^{-5z}-{{1}\over{25}} e^{-5z}\\ &\phantom{uvwxyz}\blue{\text{calculation of the antiderivative}} \\ \end{aligned}\] We leave out the constant of integration, because we add this at the final stage. In combination this yields: \[\begin{aligned}\int z^2 e^{-5z}\,\dd z&=-{{1}\over{5}} z^2e^{-5 z}+{{2}\over{5}}\left(-{{1}\over{5}} z\, e^{-5z}-{{1}\over{25}} e^{-5z}\right)\\ &\phantom{uvwxyz}\blue{\text{use of intermediate results}} \\[0.25cm] &=-{{1}\over{125}}\left(25 z^2+10 z+2\right) \e^ {- 5 z }+c\\ &\phantom{uvwxyz}\blue{\text{simplification and addition of the constant of integration}}\end{aligned}\]
#\phantom{x}#
Of course you may include the integration bounds in the calculation. A single example will suffice.
Calculate the following integral via integration by parts: \[\int_0^{\pi} t\sin(t)\,\dd t\] Worked-out solution:
The calculation goes as follows: \[\begin{aligned}\int_0^{\pi} t\sin(t)\,\dd t &= \int_0^{\pi} t\cdot\bigl(-\cos(t)\bigr)'\,\dd t\\ \\ &= \Bigl[t\cdot\bigl(-\cos(t)\bigr)\Bigr]_0^{\pi} -\int_0^{\pi} 1\cdot\bigl(-\cos(t)\bigr)\,\dd t\\ \\ &=\Bigl[-t\cos(t)\Bigl]_0^{\pi} +\int_0^{\pi} \cos(t)\,\dd t \\ \\ &=\Bigl[-t\cos(t)+\sin(t)\Bigl]_0^{\pi} \\ \\ &= \pi\end{aligned}\]
#\phantom{x}#
Mathcentre video
Integration by Parts (26:12)