Integration Techniques
Dodges. A great part of the labour of integrating things consists in licking them into some shape that can be integrated. The books—and by this is meant the serious books—on the Integral Calculus are full of plans and methods and dodges and artifices for this kind of work. The following are a few of them.
Integration by Parts
This name is given to a dodge, the formula for which is \[\bbox[5px,border:1px solid black;background-color:#f2f2f2]{\int u\, dv = uv - \int v\, du + C.}\] It is useful in some cases that you can’t tackle directly, for it shows that if in any case \(\displaystyle \int v\, du\) can be found, then \(\displaystyle \int u\, dv\) can also be found. The formula can be deduced as follows. We have, \[d(uv) = u\, dv + v\, du,\] which may be written \[u\,dv = d(uv) - v\, du,\] which by direct integration gives the above expression.
Examples
Example 20.1. Find \(\displaystyle \int w \cdot \sin w\, dw\).
Solution. Write \(u = w\), and for \(\sin w \cdot dw\) write \(dv\). We shall then have \(du = dw\), while \(\displaystyle \int \sin w \cdot dw = -\cos w = v\).
Putting these into the formula, we get \[\begin{align} \int \overbrace{w}^u \cdot \overbrace{\sin w\, dw}^{dv}&= \overbrace{w(-\cos w)}^{uv} - \int \overbrace{-\cos w}^v\, \overbrace{dw}^{du} \\ &=-w \cos w + \sin w + C. \end{align}\]
Example 20.2. Find \(\displaystyle \int x e^x\, dx\).
Solution. Write \[\begin{align} u &= x, & e^x\, dx&=dv; \\ \end{align}\] then \[\begin{align} du &= dx, & v &=e^x, \end{align}\] and \[\begin{align} \int xe^x\, dx &= xe^x - \int e^x\, dx &&\text{(by the formula)} \\ &= x e^x - e^x+C \\ &= e^x(x-1) + C. \end{align}\]
Example 20.3. Try \(\displaystyle \int \cos^2 \theta\, d\theta\).
Solution. \[\begin{align} u &= \cos \theta, &\cos \theta\, d\theta &= dv. \end{align}\] Hence \[\begin{align} du&= -\sin \theta\, d\theta, & v &=\sin \theta, \end{align}\] \[\begin{align} \int \cos^2 \theta\, d\theta &= \cos \theta \sin \theta+ \int \sin^2 \theta\, d\theta \\ &= \frac{2 \cos\theta \sin\theta}{2} +\int(1-\cos^2 \theta)\, d\theta \\ &= \frac{\sin 2\theta}{2} + \int d\theta - \int \cos^2 \theta\, d\theta. \end{align}\] Hence \[\begin{align} 2 \int \cos^2 \theta\, d\theta &= \frac{\sin 2\theta}{2} + \theta+C \end{align}\] and \[\begin{align} \int \cos^2 \theta\, d\theta &= \frac{\sin 2\theta}{4} + \frac{\theta}{2} + C^\prime. \end{align}\] where \(C^\prime=C/2\).
Example 20.4. Find \(\displaystyle \int x^2 \sin x\, dx\).
Solution. Write \[\begin{align} x^2 &= u, & \sin x\, dx &= dv; \end{align}\] then \[\begin{align} du &= 2x\, dx, & v &= -\cos x, \end{align}\] \[\int x^2 \sin x\, dx = -x^2 \cos x + 2 \int x \cos x\, dx.\]
Now find \(\displaystyle \int x \cos x\, dx\), integrating by parts (as in Example 20.1 above): \[\int x \cos x\, dx = x \sin x + \cos x+C.\]
Hence \[\begin{align} \int x^2 \sin x\, dx &= -x^2 \cos x + 2x \sin x + 2 \cos x + C' \\ &= 2 \left[ x \sin x + \cos x \left(1 - \frac{x^2}{2}\right) \right] +C'. \end{align}\]
Example 20.5. Find \(\displaystyle \int \sqrt{1-x^2}\, dx\).
Solution. Write \[\begin{align} u &= \sqrt{1-x^2},\qquad dx=dv; \end{align}\] then \[\begin{align} du &= -\frac{x\, dx}{\sqrt{1-x^2}}\qquad \text{(Use the Chain Rule)} \end{align}\] and \(x=v\); so that \[\int \sqrt{1-x^2}\, dx=x \sqrt{1-x^2} + \int \frac{x^2\, dx}{\sqrt{1-x^2}}.\]
Here we may use a little dodge, for we can write \[\int \sqrt{1-x^2}\, dx = \int \frac{(1-x^2)\, dx}{\sqrt{1-x^2}} = \int \frac{dx}{\sqrt{1-x^2}} - \int \frac{x^2\, dx}{\sqrt{1-x^2}}.\]
Adding these two last equations, we get rid of \(\displaystyle \int \dfrac{x^2\, dx}{\sqrt{1-x^2}}\), and we have \[2 \int \sqrt{1-x^2}\, dx = x\sqrt{1-x^2} + \int \frac{dx}{\sqrt{1-x^2}}.\]
Do you remember meeting \(\dfrac {dx}{\sqrt{1-x^2}}\)? it is got by differentiating \(y=\arcsin x\), also written as \(y=\sin^{-1}x\) (see here); hence its integral is \(\arcsin x\), and so \[\int \sqrt{1-x^2}\, dx = \frac{x \sqrt{1-x^2}}{2} + \frac{1}{2} \arcsin x +C.\]
You can try now some exercises by yourself; you will find some at the end of this chapter.
Substitution
This is the same dodge (the Chain Rule) as explained in the chapter on the Chain Rule. Let us illustrate its application to integration by a few examples.
Example 20.6. Evaluate \(\displaystyle \int \sqrt{3+x}\, dx\).
Solution. Let \[\begin{align} 3+x &= u,\quad dx = du; \end{align}\] replace \[\begin{align} \int u^{\frac{1}{2}}\, du &= \frac{2}{3} u^{\frac{3}{2}} +C = \frac{2}{3}(3+x)^{\frac{3}{2}}+C. \end{align}\]
Example 20.7. Evaluate \(\displaystyle\int \dfrac{dx}{e^x+e^{-x}}\).1
Solution. Let \[e^x = u,\quad \frac{du}{dx} = e^x,\quad\text{and}\quad dx = \frac{du}{e^x};\] so that \[\begin{align} \int \frac{dx}{e^x+e^{-x}} = \int \frac{du}{e^x(e^x+e^{-x})} = \int \frac{du}{u\left(u + \dfrac{1}{u}\right)} = \int \frac{du}{u^2+1}. \end{align}\]
\(\dfrac{du}{1+u^2}\) is the result of differentiating \(\arctan x\) (also written as \(\tan^{-1} x\)).
Hence the integral is \(\arctan\left(e^x\right)+C\).
Example 20.8. Evaluate \(\displaystyle \int \dfrac{dx}{x^2+2x+3}\).
Solution. \[\int \dfrac{dx}{x^2+2x+3} = \int \dfrac{dx}{x^2+2x+1+2} = \int \dfrac{dx}{(x+1)^2+(\sqrt 2)^2}\] Let \[x+1=u,\quad dx=du;\] then the integral becomes \(\displaystyle \int \dfrac{du}{u^2+(\sqrt2)^2}\); but \(\dfrac{du}{u^2+a^2}\) is the result of differentiating \(\dfrac{1}{a} \arctan \dfrac{u}{a}\).
Hence one has finally \(\dfrac{1}{\sqrt2} \arctan \dfrac{x+1}{\sqrt 2}+C\) for the value of the given integral.
Partial Fractions
The following examples show how the process of splitting into partial fractions, which we learned in Chapter [partfracs2], can be made use of in integration.
Example 20.9. Evaluate \(\displaystyle \int \frac{3x+1}{x^2-1}dx\).
Solution. In Example 13.1, we showed that \[\frac{3x+1}{x^2-1}=\frac{1}{x+1}+\frac{2}{x-1}.\] Hence \[\begin{align} \int \frac{3x+1}{x^2-1}dx&=\int \left(\frac{1}{x+1}+\frac{2}{x-1}\right)dx\\ &=\int \frac{1}{x+1} dx+2\int\frac{1}{x-1}dx\\ &=\ln|x+1|+2\ln|x-1|+C. \end{align}\]
Example 20.10. Evaluate \(\displaystyle \int \frac{-x^2-3}{(x^2+1)(x+1)} dx\).
Solution. In Example 13.3, we showed that \[\frac{-x^2-3}{(x^2+1)(x+1)}=\frac{x-1}{x^2+1}-\frac{2}{x+1}.\] Hence, \[\begin{align} \int \frac{-x^2-3}{(x^2+1)(x+1)} dx&=\int \frac{x-1}{x^2+1}dx-2\int\frac{1}{x+1}dx\\ &=\int\frac{x}{x^2+1}dx-\int\frac{1}{x^2+1}dx-2\int \frac{1}{x+1}dx \end{align}\] To find \(\displaystyle \int \frac{x}{x^2+1}dx\), let \(u=x^2+1\). Then \(du=2x\,dx\) or \(xdx=\frac{1}{2}du\) and \[\int \frac{x}{x^2+1}dx=\frac{1}{2}\int \frac{du}{u}=\frac{1}{2}\ln|u|+C_1=\frac{1}{2}\ln(x^2+1)+C_1.\]
Since \(\displaystyle \int\frac{1}{x^2+1}dx=\arctan x+C_2\) and \(\displaystyle \int\frac{1}{x+1}dx=\ln|x+1|+C_3\), we get \[\int \frac{-x^2-3}{(x^2+1)(x+1)} dx=\frac{1}{2}\ln(x^2+1)-\arctan x-2\ln|x+1|+C.\]
Formulae of Reduction
In essence, a reduction formula refers to any formula that expresses an integral in terms of a simpler or more manageable integral. Although the term can be applied to any such formula, it is typically used in reference to integrals that belong to a particular class of functions. In such cases, the formula allows us to express the integral of any member of the class in terms of one or two other integrals from the same class. By repeatedly applying this formula, we can eventually reduce the integral of any member of the class to that of the simplest member. These reduction formulas are usually derived using integration by parts.
Example 20.11. Obtain a reduction formula for \(\displaystyle \int x^n e^{ax} dx\) and use it to evaluate \(\displaystyle \int x^3 e^{-x} dx\).
Solution. Let \(u=x^n\) and \(dv=e^{ax} dx\). Then \[du=n x^{n-1} dx,\quad v=\frac{1}{a} e^{ax}.\] Using integration by parts, we get \[\begin{align} \int x^n e^{ax} dx=x^n \frac{e^{ax}}{a}-\int \frac{n}{a} e^{ax}\cdot x^{n-1} dx \end{align}\] Putting \(a=-1\) and \(n=3, 2, 1\) successively in it, we obtain \[\int x^3 e^{-x} dx=-x^3\,e^{-x}+3 \int e^{-x} x^2 dx,\tag{A}\] \[\int x^2 e^{-x} dx= -x^2 e^{-x}+2\int e^{-x} x dx,\tag{B}\] \[\int x e^{-x} dx=- x e^{-x}+\int e^{-x}=-xe^{-x} -e^{-x}+C_1.\tag{C}\] From (B) and (C), we obtain \[\int x^2 e^{-x} dx=-x^2 e^{-x}+2x\left(- e^{-x}-e^{-x}\right)+C_2, \tag{D}\] with \(C_2=2C_1\).
From (A) and (D), we obtain \[\int x^3 e^{-x} dx=-x^3 e^{-x}+3\left( -x^2 e^{-x}-2x e^{-x}-2e^{-x} \right)+C,\] with \(C=3C_2\).
Example 20.12. Obtain a reduction formula for \(\displaystyle \int \cos^n x\, dx\).
Solution. We write \[\int \cos^n\, dx=\int \cos^{n-1} x\cdot \cos x\,dx\] and let \(u=-\cos^{n-1} x\) and \(dv=\cos x\). Then \[du=(n-1)\sin x \cos^{n-2}x\, dx,\qquad v=\sin x.\] It follows integration by parts that \[\begin{align} \int \cos ^n x & d x=\sin x \cdot \cos ^{n-1} x-\int \sin x \cdot(n-1) \cos ^{n-2} x \cdot(-\sin x) d x \\ & =\sin x \cdot \cos ^{n-1} x+(n-1) \int \cos ^{n-2} x\left(1-\cos ^2 x\right) d x \\ & =\sin x \cdot \cos ^{n-1} x+(n-1) \int \cos ^{n-2} x d x-(n-1) \int \cos ^n x d x \\ \end{align}\] Hence, \[n \int \cos ^n x d x=\sin x \cos ^{n-1} x+(n-1) \int \cos ^{n-2} x\, d x,\] or \[\int \cos ^n x d x=\frac{1}{n}\sin x \cos ^{n-1} x+\frac{n-1}{n} \int \cos ^{n-2} x\, d x.\]
Rationalization and Factorization of Denominator
These are dodges applicable in special cases, but they do not admit of any short or general explanation. Much practice is needed to become familiar with these preparatory processes.
Here are a few examples.
Example 20.13. Evaluate \(\displaystyle \int \frac{1}{\sqrt{x+3}-\sqrt[4]{x+3}}dx\).
Solution. Letting \(u^4=x+3\), we get rid of the radicals. Then \[u^4=x+3\quad \Rightarrow\quad 4u^3\,du=dx\] and \[\begin{align} \int \frac{1}{\sqrt{x+3}-\sqrt[4]{x+3}}dx&=\int \frac{1}{u^2-u}\cdot 4u^3\,du\\ &=4\int \frac{u^3}{u(u-1)}du\\ &=4\int \frac{u^2}{u-1}du\\ &=4\int \frac{(u^2-1)+1}{u-1} du\\ &=4\int \left(u+1+\frac{1}{u-1}\right)du\\ &=4\left(\frac{u^2}{2}+u+\ln|u-1|\right)+C\\ &=2\sqrt{x+3}+4\sqrt[4]{x+3}+4\ln\left|\sqrt[4]{x+3}-1\right|+C. \end{align}\]
Example 20.14. Evaluate \(\displaystyle \int \frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}}\, dx\)
Solution. Multiplying both the numerator and denominator by \(\sqrt{1+x}-\sqrt{1-x}\), we get \[\begin{align} \frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}} & =\frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}}\cdot \frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}-\sqrt{1-x}} \\ &=\frac{\left(\sqrt{1+x}-\sqrt{1-x}\right)^2}{\left(\sqrt{1+x}\right)^2-\left(\sqrt{1-x}\right)^2}\\ & =\frac{(1+x)-2 \sqrt{1-x^2}+(1-x)}{(1+x)-(1-x)}\\ &=\frac{1-\sqrt{1-x^2}}{x} . \end{align}\] Hence \[\int \frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}}\ dx=\int \frac{1-\sqrt{1-x^2}}{x}\,dx.\] To evaluate the last integral and get rid of the radical, let \(u^2=1-x^2\). Then \(u\,du=-x\, dx\) and \[\begin{align} \int \frac{1-\sqrt{1-x^2}}{x^2} x\, dx & =\int \frac{1-u}{1-u^2}(-u\, du)\\ &=-\int \frac{u}{1+u}\,d u=-\int \frac{(1+u)-1}{1+u}\,d u \\ & =-\int\left(1-\frac{1}{1+u}\right) d u\\ & =-u+\ln |1+u|+C\\ &= -\sqrt{1-x^2}+\ln\left(1+\sqrt{1-x^2}\right)+C. \end{align}\]
Pitfalls. A beginner is liable to overlook certain points that a practiced hand would avoid; such as the use of factors that are equivalent to either zero or infinity, and the occurrence of indeterminate quantities such as \(\frac{0}{0}\). There is no golden rule that will meet every possible case. Nothing but practice and intelligent care will avail. An example of a pitfall which had to be circumvented arose in Chapter 18 when we came to the problem of integrating \(x^{-1}\, dx\).
Triumphs. By triumphs must be understood the successes with which the calculus has been applied to the solution of problems otherwise intractable. Often in the consideration of physical relations one is able to build up an expression for the law governing the interaction of the parts or of the forces that govern them, such expression being naturally in the form of a differential equation, that is an equation containing derivatives with or without other algebraic quantities. And when such a differential equation has been found, one can get no further until it has been integrated. Generally it is much easier to state the appropriate differential equation than to solve it:—the real trouble begins then only when one wants to integrate, unless indeed the equation is seen to possess some standard form of which the integral is known, and then the triumph is easy. The equation which results from integrating a differential equation is called2 its “solution”; and it is quite astonishing how in many cases the solution looks as if it had no relation to the differential equation of which it is the integrated form. The solution often seems as different from the original expression as a butterfly does from the caterpillar that it was. Who would have supposed that such an innocent thing as \[\dfrac{dy}{dx} = \dfrac{1}{a^2-x^2}\] could blossom out into \[y = \dfrac{1}{2a} \ln \left| \dfrac{a+x}{a-x} \right|+ C?\] yet the latter is the solution of the former.
As a last example, let us work out the above together.
By partial fractions, \[\begin{align} \frac{1}{a^2-x^2} &= \frac{1}{2a(a+x)} + \frac{1}{2a(a-x)}, \\ dy &= \frac {dx}{2a(a+x)}+ \frac{dx}{2a(a-x)}, \\ y &= \frac{1}{2a} \left( \int \frac{dx}{a+x} + \int \frac{dx}{a-x} \right) \\ &= \frac{1}{2a} \left[\ln |a+x| - \ln |a-x| \right]+C \\ &= \frac{1}{2a} \ln \left| \frac{a+x}{a-x}\right| + C. \end{align}\]
Not a very difficult metamorphosis!
Here, we have briefly surveyed some of the most important integration techniques. If you want to study various integration techniques in detail, you can refer to books like Elements of the Differential and Integral Calculus by William A. Granville or Calculus II on AdaptiveBooks.org
Exercises
Exercise 20.1. Find \(\displaystyle \int \sqrt{a^{2}-x^{2}}\, dx.\)
Answer
\(\dfrac{x\sqrt{a^2 - x^2}}{2} + \dfrac{a^2}{2} \arcsin\dfrac{x}{a} + C\).
Solution
There are various ways to evaluate this integral.
First Method: Using integration by parts:
Let \[u=\sqrt{a^{2}-x^{2}} \quad d v=d x .\] Then \[d u=-\frac{2 x}{2 \sqrt{a^{2}-x^{2}}} d x \quad v=x\]
\[\int \sqrt{a^{2}-x^{2}} d x=\underbrace{x \sqrt{a^{2}-x^{2}}}_{u v}-\int\underbrace{-\frac{x^{2}}{\sqrt{a^{2}-x^{2}}} d x}_{v d u}\]
But \[\begin{align} \int \frac{-x^{2}}{\sqrt{a^{2}-x^{2}}} d x&=\int \frac{a^{2}-x^{2}-a^{2}}{\sqrt{a^{2}-x^{2}}} d x\\ &=\int \frac{a^{2}-x^{2}}{\sqrt{a^{2}-x^{2}}} d x-\int \frac{a^{2}}{\sqrt{a^{2}-x^{2}}} d x \\ & =\int \sqrt{a^{2}-x^{2}} d x-a^{2} \int \frac{1}{\sqrt{a^{2}-x^{2}}} d x \text {. } \end{align}\]
Therefore \[\int \sqrt{a^{2}-x^{2}} d x=x \sqrt{a^{2}-x^{2}}-\int \sqrt{a^{2}-x^{2}} d x+a^{2} \int \frac{d x}{\sqrt{a^{2}-x^{2}}} d x\] Since \(\displaystyle \int \frac{d x}{\sqrt{a^{2}-x^{2}}}=\arcsin \frac{x}{a}\), we get \[\int \sqrt{a^{2}-x^{2}} d x=\frac{1}{2} x \sqrt{a^{2}-x^{2}}+\frac{a^{2}}{2} \arcsin \frac{x}{a}+C.\]
Second Method
Let \(x=a \sin \theta \quad\left(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2}\right)\). Then
\[d x=a \cos \theta d \theta\] and \[\begin{align} \int \sqrt{a^{2}-x^{2}} d x & =\int \sqrt{a^{2}-a^{2} \sin ^{2} \theta} a \cos \theta d \theta \\ & =\int a^{2} \sqrt{1-\sin ^{2} \theta} \cos \theta d \theta . \\ & =a^{2} \int \sqrt{\cos ^{2} \theta} \cos \theta d \theta \\ & =a^{2} \int \cos ^{2} \theta d \theta \end{align}\] Since \(\cos ^{2} \theta=\dfrac{1+\cos 2 \theta}{2}\), we get
\[\begin{align} & =\frac{a^{2}}{2} \int(1+\cos 2 \theta) d \theta \\ & =\frac{a^{2}}{2} \int d \theta+\frac{a^{2}}{2} \int \cos 2 \theta d \theta \\ & =\frac{a^{2}}{2} \theta+\frac{a^{2}}{4} \sin 2 \theta+C \end{align}\] [To integrate \(\cos 2 \theta\,d\theta\), let \(u=2 \theta\). Then \(d u=2 d \theta\) and \[\begin{align} \int \cos 2 \theta d \theta & =\frac{1}{2} \int \cos u d u\\ & =\frac{1}{2} \sin u+C \\ & \left.=\frac{1}{2} \sin 2 \theta+C\right] \end{align}\]
Now we need to express \(\frac{a^{2}}{2} \theta+\frac{a^{2}}{4} \sin 2 \theta+C\) in terms of \(x\).
\[x=a \sin \theta \Rightarrow \sin \theta=\frac{x}{a} \Rightarrow \theta=\arcsin \frac{x}{a}\]
and
\[\sin 2 \theta=2 \sin \theta \cos \theta=2 \sin \theta \sqrt{1-\sin ^{2} \theta}\] \(\left[\right.\)Since \(\frac{-\pi}{2} \leq \theta \leq \frac{\pi}{2}, \cos \theta \geq 0\) and thus \(\left.\cos \theta=+\sqrt{1-\sin ^{2} \theta}\right]\)
or \[\sin 2 \theta=2 \frac{x}{a} \sqrt{1-\frac{x^{2}}{a^{2}}}=\frac{2 x}{a} \frac{\sqrt{a^{2}-x^{2}}}{a}\] Therefore \[\begin{align} \int \sqrt{a^{2}-x^{2}} d x & =\frac{a^{2}}{2} \theta+\frac{a^{2}}{4} \sin 2 \theta+C \\ & =\frac{a^{2}}{2} \arcsin \frac{x}{a}+\frac{x}{2} \sqrt{a^{2}-x^{2}}+C \end{align}\]
Exercise 20.2. Find \(\displaystyle \int x \ln x d x\).
Answer
\(\dfrac{x^2}{2}\left(\ln x - \dfrac{1}{2}\right) + C\).
Solution
We need to apply integration by parts.
\[\begin{array}{ll} u=\ln x & d v=x d x \\ d u=\frac{1}{x} & v=\frac{x^{2}}{2} \end{array}\]
Therefore
\[\begin{align} & \int x \ln x d x=\underbrace{\frac{x^{2}}{2} \ln x}_{u v}-\int \underbrace{\frac{x^{2}}{2 x} d x}_{v\,du} \\ &=\frac{x^{2}}{2} \ln x-\frac{x^{2}}{4}+C. \end{align}\]
Exercise 20.3. Find \(\displaystyle \int x^{a} \ln x d x.\)
Answer
\(\dfrac{x^{a+1}}{a + 1} \left(\ln x - \dfrac{1}{a + 1}\right) + C\).
Solution
\[\begin{align} &u =\ln x \qquad &&dv=x^{a} d x \\ & du=\frac{1}{x} &&v=\frac{x^{a+1}}{a+1} &&& (a \neq-1) \end{align}\]
Therefore
\[\begin{align} \int x^{a} \ln x d x & =\frac{x^{a+1}}{a+1} \ln x-\int \frac{x^{a+1}}{(a+1) x} d x \\ & =\frac{x^{a+1}}{a+1} \ln x-\frac{x^{a+1}}{(a+1)^{2}}+C. \end{align}\]
Exercise 20.4. Find \(\displaystyle\int e^{x} \cos \left(e^{x}\right) d x.\)
Answer
\(\sin \left({e }^x\right) + C\).
Solution
Using integration by substitution
\[\begin{align} u & =e^{x} \Rightarrow d u=e^{x} d x \\ \int e^{x} \cos \left(e^{x}\right) d x & =\int \cos (\underbrace{x}_{u}) \underbrace{e^{x} d x}_{u} \\ & =\int \cos u d u \end{align}\]
\[\begin{align} & =\sin u+C \\ & =\sin \left(e^{x}\right)+C \end{align}\]
Exercise 20.5. Find \(\displaystyle \int \frac{1}{x} \cos (\ln x) d x\).
Answer
\(\sin(\ln x) + C\).
Solution
\[\begin{align} u=\ln x & \Rightarrow d u=\frac{1}{x} d x \\ \int \frac{1}{x} \cos (\ln x) d x & =\int \cos (\ln x) \frac{d x}{x} \\ & =\int \cos u d u \\ & =\sin u+C \\ & =\sin (\ln x)+C \end{align}\]
Exercise 20.6. Find \(\displaystyle \int x^{2} e^{x}\, dx\)
Answer
\({e }^x (x^2 - 2x + 2) + C\).
Solution
Using integration by parts \[\begin{array}{ll} u=x^{2} & d v=e^{x d x} \\ d u=2 x & v=e^{x} \end{array}\] Therefore \[\int x^{2} e^{x} d x=x^{2} e^{x}-\int 2 x e^{x} d x\] To evaluate \(\int x e^{x} d x\), we use integration by parts again
\[\begin{array}{rcl} U=x & &d V=e^{x} d x \\ d U=d x & &V=e^{x} \\ \end{array}\] Then \[\begin{align} \int x e^{x} d x & =x e^{x}-\int e^{x} d x \\ & =x e^{x}-e^{x}+K \end{align}\] where \(K\) is an arbitrary constant.
Thus \[\begin{align} \int x^{2} e^{x} d x & =x^{2} e^{x}-2 \int x e^{x} d x \\ & =x^{2} e^{x}-2\left[x e^{x}-e^{x}\right]+C \\ & =x^{2} e^{x}-2 x e^{x}+2 e^{x}+C \\ & =e^{x}\left(x^{2}-2 x+2\right)+C \end{align}\]
Exercise 20.7. Find \(\displaystyle \int \frac{(\ln x)^{a}}{x} d x.\)
Answer
\(\dfrac{1}{a + 1} (\ln x)^{a+1} + C\).
Solution
\[u=\ln x \Rightarrow d u=\frac{1}{x} d x\]
\[\begin{align} \int \frac{(\ln x)^{a}}{x} d x&=\int u^{a} d u\\ &=\frac{u^{a+1}}{a+1}+C \\ &=\frac{(\ln x)^{a+1}}{a+1}+C \end{align}\]
Exercise 20.8. Find \(\displaystyle \int \frac{d x}{x \ln x}.\)
Answer
\(\ln|\ln x| + C\).
Solution
\[\begin{align} & u=\ln x \Rightarrow d x=\frac{1}{x} d x \\ & \int \frac{d x}{x \ln x}=\int \frac{d u}{u}=\ln |u|+C \\ &=\ln |\ln x|+C \end{align}\]
Exercise 20.9. Find \(\displaystyle \int \frac{5 x-1}{x^{2}+x-2} d x\)
Answer
\(2\ln|x - 1| + 3\ln|x + 2| + C\).
Solution
To integrate rational functions, we use partial fractions. Since \(x^{2}+x-2=(x+2)(x-1)\), we write \[\frac{5 x-1}{x^{2}+x-2}=\frac{A}{x+2}+\frac{B}{x-1}\] To find \(A\) and \(B\), we have \[A(x-1)+B(x+2)=5 x-1\] or \[(A+B) x+(2 B-A)=5 x-1\] Thus \[\begin{align} &\left\{\begin{array}{l} A+B=5 \\ 2 B-A=-1 \end{array} \Rightarrow A=\frac{11}{3}, B=\frac{4}{3}\right. \end{align}\] So
\[\begin{align} \int \frac{5 x-1}{x^{2}+x-2} d x & =\int\left(\frac{11}{3(x+2)}+\frac{4}{3(x-1)}\right) d x \\ & =\frac{11}{3} \ln |x+2|+\frac{4}{3} \ln |x-1|+C \end{align}\]
Exercise 20.10. Find \(\displaystyle \int \frac{x^{2}-3}{x^{3}-7 x+6}\, d x\).
Answer
\(\frac{1}{2} \ln|x - 1| + \frac{1}{5} \ln|x - 2| + \frac{3}{10} \ln|x + 3| + C\).
Solution
Substitution of 1 for \(x\) makes \(x^{3}-7 x+6\) zero. Therefore, We can divide \(x^{3}-7 x+6\) by \(x-1\).
Also since \(x^{2}+x-6=(x-2)(x+3)\), we have \[x^{3}-7 x+6=(x-1)(x-2)(x+3)\] and \[\frac{x^{2}-3}{x^{3}-7 x+6}=\frac{A}{x-1}+\frac{B}{x-2}+\frac{C}{x+3} .\] Calculations show that \[A=\frac{1}{2}, \quad B=\frac{1}{5},\quad C=\frac{3}{10}.\] Therefore \[\int \frac{x^2-3}{x^3-7 x+6} d x=\frac{1}{2} \ln |x-1|+\frac{1}{5} \ln |x-2|+\frac{3}{10} \ln |x+3|+C.\]
Exercise 20.11. Find \(\displaystyle \int \frac{b d x}{x^{2}-a^{2}}\).
Answer
\(\dfrac{b}{2a} \ln \left|\dfrac{x - a}{x + a}\right| + C\).
Solution
\[\begin{align} \int \frac{b d x}{x^{2}-a^{2}} & =b \int \frac{d x}{(x-a)(x+a)} \\ & =b \int\left(\frac{\frac{1}{2 a}}{x-a}+\frac{\frac{-1}{2 a}}{x+a}\right) d x \\ & =\frac{b}{2 a} \int\left(\frac{1}{x-a}-\frac{1}{x+a}\right) d x \\ & =\frac{b}{2 a}(\ln |x-a|-\ln |x+a|)+C \\ & =\frac{b}{2 a} \ln \left|\frac{x-a}{x+a}\right|+C . \end{align}\]
Exercise 20.12. Find \(\displaystyle \int \frac{4 x}{x^{4}-1}\, dx\).
Answer
\(\ln\left| \dfrac{x^2 - 1}{x^2 + 1}\right| + C\).
Solution
Since \(x^{4}-1=\left(x^{2}-1\right)\left(x^{2}+1\right)=(x-1)(x+1)\left(x^{2}+1\right)\)
\[\frac{4 x}{x^{4}-1}=\frac{A}{x-1}+\frac{B}{x+1}+\frac{C x+D}{x^{2}+1} \text {. }\]
After some manipulations, we get
\[A=1,\quad B=1,\quad C=2, \quad D=0\]
Therefore
\[\int \frac{4 x}{x^{4}-1} d x=\int \frac{d x}{x-1}+\int \frac{d x}{x+1}-\int \frac{2 x}{x^{2}+1} d x\]
To evaluate the last integral, let \(u=x^{2}+1\). Then \(d u=2 x d x\)
\[\begin{align} \int \frac{2 x}{x^{2}+1} d x & =\int \frac{d u}{u}=\ln |u|+C . \\ & =\ln \left(x^{2}+1\right)+C \end{align}\] Therefore \[\begin{align} \int \frac{4 x}{x^{4}-1} d x & =\int \frac{d x}{x-1}+\int \frac{d x}{x+1}-\int \frac{2 x}{x^{2}+1} d x \\ & =\ln |x-1|+\ln |x+1|+\ln \left(x^{2}+1\right)+C \\ & =\ln \left|\frac{x^{2}-1}{x^{2}+1}\right|+C . \end{align}\]
Exercise 20.13. Find \(\displaystyle \int \frac{d x}{1-x^{4}}\).
Answer
\(\frac{1}{4} \ln \left|\dfrac{1 + x}{1 - x}\right| + \frac{1}{2} \arctan x + C\).
Solution
Since \[\begin{align} & 1-x^{4}=\left(1-x^{2}\right)\left(1+x^{2}\right)\\ &=(1-x)(1+x)\left(1+x^{2}\right) \\ \end{align}\] we have \[\frac{1}{1-x^{4}}=\frac{A}{x-1}+\frac{B}{x+1}+\frac{C x+D}{x^{2}+1}\] After some manipulations, we can determine \(A\), \(B\), \(C\), and \(D\): \[A=-\frac{1}{4}, B=\frac{1}{4}, C=0, D=\frac{1}{2}\] Therefore
\[\int \frac{d x}{1-x^{4}}=-\frac{1}{4} \int \frac{d x}{x-1}+\frac{1}{4} \int \frac{d x}{x+1}+\frac{1}{2} \int \frac{d x}{1+x^{2}}\]
The last integral is \(\arctan x\). Hence
\[\begin{align} \int \frac{d x}{1-x^{4}} & =-\frac{1}{4} \ln |x-1|+\frac{1}{4} \ln |x+1|+\frac{1}{2} \arctan x+C \\ & =\frac{1}{4} \ln \left|\frac{x+1}{x-1}\right|+\frac{1}{2} \arctan x+C \end{align}\]
Exercise 20.14. Find \(\displaystyle \int \frac{d x}{x \sqrt{a-b x^{2}}}.\)
Answer
\(\dfrac{1}{\sqrt{a}} \ln \dfrac{\sqrt{a} - \sqrt{a - bx^2}}{x\sqrt{a}}\).(Let \(u^{2}=a-b x^{2}\).)
Solution
Let \(u=\sqrt{a-b x^{2}}\) or \(u^{2}=a-b x^{2}\). Therefore
\[x^{2}=\frac{1}{b}\left(a-u^{2}\right)\] Hence \[2 x d x=-\frac{2}{b} u d u\] or \[d x=-\frac{u}{b x} d u\] The integral becomes
\[\begin{align} \int \frac{d x}{x \sqrt{a-b x^{2}}}&=\int \frac{1}{x u}\left(-\frac{u}{b x} d u\right)\\ & =\int-\frac{1}{b x^{2}} d u \\ & =-\frac{1}{b} \int \frac{b}{a-u^{2}} d u\\ &=\int \frac{1}{u^{2}-a} d u \\ & =\int \frac{1}{(u-\sqrt{a})(u+\sqrt{a})} d u \\ & =\frac{1}{2 \sqrt{a}} \int\left(\frac{1}{u+\sqrt{a}}-\frac{1}{u-\sqrt{a}}\right) d u \\ & =\frac{-1}{2 \sqrt{a}}\left\{\int \frac{d u}{u+\sqrt{a}}-\int \frac{d u}{u-\sqrt{a}}\right\} \\ & =\frac{-1}{2 \sqrt{a}}\left\{\ln |u+\sqrt{a}|-\ln |u-\sqrt{a}|\right\}+C \\ & =\frac{-1}{2 \sqrt{a}} \ln \left|\frac{u+\sqrt{a}}{u-\sqrt{a}}\right|+C \end{align}\]
Substituting \(u=\sqrt{a-b x^{2}}\) in the above expression gives
\[-\frac{1}{2 \sqrt{a}} \ln \left|\frac{\sqrt{a-b x^{2}}+\sqrt{a}}{\sqrt{a-b x^{2}}-\sqrt{a}}\right|+C\]
or \[\frac{1}{2 \sqrt{a}} \ln \left|\frac{\sqrt{a-b x^{2}}-\sqrt{a}}{\sqrt{a-b x^{2}}+\sqrt{a}}\right|+C\]