Calculation of $\displaystyle \int\sqrt{\tan x+2}\;dx$

$\bf{My\; solution::}$ Let $\displaystyle \tan x+2 = t^2 $, Then

$$\displaystyle \sec^2 (x)dx = 2tdt\Rightarrow dx = \frac{2t}{1+\tan^2 x}dt = \frac{2t}{1+(t^2-2)^2}dt$$

So Integral convert into $$\displaystyle \int \frac{2t^2}{(t^2-2)^2+1^2}dt$$

Let $\displaystyle (t^2-2) = u\Rightarrow t^2=u+2\;,$ Then $\displaystyle tdt=\frac{1}{2}du$

Now How can i solve after that

please help me


  • $\begingroup$ When you got $\int \frac{1}{1+(t-2)^2}dt$, couldn't you just substitute $t-2$ by $u$, getting $\int \frac{1}{1+u^2}du$, that is equal to $\arctan(u)+c$? $\endgroup$ – JPLF Jan 4 '14 at 13:57
  • $\begingroup$ Thanks JPLF you are saying Right.... $\endgroup$ – juantheron Jan 4 '14 at 14:02

Using your substitution \begin{equation*} t=\sqrt{\tan x+2} \end{equation*} we need to integrate \begin{equation*} \frac{I}{2}=\frac{1}{2}\int \sqrt{\tan x+2}\,dx=\int \frac{t^{2}}{\left( t^{2}-2\right) ^{2}+1}\,dt+C, \end{equation*} as you show in your edited question. We can reduce it to a table integral if we factorize the denominator \begin{equation*} t^{4}-4t^{2}+5=\left( t^{2}+\sqrt{4+\sqrt{20}}t+\sqrt{5}\right) \left( t^{2}- \sqrt{4+\sqrt{20}}t+\sqrt{5}\right) \end{equation*} and expand the integrand into partial fractions \begin{equation*} \frac{t^{2}}{t^{4}-4t^{2}+5}=\frac{At}{t^{2}+\sqrt{4+\sqrt{20}}t+\sqrt{5}}- \frac{At}{t^{2}-\sqrt{4+\sqrt{20}}t+\sqrt{5}}, \end{equation*} where \begin{equation*} A=-B=-\frac{1}{4}\sqrt{4+\sqrt{20}}\left( -2+\sqrt{5}\right) . \end{equation*} The standard integral we need is the following one \begin{equation*} \int \frac{t}{t^{2}+bt+c}\,dt=\frac{1}{2}\ln \left\vert t^{2}+bt+c\right\vert -\frac{b}{\sqrt{4c-b^{2}}}\arctan \frac{2t+b}{\sqrt{ 4c-b^{2}}}+C,\qquad 4c-b^{2}>0. \end{equation*} In the case at hand $4c-b^{2}=4\sqrt{5}-\left( 4+\sqrt{20}\right) =2\sqrt{5} -4>0$. So

\begin{eqnarray*} \int \frac{t}{t^{2}+\sqrt{4+\sqrt{20}}t+\sqrt{5}}dt &=&\frac{1}{2}\ln \left\vert t^{2}+\sqrt{4+\sqrt{20}}t+\sqrt{5}\right\vert \\ &&-\frac{\sqrt{4+\sqrt{20}}}{\sqrt{2\sqrt{5}-4}}\arctan \frac{2t+\sqrt{4+ \sqrt{20}}}{\sqrt{2\sqrt{5}-4}}+C, \end{eqnarray*} and \begin{eqnarray*} \int \frac{t}{t^{2}-\sqrt{4+\sqrt{20}}t+\sqrt{5}}dt &=&\frac{1}{2}\ln \left\vert t^{2}-\sqrt{4+\sqrt{20}}t+\sqrt{5}\right\vert \\ &&+\frac{\sqrt{4+\sqrt{20}}}{\sqrt{2\sqrt{5}-4}}\arctan \frac{2t-\sqrt{4+ \sqrt{20}}}{\sqrt{2\sqrt{5}-4}}+C. \end{eqnarray*} We thus get \begin{eqnarray*} \frac{I}{2} &=&A\left( \frac{1}{2}\ln \left\vert t^{2}+\sqrt{4+\sqrt{20}}t+ \sqrt{5}\right\vert -\frac{\sqrt{4+\sqrt{20}}}{\sqrt{2\sqrt{5}-4}}\arctan \frac{2t+\sqrt{4+\sqrt{20}}}{\sqrt{2\sqrt{5}-4}}\right) \\ &&-A\left( \frac{1}{2}\ln \left\vert t^{2}-\sqrt{4+\sqrt{20}}t+\sqrt{5}% \right\vert +\frac{\sqrt{4+\sqrt{20}}}{\sqrt{2\sqrt{5}-4}}\arctan \frac{2t- \sqrt{4+\sqrt{20}}}{\sqrt{2\sqrt{5}-4}}\right) +C. \end{eqnarray*} Substituting back $t=\sqrt{\tan x+2}$ we get the given integral $I=\frac{2I}{ 2}=\int \sqrt{\tan x+2}\,dx$.

ADDED. After simplifying I've obtained

\begin{eqnarray*} I &=&\frac{\left( 2-\sqrt{5}\right) \sqrt{4+\sqrt{20}}}{4}\ln \left\vert \frac{\tan x+2+\sqrt{4+\sqrt{20}}\sqrt{\tan x+2}+\sqrt{5}}{\tan x+2-\sqrt{4+ \sqrt{20}}\sqrt{\tan x+2}+\sqrt{5}}\right\vert \\ &&+\frac{\sqrt{4+\sqrt{20}}}{2}\times \\ &&\qquad \times \left( \arctan \frac{2\sqrt{\tan x+2}-\sqrt{4+\sqrt{20}}}{ \sqrt{\sqrt{20}-4}}+\arctan \frac{2\sqrt{\tan x+2}+\sqrt{4+\sqrt{20}}}{\sqrt{ \sqrt{20}-4}}\right) +C. \end{eqnarray*}



$$u=\sqrt{\tan x+2}$$ Then $$x=\tan^{-1}(u^2-2)$$ finding dx is easy, then substitute directly.


Just as a comment, I found amazing to notice that the result of this integration could simply write
Sqrt[2 + I] ArcTan[Sqrt[2 + Tan[x]]/Sqrt[-2 - I]] +
Sqrt[2 - I] ArcTan[Sqrt[2 + Tan[x]]/Sqrt[-2 + I]]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.