2.3 Integration by parts

From Förberedande kurs i matematik 2

(Difference between revisions)
Jump to: navigation, search
Current revision (08:25, 17 September 2008) (edit) (undo)
m (Robot: Automated text replacement (-{{Fristående formel +{{Displayed math))
 
(9 intermediate revisions not shown.)
Line 2: Line 2:
{| border="0" cellspacing="0" cellpadding="0" height="30" width="100%"
{| border="0" cellspacing="0" cellpadding="0" height="30" width="100%"
| style="border-bottom:1px solid #797979" width="5px" |  
| style="border-bottom:1px solid #797979" width="5px" |  
-
{{Mall:Vald flik|[[2.3 Partiell integrering|Teori]]}}
+
{{Selected tab|[[2.3 Integration by parts|Theory]]}}
-
{{Mall:Ej vald flik|[[2.3 Övningar|Övningar]]}}
+
{{Not selected tab|[[2.3 Exercises|Exercises]]}}
| style="border-bottom:1px solid #797979" width="100%"|  
| style="border-bottom:1px solid #797979" width="100%"|  
|}
|}
{{Info|
{{Info|
-
'''Innehåll:'''
+
'''Contents:'''
-
* Partiell integration.
+
* Integration by parts.
}}
}}
{{Info|
{{Info|
-
'''Lärandemål:'''
+
'''Learning outcomes:'''
-
Efter detta avsnitt ska du ha lärt dig att:
+
After this section, you will have learned to:
-
* Förstå härledningen av formeln för partiell integration.
+
* Understand the derivation of the formula for integration by parts.
-
* Lösa integrationsproblem som kräver partiell integration i ett eller två steg.
+
* Solve problems about integration that require integration by parts, followed by a substitution (or vice versa).
-
* Lösa integrationsproblem som kräver partiell integration följt av en substitution (eller tvärt om).
+
}}
}}
-
== Partiell integration ==
+
== Integration by parts ==
-
Vid integrering av produkter kan man ibland använda sig av en metod som kallas ''partiell integration''. Metoden bygger på att man använder deriveringsregeln för produkter baklänges. Om <math>f</math> och <math>g</math> är två deriverbara funktioner så gäller enligt produktregeln att
+
To integrate products, one sometimes can make use of a method known as ''integration by parts''. The method is based on the reverse use of the rules for differentiation of products. If <math>f</math> and <math>g</math> are two differentiable functions then the rule for products gives
-
{{Fristående formel||<math>D\,(\,f\cdot g) = f^{\,\prime} \cdot g + f \cdot g'\,\mbox{.}</math>}}
+
{{Displayed math||<math>D\,(\,f\cdot g) = f^{\,\prime} \cdot g + f \cdot g'\,\mbox{.}</math>}}
-
Om man nu integrerar båda leden får man
+
Now if one integrates both sides one gets
-
{{Fristående formel||<math>f \cdot g = \int (\,f^{\,\prime} \cdot g + f \cdot g'\,)\,dx = \int f^{\,\prime} \cdot g\,dx + \int f\cdot g'\,dx</math>}}
+
{{Displayed math||<math>f \cdot g = \int (\,f^{\,\prime} \cdot g + f \cdot g'\,)\,dx = \int f^{\,\prime} \cdot g\,dx + \int f\cdot g'\,dx</math>}}
-
eller efter ommöblering
+
or after re-ordering
-
{{Fristående formel||<math>\int f^{\,\prime} \cdot g\,dx = f \cdot g - \int f \cdot g'\,dx\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int f^{\,\prime} \cdot g\,dx = f \cdot g - \int f \cdot g'\,dx\,\mbox{.}</math>}}
-
Detta ger oss formeln för partiell integration.
+
This gives us the formula for integration by parts.
<div class="regel">
<div class="regel">
-
'''Partiell integration:'''
+
'''Integration by parts:'''
-
{{Fristående formel||<math>\int f(x)\cdot g(x)\,dx = F(x) \cdot g(x) - \int F(x) \cdot g'(x)\,dx\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int f(x)\cdot g(x)\,dx = F(x) \cdot g(x) - \int F(x) \cdot g'(x)\,dx\,\mbox{.}</math>}}
</div>
</div>
-
Detta innebär i praktiken att man integrerar en produkt av funktioner genom att kalla den ena faktorn <math>f</math> och den andra <math>g</math>, varefter man byter ut integralen <math>\,\int f \cdot g\,dx\ </math> mot den förhoppningsvis enklare integralen <math>\,\int F \cdot g'\,dx\,\mbox{,}\ </math> där <math>F</math> är en primitiv funktion till <math>f</math> och <math>g'</math> är derivatan av <math>g</math>.
+
This means in practice that one integrates a product of functions by calling one factor <math>f</math> and the other <math>g</math>, and then replaces the integral <math>\,\int f \cdot g\,dx\ </math>, hopefully, by an easier integral <math>\,\int F \cdot g'\,dx\,\mbox{,}\ </math> where <math>F</math> is a primitive function of <math>f</math> and <math>g'</math> is the derivative of <math>g</math>.
-
Det är viktigt att påpeka att metoden inte alltid leder till en integral som är lättare än den ursprungliga. Det kan också vara helt avgörande hur man väljer funktionerna <math>f</math> och <math>g</math>, vilket följande exempel visar.
+
It is important to note that the method does not always lead to an integral which is easier than the original. It may also be crucial how one chooses the functions <math>f</math> and <math>g</math>, as the following example shows.
<div class="exempel">
<div class="exempel">
-
'''Exempel 1'''
+
''' Example 1'''
-
Bestäm integralen <math>\,\int x \cdot \sin x \, dx\,</math>.
+
Determine the integral <math>\,\int x \cdot \sin x \, dx\,</math>.
<br>
<br>
<br>
<br>
-
Om man väljer <math>f=x</math> och <math>g=\sin x</math> får man <math>F=x^2/2</math> och <math>g'=\cos x</math>, och enligt formeln för partiell integration
+
If one chooses <math>f=x</math> and <math>g=\sin x</math> one gets <math>F=x^2/2</math> and <math>g'=\cos x</math>, and the formula for integration by parts gives
-
{{Fristående formel||<math>\int x \cdot \sin x \, dx = \frac{x^2}{2} \cdot \sin x - \int \frac{x^2}{2} \cdot \cos x \, dx\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int x \cdot \sin x \, dx = \frac{x^2}{2} \cdot \sin x - \int \frac{x^2}{2} \cdot \cos x \, dx\,\mbox{.}</math>}}
-
Den nya integralen i högerledet är i detta fall inte enklare än den ursprungliga integralen.
+
The new integral on the right-hand side in this case is not easier than the original integral.
-
Om man i stället väljer <math>f=\sin x</math> och <math>g=x</math> får man <math>F=-\cos x</math> och <math>g'=1</math>, och
+
If, instead, one chooses <math>f=\sin x</math> and <math>g=x</math> then <math>F=-\cos x</math> and <math>g'=1</math>, and
-
{{Fristående formel||<math>\int x \cdot \sin x \, dx = - x \cdot \cos x - \int - 1 \cdot \cos x \, dx = - x\cos x + \sin x + C\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int x \cdot \sin x \, dx = - x \cdot \cos x - \int - 1 \cdot \cos x \, dx = - x\cos x + \sin x + C\,\mbox{.}</math>}}
</div>
</div>
<div class="exempel">
<div class="exempel">
-
'''Exempel 2'''
+
''' Example 2'''
-
Bestäm integralen <math>\ \int x^2 \cdot \ln x \, dx\,</math>.
+
Determine the integral <math>\ \int x^2 \cdot \ln x \, dx\,</math>.
<br>
<br>
<br>
<br>
-
Sätt <math>f=x^2</math> och <math>g=\ln x</math> eftersom då deriverar vi bort logaritmfunktionen när vi utför en partiell integrering: <math>F=x^3/3</math> och <math>g'=1/x</math>. Detta ger oss alltså att
+
Put <math>f=x^2</math> and <math>g=\ln x</math> since differentiation eliminates the logarithm when we carry out an integration by parts: <math>F=x^3/3</math> and <math>g'=1/x</math>. This gives us that
-
{{Fristående formel||<math>\begin{align*}\int x^2 \cdot \ln x \, dx &= \frac {x^3}{3} \cdot \ln x - \int \frac{x^3}{3} \cdot \frac{1}{x} \, dx = \frac {x^3}{3} \cdot \ln x - \frac{1}{3} \int x^2 \, dx\\[4pt] &= \frac{x^3}{3} \cdot \ln x - \frac{1}{3} \cdot \frac{x^3}{3} + C = \tfrac{1}{3}x^3 ( \ln x - \tfrac{1}{3} ) + C\,\mbox{.}\end{align*}</math>}}
+
{{Displayed math||<math>\begin{align*}\int x^2 \cdot \ln x \, dx &= \frac {x^3}{3} \cdot \ln x - \int \frac{x^3}{3} \cdot \frac{1}{x} \, dx = \frac {x^3}{3} \cdot \ln x - \frac{1}{3} \int x^2 \, dx\\[4pt] &= \frac{x^3}{3} \cdot \ln x - \frac{1}{3} \cdot \frac{x^3}{3} + C = \tfrac{1}{3}x^3 ( \ln x - \tfrac{1}{3} ) + C\,\mbox{.}\end{align*}</math>}}
</div>
</div>
<div class="exempel">
<div class="exempel">
-
'''Exempel 3'''
+
''' Example 3'''
-
Bestäm integralen <math>\ \int x^2 e^x \, dx\,</math>.
+
Determine the integral <math>\ \int x^2 e^x \, dx\,</math>.
<br>
<br>
<br>
<br>
-
Sätt <math>f=e^x</math> och <math>g=x^2</math>, vilket ger att <math>F=e^x</math> och <math>g'=2x</math>, och en partiell integrering ger att
+
Put <math>f=e^x</math> and <math>g=x^2</math>, which gives that <math>F=e^x</math> and <math>g'=2x</math>, and an integration by parts gives
-
{{Fristående formel||<math> \int x^2 e^x \, dx = x^2 e^x - \int 2x\,e^x \, dx\,\mbox{.}</math>}}
+
{{Displayed math||<math> \int x^2 e^x \, dx = x^2 e^x - \int 2x\,e^x \, dx\,\mbox{.}</math>}}
-
Här krävs ytterligare partiell integration för att lösa den nya integralen <math>\,\int 2x\,e^x \, dx</math>. Vi väljer i detta fall <math>f=e^x</math> och <math>g=2x</math>, vilket ger att <math>F=e^x</math> och <math>g'=2</math>
+
This requires further integration by parts to solve the new integral <math>\,\int 2x\,e^x \, dx</math>. We choose in this case <math>f=e^x</math> and <math>g=2x</math>, which gives <math>F=e^x</math> and <math>g'=2</math>
-
{{Fristående formel||<math>\int 2x\,e^x \, dx = 2x\,e^x - \int 2 e^x \, dx = 2x\,e^x - 2 e^x + C\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int 2x\,e^x \, dx = 2x\,e^x - \int 2 e^x \, dx = 2x\,e^x - 2 e^x + C\,\mbox{.}</math>}}
-
Den ursprungliga integralen blir alltså
+
The original integral thus becomes
-
{{Fristående formel||<math> \int x^2 e^x \, dx = x^2 e^x - 2x\,e^x + 2 e^x + C\,\mbox{.}</math>}}
+
{{Displayed math||<math> \int x^2 e^x \, dx = x^2 e^x - 2x\,e^x + 2 e^x + C\,\mbox{.}</math>}}
</div>
</div>
<div class="exempel">
<div class="exempel">
-
'''Exempel 4'''
+
''' Example 4'''
-
Bestäm integralen <math>\ \int e^x \cos x \, dx\,</math>.
+
Determine the integral <math>\ \int e^x \cos x \, dx\,</math>.
<br>
<br>
<br>
<br>
-
I en första partiell integrering väljer vi att integrera faktorn <math>e^x</math> och derivera faktorn <math>\cos x</math>,
+
In a first integration by parts, we have chosen to integrate the factor <math>e^x</math> and differentiate the factor <math>\cos x</math>,
-
{{Fristående formel||<math>\begin{align*}\int e^x \cos x \, dx &= e^x \cdot \cos x - \int e^x \cdot(-\sin x) \, dx\\[10pt] &= e^x \cos x + \int e^x \sin x \, dx\,\mbox{.}\end{align*}</math>}}
+
{{Displayed math||<math>\begin{align*}\int e^x \cos x \, dx &= e^x \cdot \cos x - \int e^x \cdot(-\sin x) \, dx\\[10pt] &= e^x \cos x + \int e^x \sin x \, dx\,\mbox{.}\end{align*}</math>}}
-
Resultatet blev att vi väsentligen bytte ut faktorn <math>\cos x</math> mot <math>\sin x</math> i integralen. Om vi därför partialintegrerar en gång till (integrera <math>e^x</math> och derivera <math>\sin x</math>) då får vi att
+
The result of this is that we essentially have replaced the factor <math>\cos x</math> by <math>\sin x</math> in the integral. If we therefore use integration by parts once again (integrate the <math>e^x</math> and differentiate the <math>\sin x</math>) we get
-
{{Fristående formel||<math>\int e^x \sin x \, dx = e^x \sin x - \int e^x \cos x \, dx\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int e^x \sin x \, dx = e^x \sin x - \int e^x \cos x \, dx\,\mbox{.}</math>}}
-
Den ursprungliga integralen dyker här alltså upp igen. Vi får sammantaget:
+
Thus the original integral appears here again. Summarising we have:
-
{{Fristående formel||<math>\int e^x \cos x \, dx = e^x \cos x + e^x \sin x - \int e^x \cos x \, dx</math>}}
+
{{Displayed math||<math>\int e^x \cos x \, dx = e^x \cos x + e^x \sin x - \int e^x \cos x \, dx</math>}}
-
och samlar vi integralerna i ena ledet fås att
+
and collecting the integrals to one side gives
-
{{Fristående formel||<math>\int e^x \cos x \, dx = {\textstyle\frac{1}{2}}e^x ( \cos x + \sin x) + C\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int e^x \cos x \, dx = {\textstyle\frac{1}{2}}e^x ( \cos x + \sin x) + C\,\mbox{.}</math>}}
-
 
+
-
Trots att de partiella integrationerna i detta fall inte ledde till någon enklare integral kom vi alltså fram till en ekvation där den ursprungliga integralen kunde ”lösas ut”. Detta är inte helt ovanligt när integranden är en produkt av trigonometriska funktioner och/eller exponentialfunktioner.
+
 +
Although integration by parts in this case did not lead to an easier integral, we arrived at an equation in which the original integral could be ”solved for”. This is not entirely unusual when the integrand is a product of trigonometric functions and / or exponential functions.
</div>
</div>
<div class="exempel">
<div class="exempel">
-
'''Exempel 5'''
+
''' Example 5'''
-
Beräkna integralen <math>\ \int_{0}^{1} \frac{2x}{e^x} \, dx\,</math>.
+
Determine the integral <math>\ \int_{0}^{1} \frac{2x}{e^x} \, dx\,</math>.
<br>
<br>
<br>
<br>
-
Integralen kan skrivas om som
+
The integral can be rewritten as
-
{{Fristående formel||<math>\int_{0}^{1} \frac{2x}{e^x} \, dx = \int_{0}^{1} 2x \cdot e^{-x} \, dx\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int_{0}^{1} \frac{2x}{e^x} \, dx = \int_{0}^{1} 2x \cdot e^{-x} \, dx\,\mbox{.}</math>}}
-
Sätt nu <math>f=e^{-x}</math> och <math>g=2x</math>, och partialintegrera
+
Substitute <math>f=e^{-x}</math> and <math>g=2x</math>, and integrate by parts
-
{{Fristående formel||<math>\begin{align*}\int_{0}^{1} 2x \cdot e^{-x} \, dx &= \Bigl[\,-2x\,e^{-x}\,\Bigr]_{0}^{1} + \int_{0}^{1} 2 e^{-x}\,dx\\[4pt] &= \Bigl[\,-2x e^{-x}\,\Bigr]_{0}^{1} + \Bigl[\,-2 e^{-x}\, \Bigr]_{0}^{1}\\[4pt] &= (-2 \cdot e^{-1}) - 0 + (- 2\cdot e^{-1}) - (-2)\\[4pt] &= - \frac{2}{e} - \frac{2}{e} + 2 = 2 - \frac{4}{e}\,\mbox{.}\end{align*}</math>}}
+
{{Displayed math||<math>\begin{align*}\int_{0}^{1} 2x \cdot e^{-x} \, dx &= \Bigl[\,-2x\,e^{-x}\,\Bigr]_{0}^{1} + \int_{0}^{1} 2 e^{-x}\,dx\\[4pt] &= \Bigl[\,-2x e^{-x}\,\Bigr]_{0}^{1} + \Bigl[\,-2 e^{-x}\, \Bigr]_{0}^{1}\\[4pt] &= (-2 \cdot e^{-1}) - 0 + (- 2\cdot e^{-1}) - (-2)\\[4pt] &= - \frac{2}{e} - \frac{2}{e} + 2 = 2 - \frac{4}{e}\,\mbox{.}\end{align*}</math>}}
</div>
</div>
<div class="exempel">
<div class="exempel">
-
'''Exempel 6'''
+
''' Example 6'''
-
Beräkna integralen <math>\ \int \ln \sqrt{x} \ dx\,</math>.
+
Determine the integral <math>\ \int \ln \sqrt{x} \ dx\,</math>.
<br>
<br>
<br>
<br>
-
Vi utför först en variabelsubstitution <math>u=\sqrt{x}</math> vilket ger att <math>du=dx/2\sqrt{x} = dx/2u</math>, dvs., <math>dx = 2u\,du\,</math>,
+
We start by performing a variable substitution <math>u=\sqrt{x}</math> which gives <math>du=dx/2\sqrt{x} = dx/2u</math>, that is, <math>dx = 2u\,du\,</math>,
-
{{Fristående formel||<math>\int \ln \sqrt{x} \, dx = \int \ln u \cdot 2u \, du\,\mbox{.}</math>}}
+
{{Displayed math||<math>\int \ln \sqrt{x} \, dx = \int \ln u \cdot 2u \, du\,\mbox{.}</math>}}
-
Sedan partialintegrerar vi. Sätt <math>f=2u</math> och <math>g=\ln u</math>, vilket ger att
+
Then we integrate by parts. Put <math>f=2u</math> and <math>g=\ln u</math>, which gives
-
{{Fristående formel||<math>\begin{align*}\int \ln u \cdot 2u \, du &= u^2 \ln u - \int u^2 \cdot \frac{1}{u} \, du = u^2 \ln u - \int u\, du\\[4pt] &= u^2 \ln u - \frac{u^2}{2} + C = x \ln \sqrt{x} - \frac {x}{2} + C\\[4pt] &= x \bigl( \ln \sqrt{x} - \tfrac{1}{2} \bigr) + C\,\mbox{.}\end{align*}</math>}}
+
{{Displayed math||<math>\begin{align*}\int \ln u \cdot 2u \, du &= u^2 \ln u - \int u^2 \cdot \frac{1}{u} \, du = u^2 \ln u - \int u\, du\\[4pt] &= u^2 \ln u - \frac{u^2}{2} + C = x \ln \sqrt{x} - \frac {x}{2} + C\\[4pt] &= x \bigl( \ln \sqrt{x} - \tfrac{1}{2} \bigr) + C\,\mbox{.}\end{align*}</math>}}
-
''Anm.'' Ett alternativt tillvägagångssätt är att skriva om den ursprungliga integranden som <math>\ln\sqrt{x} = \tfrac{1}{2}\ln x</math> och sedan partialintegrera produkten <math>\tfrac{1}{2}\cdot\ln x</math>.
+
''Note.'' An alternative approach is to rewrite the initial integrand as <math>\ln\sqrt{x} = \tfrac{1}{2}\ln x</math> and then integrate by parts the product <math>\tfrac{1}{2}\cdot\ln x</math>.
</div>
</div>

Current revision

       Theory          Exercises      

Contents:

  • Integration by parts.

Learning outcomes:

After this section, you will have learned to:

  • Understand the derivation of the formula for integration by parts.
  • Solve problems about integration that require integration by parts, followed by a substitution (or vice versa).

Integration by parts

To integrate products, one sometimes can make use of a method known as integration by parts. The method is based on the reverse use of the rules for differentiation of products. If \displaystyle f and \displaystyle g are two differentiable functions then the rule for products gives

\displaystyle D\,(\,f\cdot g) = f^{\,\prime} \cdot g + f \cdot g'\,\mbox{.}

Now if one integrates both sides one gets

\displaystyle f \cdot g = \int (\,f^{\,\prime} \cdot g + f \cdot g'\,)\,dx = \int f^{\,\prime} \cdot g\,dx + \int f\cdot g'\,dx

or after re-ordering

\displaystyle \int f^{\,\prime} \cdot g\,dx = f \cdot g - \int f \cdot g'\,dx\,\mbox{.}

This gives us the formula for integration by parts.

Integration by parts:

\displaystyle \int f(x)\cdot g(x)\,dx = F(x) \cdot g(x) - \int F(x) \cdot g'(x)\,dx\,\mbox{.}

This means in practice that one integrates a product of functions by calling one factor \displaystyle f and the other \displaystyle g, and then replaces the integral \displaystyle \,\int f \cdot g\,dx\ , hopefully, by an easier integral \displaystyle \,\int F \cdot g'\,dx\,\mbox{,}\ where \displaystyle F is a primitive function of \displaystyle f and \displaystyle g' is the derivative of \displaystyle g.


It is important to note that the method does not always lead to an integral which is easier than the original. It may also be crucial how one chooses the functions \displaystyle f and \displaystyle g, as the following example shows.

Example 1

Determine the integral \displaystyle \,\int x \cdot \sin x \, dx\,.

If one chooses \displaystyle f=x and \displaystyle g=\sin x one gets \displaystyle F=x^2/2 and \displaystyle g'=\cos x, and the formula for integration by parts gives

\displaystyle \int x \cdot \sin x \, dx = \frac{x^2}{2} \cdot \sin x - \int \frac{x^2}{2} \cdot \cos x \, dx\,\mbox{.}

The new integral on the right-hand side in this case is not easier than the original integral.

If, instead, one chooses \displaystyle f=\sin x and \displaystyle g=x then \displaystyle F=-\cos x and \displaystyle g'=1, and

\displaystyle \int x \cdot \sin x \, dx = - x \cdot \cos x - \int - 1 \cdot \cos x \, dx = - x\cos x + \sin x + C\,\mbox{.}

Example 2

Determine the integral \displaystyle \ \int x^2 \cdot \ln x \, dx\,.

Put \displaystyle f=x^2 and \displaystyle g=\ln x since differentiation eliminates the logarithm when we carry out an integration by parts: \displaystyle F=x^3/3 and \displaystyle g'=1/x. This gives us that

\displaystyle \begin{align*}\int x^2 \cdot \ln x \, dx &= \frac {x^3}{3} \cdot \ln x - \int \frac{x^3}{3} \cdot \frac{1}{x} \, dx = \frac {x^3}{3} \cdot \ln x - \frac{1}{3} \int x^2 \, dx\\[4pt] &= \frac{x^3}{3} \cdot \ln x - \frac{1}{3} \cdot \frac{x^3}{3} + C = \tfrac{1}{3}x^3 ( \ln x - \tfrac{1}{3} ) + C\,\mbox{.}\end{align*}

Example 3

Determine the integral \displaystyle \ \int x^2 e^x \, dx\,.

Put \displaystyle f=e^x and \displaystyle g=x^2, which gives that \displaystyle F=e^x and \displaystyle g'=2x, and an integration by parts gives

\displaystyle \int x^2 e^x \, dx = x^2 e^x - \int 2x\,e^x \, dx\,\mbox{.}

This requires further integration by parts to solve the new integral \displaystyle \,\int 2x\,e^x \, dx. We choose in this case \displaystyle f=e^x and \displaystyle g=2x, which gives \displaystyle F=e^x and \displaystyle g'=2

\displaystyle \int 2x\,e^x \, dx = 2x\,e^x - \int 2 e^x \, dx = 2x\,e^x - 2 e^x + C\,\mbox{.}

The original integral thus becomes

\displaystyle \int x^2 e^x \, dx = x^2 e^x - 2x\,e^x + 2 e^x + C\,\mbox{.}

Example 4

Determine the integral \displaystyle \ \int e^x \cos x \, dx\,.

In a first integration by parts, we have chosen to integrate the factor \displaystyle e^x and differentiate the factor \displaystyle \cos x,

\displaystyle \begin{align*}\int e^x \cos x \, dx &= e^x \cdot \cos x - \int e^x \cdot(-\sin x) \, dx\\[10pt] &= e^x \cos x + \int e^x \sin x \, dx\,\mbox{.}\end{align*}

The result of this is that we essentially have replaced the factor \displaystyle \cos x by \displaystyle \sin x in the integral. If we therefore use integration by parts once again (integrate the \displaystyle e^x and differentiate the \displaystyle \sin x) we get

\displaystyle \int e^x \sin x \, dx = e^x \sin x - \int e^x \cos x \, dx\,\mbox{.}

Thus the original integral appears here again. Summarising we have:

\displaystyle \int e^x \cos x \, dx = e^x \cos x + e^x \sin x - \int e^x \cos x \, dx

and collecting the integrals to one side gives

\displaystyle \int e^x \cos x \, dx = {\textstyle\frac{1}{2}}e^x ( \cos x + \sin x) + C\,\mbox{.}

Although integration by parts in this case did not lead to an easier integral, we arrived at an equation in which the original integral could be ”solved for”. This is not entirely unusual when the integrand is a product of trigonometric functions and / or exponential functions.

Example 5

Determine the integral \displaystyle \ \int_{0}^{1} \frac{2x}{e^x} \, dx\,.

The integral can be rewritten as

\displaystyle \int_{0}^{1} \frac{2x}{e^x} \, dx = \int_{0}^{1} 2x \cdot e^{-x} \, dx\,\mbox{.}

Substitute \displaystyle f=e^{-x} and \displaystyle g=2x, and integrate by parts

\displaystyle \begin{align*}\int_{0}^{1} 2x \cdot e^{-x} \, dx &= \Bigl[\,-2x\,e^{-x}\,\Bigr]_{0}^{1} + \int_{0}^{1} 2 e^{-x}\,dx\\[4pt] &= \Bigl[\,-2x e^{-x}\,\Bigr]_{0}^{1} + \Bigl[\,-2 e^{-x}\, \Bigr]_{0}^{1}\\[4pt] &= (-2 \cdot e^{-1}) - 0 + (- 2\cdot e^{-1}) - (-2)\\[4pt] &= - \frac{2}{e} - \frac{2}{e} + 2 = 2 - \frac{4}{e}\,\mbox{.}\end{align*}

Example 6

Determine the integral \displaystyle \ \int \ln \sqrt{x} \ dx\,.

We start by performing a variable substitution \displaystyle u=\sqrt{x} which gives \displaystyle du=dx/2\sqrt{x} = dx/2u, that is, \displaystyle dx = 2u\,du\,,

\displaystyle \int \ln \sqrt{x} \, dx = \int \ln u \cdot 2u \, du\,\mbox{.}

Then we integrate by parts. Put \displaystyle f=2u and \displaystyle g=\ln u, which gives

\displaystyle \begin{align*}\int \ln u \cdot 2u \, du &= u^2 \ln u - \int u^2 \cdot \frac{1}{u} \, du = u^2 \ln u - \int u\, du\\[4pt] &= u^2 \ln u - \frac{u^2}{2} + C = x \ln \sqrt{x} - \frac {x}{2} + C\\[4pt] &= x \bigl( \ln \sqrt{x} - \tfrac{1}{2} \bigr) + C\,\mbox{.}\end{align*}

Note. An alternative approach is to rewrite the initial integrand as \displaystyle \ln\sqrt{x} = \tfrac{1}{2}\ln x and then integrate by parts the product \displaystyle \tfrac{1}{2}\cdot\ln x.