# illustration of integration techniques

Problem. Determine the antiderivative of $\sqrt{\tan x}$.

 $\displaystyle u$ $\displaystyle=\sqrt{\tan x}$ $\displaystyle u^{2}$ $\displaystyle=\tan x$ $\displaystyle 2u\,du$ $\displaystyle=\sec^{2}x\,dx$

Using the Pythagorean identity $\tan^{2}x+1=\sec^{2}x$, we obtain:

 $\displaystyle 2u\,du$ $\displaystyle=(\tan^{2}x+1)\,dx$ $\displaystyle 2u\,du$ $\displaystyle=(u^{4}+1)\,dx$ $\displaystyle\frac{2u}{u^{4}+1}\,du$ $\displaystyle=dx$

Thus,

 $\displaystyle\int\sqrt{\tan x}\,dx$ $\displaystyle=\int u\,\frac{2u}{u^{4}+1}\,du$ $\displaystyle=\int\frac{2u^{2}}{(u^{2}-u\sqrt{2}+1)(u^{2}+u\sqrt{2}+1)}\,du.$

For this last integral, we use the method of partial fractions  (http://planetmath.org/ALectureOnThePartialFractionDecompositionMethod):

 $\displaystyle\frac{2u^{2}}{(u^{2}-u\sqrt{2}+1)(u^{2}+u\sqrt{2}+1)}$ $\displaystyle=\frac{A+Bu}{u^{2}-u\sqrt{2}+1}+\frac{C+Du}{u^{2}+u\sqrt{2}+1}$ $\displaystyle 2u^{2}$ $\displaystyle=(A+Bu)(u^{2}+u\sqrt{2}+1)+(C+Du)(u^{2}-u\sqrt{2}+1)$ $\displaystyle=(B\!+\!D)u^{3}+(A\!+\!C\!+\!(B\!-\!D)\sqrt{2})u^{2}+(B\!+\!D\!+% \!(A\!-\!C)\sqrt{2})u+A\!+\!C$

From this, we obtain the following system of equations:

 $\left\{\begin{array}[]{cccc}&&B+D&=0\\ A+C&+&(B-D)\sqrt{2}&=2\\ (A-C)\sqrt{2}&+&B+D&=0\\ A+C&&&=0\end{array}\right.$

This can be into two smaller systems of equations:

 $\left\{\begin{array}[]{rcrc}A&+&C&=0\\ A\sqrt{2}&-&C\sqrt{2}&=0\end{array}\right.$
 $\left\{\begin{array}[]{rcrc}B&+&D&=0\\ B\sqrt{2}&-&D\sqrt{2}&=2\end{array}\right.$

It is clear that the first system yields $A=C=0$, and it can easily be verified that $B=\frac{1}{\sqrt{2}}$ and $D=\frac{-1}{\sqrt{2}}$. Therefore,

 $\displaystyle\int\sqrt{\tan x}\,dx$ $\displaystyle=\frac{1}{\sqrt{2}}\int\frac{u}{u^{2}-u\sqrt{2}+1}\,du-\frac{1}{% \sqrt{2}}\int\frac{u}{u^{2}+u\sqrt{2}+1}\,du$ $\displaystyle=\frac{1}{\sqrt{2}}\int\frac{u}{u^{2}-u\sqrt{2}+\frac{1}{2}+\frac% {1}{2}}\,du-\frac{1}{\sqrt{2}}\int\frac{u}{u^{2}+u\sqrt{2}+\frac{1}{2}+\frac{1% }{2}}\,du$ $\displaystyle=\frac{1}{\sqrt{2}}\int\frac{u}{(u-\frac{1}{\sqrt{2}})^{2}+\frac{% 1}{2}}\,du-\frac{1}{\sqrt{2}}\int\frac{u}{(u+\frac{1}{\sqrt{2}})^{2}+\frac{1}{% 2}}\,du.$

Now we make the following substitutions:

$\begin{array}[]{rclcrcl}v&=&u-\frac{1}{\sqrt{2}}&&w&=&u+\frac{1}{\sqrt{2}}\\ dv&=&du&&dw&=&du\end{array}$

Note that we have $v+\frac{1}{\sqrt{2}}=u=w-\frac{1}{\sqrt{2}}$. Therefore,

 $\displaystyle\int\sqrt{\tan x}\,dx$ $\displaystyle=\frac{1}{\sqrt{2}}\int\frac{v+\frac{1}{\sqrt{2}}}{v^{2}+\frac{1}% {2}}\,dv-\frac{1}{\sqrt{2}}\int\frac{w-\frac{1}{\sqrt{2}}}{w^{2}+\frac{1}{2}}% \,dw$ $\displaystyle=\frac{1}{\sqrt{2}}\int\frac{v}{v^{2}+\frac{1}{2}}\,dv-\frac{1}{2% }\int\frac{dv}{v^{2}+\frac{1}{2}}-\frac{1}{\sqrt{2}}\int\frac{w}{w^{2}+\frac{1% }{2}}\,dw+\frac{1}{2}\int\frac{dw}{w^{2}+\frac{1}{2}}.$

For the first and third integrals in the last expression, note that the numerator is a of the derivative of the denominator. For these, we use the formula

 $\int\frac{kf^{\prime}(x)}{f(x)}\,dx=k\ln|f(x)|.$

For the second and fourth integrals in the last expression, we use the formula

 $\int\frac{dx}{x^{2}+a^{2}}=\frac{1}{a}\arctan\left(\frac{x}{a}\right)$

with $a=\frac{1}{\sqrt{2}}$. Hence,

 $\displaystyle\int\sqrt{\tan x}\,dx$ $\displaystyle=\frac{1}{2\sqrt{2}}\ln\left(v^{2}+\frac{1}{2}\right)+\frac{1}{% \sqrt{2}}\arctan(v\sqrt{2})-\frac{1}{2\sqrt{2}}\ln\left(w^{2}+\frac{1}{2}% \right)+\frac{1}{\sqrt{2}}\arctan(w\sqrt{2})+K$ $\displaystyle=\frac{1}{2\sqrt{2}}\ln\left(\frac{v^{2}+\frac{1}{2}}{w^{2}+\frac% {1}{2}}\right)+\frac{1}{\sqrt{2}}(\arctan(v\sqrt{2})+\arctan(w\sqrt{2}))+K$ $\displaystyle=\frac{1}{2\sqrt{2}}\ln\left(\frac{(u-\frac{1}{\sqrt{2}})^{2}+% \frac{1}{2}}{(u+\frac{1}{\sqrt{2}})^{2}+\frac{1}{2}}\right)+\frac{1}{\sqrt{2}}% \left(\!\arctan\left[\!\left(\!u-\frac{1}{\sqrt{2}}\!\right)\!\sqrt{2}\right]% \!+\!\arctan\left[\!\left(\!u+\frac{1}{\sqrt{2}}\!\right)\!\sqrt{2}\right]\!% \right)\!+\!K$ $\displaystyle=\frac{1}{2\sqrt{2}}\ln\left(\frac{u^{2}-u\sqrt{2}+1}{u^{2}+u% \sqrt{2}+1}\right)+\frac{1}{\sqrt{2}}[\arctan(u\sqrt{2}-1)+\arctan(u\sqrt{2}+1% )]+K$ $\displaystyle=\frac{1}{2\sqrt{2}}\ln\left(\frac{\tan x-\sqrt{2\tan x}+1}{\tan x% +\sqrt{2\tan x}+1}\right)+\frac{1}{\sqrt{2}}[\arctan(\sqrt{2\tan x}-1)+\arctan% (\sqrt{2\tan x}+1)]+K.$

(We use $K$ for the constant of integration to avoid confusion with $C$ from the system of equations.)

Title illustration of integration techniques IllustrationOfIntegrationTechniques 2013-03-22 17:50:16 2013-03-22 17:50:16 Wkbj79 (1863) Wkbj79 (1863) 13 Wkbj79 (1863) Example msc 26A36