Integrating the following $\int \sqrt{\tan x+1}\,dx$

686 Views Asked by At

Question: Integrate the following, $$\int\sqrt{\tan x+1}\;dx.$$

Wolfram Alpha returns a non-elementary answer. Can someone please spot the mistake I have made here:

First consider this integral:

$$\int \frac{1}{(x+1)\sqrt{x+3}} \, dx = -\sqrt{2}\tanh^{-1}\frac{\sqrt{x+3}}{\sqrt{2}} + c$$

Wolfram Alpha confirms that result.

Then, we have

$$I=\int \sqrt{\tan x+1} \, dx, \quad \tan x=u+2, \quad dx=\frac{du}{\sec^{2}x}=\frac{du}{(u+2)^{2}-1}=\frac{dx}{(u+3)(u+1)}$$

So this transforms the integral to the first integral on this post, which we can evaluate. Then after evaluation and resubstitution I get:

$$I=-\sqrt{2}\tanh^{-1}\frac{\sqrt{\tan x+1}}{\sqrt{2}}+c$$

However differentiating this with Wolfram Alpha gives me a messy trigonometric expression which doesn't seem to be equal (I tested some values in both expressions and get different answers). I also estimated the area under the integral between some values and also obtained different answers using the closed form. Any ideas why?

EDIT: I used the wrong identity. Nevertheless, we can still use this method to integrate sqrt(tanhx integrals). E.g: $$I=\int \sqrt{\tanh x+1} \, dx, \tanh x=u+2,\quad -dx = \frac{du}{\operatorname{sech}^2 x} = \frac{du}{(u+2)^2-1} = \frac{dx}{(u+3)(u+1)}$$

To obtain: $\int \sqrt{\tanh x+1} \, dx = I=\sqrt{2}\tanh^{-1} \dfrac{\sqrt{\tanh x+1}}{\sqrt{2}}+c$

4

There are 4 best solutions below

2
On

Hint:

Let $u=\sqrt{\tan x+1}$ ,

Then $x=\tan^{-1}(u^2-1)$

$dx=\dfrac{2u}{(u^2-1)^2+1}du$

$\therefore\int\sqrt{\tan x+1}~dx=\int\dfrac{2u^2}{(u^2-1)^2+1}du$

0
On

This integral is not non-elementary. Following from @Harry Peter's hint, we have

$$ \begin{align} \frac{2u^2}{u^4 - 2u^2 + 2} &= \frac{2}{u^2 + \dfrac{2}{u^2} - 2} \\ &= \frac{1 - \dfrac{\sqrt{2}}{u^2}}{\left(u+\dfrac{\sqrt{2}}{u}\right)^2-2\sqrt{2}-2} + \frac{1 + \dfrac{\sqrt{2}}{u^2}}{\left(u - \dfrac{\sqrt{2}}{u}\right)^2 + 2\sqrt{2} - 2 } \end{align} $$

Then you can substitute $s = u + \dfrac{\sqrt{2}}{u}$ and $t = u - \dfrac{\sqrt{2}}{u}$, respectively. The first integral is in terms of logarithms and the second is in terms of arctangent. As you can see, this can be expressed in terms of elementary functions.

0
On

Let $I=\int \sqrt{\tan x+1} d x$ and $u=\sqrt{\tan x+1}$. \begin{aligned} I &=\int \frac{2 u^{2} d u}{\left(u^{2}-1\right)^{2}+1} \\ &=2 \int \frac{u^{2}}{u^{4}-2 u^{2}+2} d u \\ &=2 \int \frac{d u}{u^{2}+\frac{2}{u^{2}}-2} \\ &= 2 \int \frac{\left(1+\frac{\sqrt{2}}{u}\right)+\left(1-\frac{\sqrt{2}}{u}\right)}{u^{2}+\frac{2}{u^{2}}-2} d u\\ &=\int \underbrace{\frac{1+\frac{\sqrt{2}}{u}}{u^{2}+\frac{2}{u^{2}}-2} d u}_{I}+\underbrace{\int \frac{1-\frac{\sqrt{2}}{u}}{u^{2}+\frac{2}{u^{2}}-2} d u}_{J}\end{aligned} $$I=\int \frac{d\left(u-\frac{\sqrt{2}}{u}\right)}{\left(u-\frac{\sqrt{2}}{u}\right)^{2}+2(\sqrt{2}-1)}=\frac{1}{\sqrt{2(\sqrt{2}-1)}} \tan ^{-1}\left(\frac{u-\frac{\sqrt{2}}{u}}{\sqrt{2 (\sqrt{2}-1)}}\right)$$ $$J=\int \frac{d\left(u+\frac{\sqrt{2}}{u}\right)}{\left(u+\frac{\sqrt{2}}{u}\right)^{2}-2(\sqrt{2}+1)}=\frac{1}{2 \sqrt{2(\sqrt{2}+1)}} \ln \left|\frac{u+\frac{\sqrt{2}}{u}-\sqrt{2 (\sqrt{2}+1)}}{\left.u+\frac{\sqrt{2}}{u}+\sqrt{2(\sqrt{2}+1}\right)}\right|$$ Now we can conclude that

$$I=\frac{1}{\sqrt{2(\sqrt{2}-1})} \tan ^{-1}\left(\frac{\tan x+1-\sqrt{2}}{\sqrt{2(\sqrt{2}-1)(\tan x+1})}\right)+ \frac{1}{2\sqrt{2(\sqrt{2}+1)}} \ln \left| \frac{\tan x+1-\sqrt{2(\sqrt{2}+1)(\tan x+1)}+\sqrt2}{\tan x+1+\sqrt{2(\sqrt{2}+1)(\tan x+1)}+\sqrt2}\right|+C$$

0
On

Consider the general integral \begin{align} I(a)=\int \sqrt{\tan x +\cot a} \ dx \end{align} which can be integrated by substituting $t=\sqrt{\frac{\tan x+\cot a}{\csc a}}$

\begin{align} I(a)&= \frac 2 {\sqrt{\csc a}} \int\frac{ t^2}{t^4-{2t^2 \cos a}+1 }\ dt\\ &= \sqrt{\frac{\cot\frac a2}2}\tan^{-1}\frac{\sqrt{{\cot\frac a2}} \tan x - \sqrt{{\tan\frac a2}} }{\sqrt{2(\tan x +\cot a} )}\\ &\>\>\>\>\>- \sqrt{\frac{\tan\frac a2}2}\coth^{-1}\frac{\sqrt{{\tan\frac a2}} \tan x +\sqrt{{\cot\frac a2}} }{\sqrt{2(\tan x +\cot a} )} \end{align} In particular, $\int \sqrt{\tan x +1} \ dx=I(\frac\pi4)$.