Differentials and integrals: Integration techniques
More black magic in determining an antiderivative
In finding an antiderivative of a continuous function, almost anything is allowed (including sorcery) provided we check afterwards whether the answer found satisfies the requirement that differentiation leads to the given function. The substitution rule is one of the most powerful, but also one of the wildest tools we have available for finding a antiderivative of a function.
Let's start with two examples in which you can see that in addition to the substitution rule, several integration techniques are often used.
Example 1 Calculate the following integral: \[\int\bigl(\ln(x)\bigr)^2\,\dd x\]
Solution \[\begin{aligned}\int\bigl(\ln(x)\bigr)^2\,\dd x &= \int u^2\,e^u\,\dd u\\ &\phantom{abcxyz}\blue{\text{substitution rule with }\ln(x)=u, x=e^u,\text{ en }\dd x=e^u\,\dd u}\\[0.25cm] &= u^2e^u-\int 2u\,e^u\,\dd u \\ &\phantom{abcxyz}\blue{\text{integration by parts}} \\[0.25cm]
&=u^2e^u-\left[2u\,e^y - \int 2e^u\,\dd u\right]\\ &\phantom{abcxyz}\blue{\text{integration by parts}} \\[0.25cm]
&= (u^2-2u+2)e^u+c & \\[0.25cm]
&= \Bigl(\bigl(\ln(x)\bigr)^2-2\ln(x)+2\Bigr)x+c\\
&\phantom{abcxyz}\blue{\text{(check!)}}\end{aligned}\] Whether everything is allowed on the road is not so important, as long as we check the final answer!
Example 2 Calculate the following integral: \[\int\frac{1}{1+\sqrt{1+x}}\,\dd x\]
Solution \[\begin{aligned}\int\frac{1}{1+\sqrt{1+x}}\,\dd x &= \int \frac{2u}{1+u}\,\dd u\\ &\phantom{abcxyz}\blue{\text{substitution rule with }\sqrt{1+x}=u, x=u^2-1,\text{ and }\dd x=2u\,\dd u}\\[0.25cm] &= \int\left(2-\frac{2}{1+u}\right)\,\dd u \\ &\phantom{abcxyz}\blue{\text{partial fraction decomposition}} \\[0.25cm]
&=2u-2\ln|1+u|+c & \\[0.25cm]
&= 2\sqrt{1+x}-2\ln\left(1+\sqrt{1+x}\right)+c\\ & \phantom{abcxyz}\blue{\text{(check!)}}\end{aligned}\]
In the remainder of the story, we will look specifically at substitutions involving trigonometric functions and their inverses, and at other so-called inverse substitutions.
\(\phantom{abc}\)
Inverse trigonometric substitution
In the table of standard integrals you can find \(\arcsin(x)\) as the primitive of \(\dfrac{1}{\sqrt{1-x^2}}\). You can also calculate this using the substitution rule.
Example 3 Calculate the following integral: \[\int\frac{1}{\sqrt{a^2-x^2}}\,\dd x\text{,}\qquad\text{ with }a>0\text.\]
Solution \[\begin{aligned}\int\frac{1}{\sqrt{a^2-x^2}}\,\dd x &= \int \frac{1}{\cos(u)}\cdot \cos(u)\,\dd u\\ &\phantom{abcxyz}\blue{\text{substitution rule with } x=a\sin(u)\text{ and }\dd x=a\cos(u)\,\dd u}\\ &\phantom{abcxyz}\blue{\sqrt{a^2-x^2}=\sqrt{a^2\bigl(1-\sin^2(u)\bigr)}=\sqrt{a^2\cos^2(u)}=a\cos(u)}\\&\phantom{abcxyz}\blue{\text{because }-a\le x\le a\text{ and thus }-\tfrac{1}{2}\pi\le u\le \tfrac{1}{2}\pi} \\[0.25cm] &= \int1\,\dd u \\[0.25cm]
&=u+c & \\[0.25cm]
&= \mathrm{arcsin}\left(\frac{x}{a}\right)+c\end{aligned}\]
More generally, substituting \(x=a\sin(u)\) with \(a>0\) often works well when we want to primitive functions that contain \(\sqrt{a^2-x^2}\).
With \(\sqrt{x^2+a^2}\) or \(\dfrac{1}{x^2+a^2}\) often the inverse substitution \(x=\tan(u)\) also works and then \(\sqrt{x^2+a^2}=\frac{a}{\cos(u)}\) becomes (because \(-\tfrac{1}{2}\pi\le u\le \tfrac{1}{2}\pi\) ) and \(\dfrac{1}{x^2+a^2}=\dfrac{\cos^2(u)}{a^2}\).
Example 4 Calculate the following integral: \[\int\frac{1}{(x^2+1)\sqrt{x^2+1}}\,\dd x\]
Solution \[\begin{aligned}\int\frac{1}{(x^2+1)\sqrt{x^2+1}}\,\dd x &= \int \frac{1}{1+\tan^2(u)}\cdot\frac{1}{\cos^2(u)} \,\dd u\\ &\phantom{abcxyz}\blue{\text{substitution rule with }x=\tan(u)\text{ and }\dd x=\frac{1}{\cos^2(u)}\,\dd u}\\[0.25cm] &= \int \cos^3(u)\cdot\frac{1}{\cos^2(u)} \,\dd u \\ &\phantom{abcxyz}\blue{\text{because }x^2+1=\frac{1}{\cos^2(u)}} \\[0.25cm]
&=\int \cos(u) \,\dd u & \\[0.25cm]
&= \sin(u)+c & \\[0.25cm]
&= \tan(u)\cdot \cos(u)+c& \\[0.25cm]
&=\frac{x}{\sqrt{x^2+1}} + c\\ &\phantom{abcxyz}\blue{\text{because }\tan(u)=x\text{, and }\cos(u)=\frac{1}{\sqrt{x^2+1}}}\end{aligned}\]
\(\phantom{abc}\)
Inverse hyperbolic substitution
In the table of standard integrals you can find \(\arcsin(x)\) and \(\mathrm{arsinh}(x)\) as primitives of \(\dfrac{1}{\sqrt{1-x^2}}\) and \(\dfrac{1}{\sqrt{1+x^2}}\). But let's take a closer look at the second primitive, in a slightly more general form, and see if we can do without this inverse hyperbolic function.
Example 5 Calculate the following integral: \[\int\frac{1}{\sqrt{x^2+a^2}}\,\dd x\text{,}\qquad\text{met }a>0\]
Solution \[\begin{aligned}\int\frac{1}{\sqrt{x^2+a^2}}\,\dd x &= \int \frac{1}{a\cosh(u)}\cdot a\cosh(u)\,\dd u\\ &\phantom{abcxyz}\blue{\text{substitution rule with } x=a\sinh(u)\text{ and }\dd x=a\cosh(u)\,\dd u}\\[0.25cm] &= \int1\,\dd u \\[0.25cm]
&=u+c & \\[0.25cm]
&= \mathrm{arsinh}\left(\dfrac{x}{a}\right)+c\end{aligned}\] So the question is whether we can do without the inverse hyperbolic function. The answer is yes! \[\begin{aligned}x=a\sinh(u) &\iff \dfrac{x}{a}=\frac{e^{u}-e^{-u}}{2} & \\[0.25cm] &\iff e^{u}-\dfrac{2x}{a} -e^{-u}=0 & \\[0.25cm] &\iff \bigl(e^{u}\bigr)^2 - \dfrac{2x}{a} e^{u} -1 =0 \\ &\phantom{abcxyz} \blue{\text{multiplication by }e^u} \\[0.25cm] &\iff \bigl(e^u- \dfrac{x}{a}\bigr)^2-\left(\dfrac{x}{a}\right)^2-1=0\\ &\phantom{abcxyz}\blue{\text{completing the square}} \\[0.25cm] &\iff\;\;\,\, e^u = \dfrac{x}{a}+\sqrt{\left(\dfrac{x}{a}\right)^2+1}\\&\phantom{\iff}\text{ or } e^u = \dfrac{x}{a}-\sqrt{\left(\dfrac{x}{a}\right)^2+1}\\ &\phantom{abcxyz} \blue{\text{taking the root}} \\[0.25cm] &\iff e^u = \dfrac{x}{a}+\sqrt{\left(\dfrac{x}{a}\right)^2+1} \\ &\phantom{abcxyz} \blue{\text{because }e^u>0} \\[0.25cm] &\iff u= \ln\left(\dfrac{x}{a}+\sqrt{\left(\dfrac{x}{a}\right)^2+1} \right)\\[0.25cm] &\iff u= \ln\left(\dfrac{x}{a}+\sqrt{\left(\dfrac{x}{a}\right)^2+1}\right)+\ln(a)-\ln(a)\\[0.25cm] &\iff u= \ln\left(a\left(\dfrac{x}{a}+\sqrt{\left(\dfrac{x}{a}\right)^2+1}\right) \right)-\ln(a)\\[0.25cm] &\iff u=\ln\left(x+\sqrt{x^2+a^2}\right)-\ln(a)\end{aligned}\] So probably \[\int\frac{1}{\sqrt{x^2+a^2}}\,\dd x =\ln\left(x+\sqrt{x^2+a^2}\right)+c\]
Example 6 Analogously, but now via the substitution \(x=\cosh(u)\), the formula \[\begin{aligned}\int\frac{1}{\sqrt{x^2-1}}\,\dd x &= \mathrm{arcosh}(x)+c\\[0.25cm] &=\ln\bigl|x+\sqrt{x^2-1}\bigr|+c\end{aligned}\] and \[\mathrm{arcosh}(x) =\ln\bigl|x+\sqrt{x^2-1}\bigr|\] holds. Examine why we suddenly want absolute bars here!
The lesson from examples 5 and 6 above is that substitution \(x=\sinh(u)\) or \(x=\cosh(u)\) often works well when we want to integrate functions that contain \(\sqrt{x^2+1}\) or \(\sqrt{x^2-1}\).
\(\phantom{abc}\)
There is another substitution that will help when \(\sqrt{x^2+1}\) occurs in the function we want to integrate, which is \(u=x+\sqrt{x^2+1}\). This becomes \(x^2+1=(u-x)^2\) and then \(1=u^2-2ux\), i.e. \[\begin{aligned}x&= \frac{1}{2}\left(u-\frac{1}{u}\right) \\[0.25cm] \dd x&=\frac{1}{2}\left(1+\frac{1}{u^2}\right)\dd u\\[0.25cm] \sqrt{x^2+1}&=\frac{1}{2}\left(u+\frac{1}{u}\right) \end{aligned}\] and often we arrive at integrals of rational functions. Analogously, the substitution \(u=x+\sqrt{x^2-1}\) often works when \(\sqrt{x^2-1}\) occurs in the function we want to primitive.
Example 7 Calculate the following integral: \[\int\frac{1}{1+\sqrt{x^2+1}}\,\dd x\]
Solution \[\begin{aligned}\int\frac{1}{1+\sqrt{x^2+1}}\,\dd x &= \int \frac{\frac{1}{2}\left(1+\dfrac{1}{u^2}\right)}{\frac{1}{2}\left(u+\dfrac{1}{u}\right)} \,\dd u\\ &\phantom{abcxyz}\blue{\text{substitution rule with }x+\sqrt{x^2+1}=u}\\[0.25cm] &= \int \frac{u^2+1}{u(u+1)^2}\,\dd u \\ &\phantom{abcxyz}\blue{\text{multiplication of numerator and denominator by }w^2}\\ &\phantom{abcxyz}\blue{\text{followed by simplification}} \\[0.25cm]
&=\int \left(\frac{1}{u}-\frac{2}{(u+1)^2}\right) \dd u \\ &\phantom{abcxyz}\blue{\text{partial fraction decomposition}}\\[0.25cm]
&= \ln|u|+\frac{2}{u+1}+c \\[0.25cm]
&= \ln\bigl(x+\sqrt{x^2+1}\bigr)+\frac{2}{1+x+\sqrt{x^2+1}}+ c \\ &\phantom{abcxyz}\blue{\text{(check!)}} \end{aligned}\]