# Challenge integral (1 Viewer)

#### SB257426

##### Very Important User

does anyone know how to do this ?

I tried doing it and i got it wrong

#### Attachments

• 11.7 KB Views: 38

?

#### ExtremelyBoredUser

##### Bored Uni Student
View attachment 40338

does anyone know how to do this ?

I tried doing it and i got it wrong
decompose the integrand

sqrt(tanx) + 1/sqrt(tanx)

this should be obvious from there

#### blob063540

##### New Member

Just to confirm is this what u got

#### unofficiallyred12

##### Member
Now for a follow up question: hence or otherwise integrate sqrt(tanx)

#### Luukas.2

##### Well-Known Member
There is a problem with the answer here. The function $\bg_white f(x) = \sqrt{\tan{x}} + \sqrt{\cot{x}}$ is positive throughout its domain. Yet, using the result presented:

\bg_white \begin{align*} \int_{\frac{7\pi}{6}}^{\frac{5\pi}{4}} \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx &= \sqrt{2}\bigg[\sin^{-1}{\left(\sin{x}-\cos{x}\right)}\bigg]_{\frac{7\pi}{6}}^{\frac{5\pi}{4}} \\ &= \sqrt{2}\left[\sin^{-1}{\left(\sin{\frac{5\pi}{4}}-\cos{\frac{5\pi}{4}}\right)} - \sin^{-1}{\left(\sin{\frac{7\pi}{6}}-\cos{\frac{7\pi}{6}}\right)}\right] \\ &= \sqrt{2}\left[\sin^{-1}{0} - \sin^{-1}{\left(-\frac{1}{2} - \frac{-\sqrt{3}}{2}\right)}\right] \\ &= -\sqrt{2}\sin^{-1}{\left(\frac{\sqrt{3} - 1}{2}\right)} \\ &< 0 \end{align*}
The result as written does work for the domain $\bg_white 0 \le x \leq \frac{\pi}{2}$, though.

#### Luukas.2

##### Well-Known Member
The actual integral is:

$\bg_white \int \sqrt{\tan{x}} + \sqrt{\cot{x}} \ dx = \sqrt{2}\bigg[\tan^{-1}{\left(\sqrt{2\tan{x}} + 1\right) + \tan^{-1}{\left(\sqrt{2\tan{x}} - 1\right)\bigg] + C \qquad \text{for some constant C}$

#### Luukas.2

##### Well-Known Member
$\bg_white \text{Let } I = \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \int \sqrt{\tan{x}} + \frac{1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx$

\bg_white \begin{align*} \text{Let} \qquad u &= \sqrt{\tan{x}} = \(\tan{x})^{\frac{1}{2}} \\ du &= \frac{1}{2} \times (\tan{x})^{-\frac{1}{2}} \times \sec^2{x}\,dx \\ &= \frac{\tan^2{x} + 1}{2\sqrt{\tan{x}}}\,dx \\ dx &= \frac{2u\,du}{u^4 + 1} \end{align*}

$\bg_white \text{Thus, } I = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{u^2 + 1}{u} \times \frac{2u\,du}{u^4 + 1} = 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du$
We need to factorise the denominator:

\bg_white \begin{align*} \text{Now, } u^4 + 1 &= u^2\left(u^2 + \frac{1}{u^2}\right) = u^2\left(u^2 + 2 + \frac{1}{u^2} - 2\right) \\ &= u^2\left[\left(u + \frac{1}{u}\right)^2 - \left(\sqrt{2}\right)^2\right] = u^2\left(u + \frac{1}{u} + \sqrt{2}\right)\left(u + \frac{1}{u} - \sqrt{2}\right) \\ &= \left(u^2 + u\sqrt{2} + 1\right)\left(u^2 - u\sqrt{2} + 1\right) \end{align*}

The integrand can now be decomposed using partial fractions:

\bg_white \begin{align*} \text{Let} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{Au + B}{u^2 + u\sqrt{2} + 1} + \frac{Cu + D}{u^2 - u\sqrt{2} + 1} \qquad \text{where A, B, C, and D are real constants} \\ \\ u^2 + 1 &= (Au + B)\left(u^2 - u\sqrt{2} + 1\right) + (Cu + D)\left(u^2 + u\sqrt{2} + 1\right) \\ \\ \text{Equate coefficients of u^3:} \qquad 0 &= A + C \qquad \qquad \implies \qquad C = -A \\ \text{Put u = 0:} \qquad 1 &= B + D \qquad \qquad \implies \qquad D = 1 - B \\ \text{Equate coefficients of u:} \qquad 0 &= A -B\sqrt{2} + C + D\sqrt{2} \qquad \qquad \implies \qquad B = D = \cfrac{1}{2} \\ \text{Equate coefficients of u^2:} \qquad 1 &= -A\sqrt{2} + B + C\sqrt{2} + D \qquad \qquad \implies \qquad A = C = 0 \\ \\ \text{Thus,} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right) \end{align*}

\bg_white \begin{align*} \text{Hence, I can be found:} \qquad I &= 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du \qquad \text{from above} \\ &= 2\int \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right)\ \!du \\ &= \int \frac{1}{\left(u + \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}} + \frac{1}{\left(u - \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}}\ \!du \\ \\ &= \frac{1}{1 \times \frac{1}{\sqrt{2}}} \left[\tan^{-1}{\left(\frac{u + \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)} + \tan^{-1}{\left(\frac{u - \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)}\right] + C' \qquad \text{for some constant C'} \\ \\ &= \sqrt{2} \left[\tan^{-1}{\left(u\sqrt{2} + 1\right)} + \tan^{-1}{\left(u\sqrt{2} - 1\right)}\right] + C' \\ \\ \text{Thus,} \qquad \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx &= \sqrt{2} \left[\tan^{-1}{\left(\sqrt{2\tan{x}} + 1\right)} + \tan^{-1}{\left(\sqrt{2\tan{x}} - 1\right)}\right] + C' \end{align*}

#### SB257426

##### Very Important User
$\bg_white \text{Let } I = \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \int \sqrt{\tan{x}} + \frac{1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx$

\bg_white \begin{align*} \text{Let} \qquad u &= \sqrt{\tan{x}} = \(\tan{x})^{\frac{1}{2}} \\ du &= \frac{1}{2} \times (\tan{x})^{-\frac{1}{2}} \times \sec^2{x}\,dx \\ &= \frac{\tan^2{x} + 1}{2\sqrt{\tan{x}}}\,dx \\ dx &= \frac{2u\,du}{u^4 + 1} \end{align*}

$\bg_white \text{Thus, } I = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{u^2 + 1}{u} \times \frac{2u\,du}{u^4 + 1} = 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du$
We need to factorise the denominator:

\bg_white \begin{align*} \text{Now, } u^4 + 1 &= u^2\left(u^2 + \frac{1}{u^2}\right) = u^2\left(u^2 + 2 + \frac{1}{u^2} - 2\right) \\ &= u^2\left[\left(u + \frac{1}{u}\right)^2 - \left(\sqrt{2}\right)^2\right] = u^2\left(u + \frac{1}{u} + \sqrt{2}\right)\left(u + \frac{1}{u} - \sqrt{2}\right) \\ &= \left(u^2 + u\sqrt{2} + 1\right)\left(u^2 - u\sqrt{2} + 1\right) \end{align*}

The integrand can now be decomposed using partial fractions:

\bg_white \begin{align*} \text{Let} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{Au + B}{u^2 + u\sqrt{2} + 1} + \frac{Cu + D}{u^2 - u\sqrt{2} + 1} \qquad \text{where A, B, C, and D are real constants} \\ \\ u^2 + 1 &= (Au + B)\left(u^2 - u\sqrt{2} + 1\right) + (Cu + D)\left(u^2 + u\sqrt{2} + 1\right) \\ \\ \text{Equate coefficients of u^3:} \qquad 0 &= A + C \qquad \qquad \implies \qquad C = -A \\ \text{Put u = 0:} \qquad 1 &= B + D \qquad \qquad \implies \qquad D = 1 - B \\ \text{Equate coefficients of u:} \qquad 0 &= A -B\sqrt{2} + C + D\sqrt{2} \qquad \qquad \implies \qquad B = D = \cfrac{1}{2} \\ \text{Equate coefficients of u^2:} \qquad 1 &= -A\sqrt{2} + B + C\sqrt{2} + D \qquad \qquad \implies \qquad A = C = 0 \\ \\ \text{Thus,} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right) \end{align*}

\bg_white \begin{align*} \text{Hence, I can be found:} \qquad I &= 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du \qquad \text{from above} \\ &= 2\int \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right)\ \!du \\ &= \int \frac{1}{\left(u + \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}} + \frac{1}{\left(u - \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}}\ \!du \\ \\ &= \frac{1}{1 \times \frac{1}{\sqrt{2}}} \left[\tan^{-1}{\left(\frac{u + \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)} + \tan^{-1}{\left(\frac{u - \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)}\right] + C' \qquad \text{for some constant C'} \\ \\ &= \sqrt{2} \left[\tan^{-1}{\left(u\sqrt{2} + 1\right)} + \tan^{-1}{\left(u\sqrt{2} - 1\right)}\right] + C' \\ \\ \text{Thus,} \qquad \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx &= \sqrt{2} \left[\tan^{-1}{\left(\sqrt{2\tan{x}} + 1\right)} + \tan^{-1}{\left(\sqrt{2\tan{x}} - 1\right)}\right] + C' \end{align*}
Aha ! I get it now

#### SB257426

##### Very Important User
$\bg_white \text{Let } I = \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \int \sqrt{\tan{x}} + \frac{1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx$

\bg_white \begin{align*} \text{Let} \qquad u &= \sqrt{\tan{x}} = \(\tan{x})^{\frac{1}{2}} \\ du &= \frac{1}{2} \times (\tan{x})^{-\frac{1}{2}} \times \sec^2{x}\,dx \\ &= \frac{\tan^2{x} + 1}{2\sqrt{\tan{x}}}\,dx \\ dx &= \frac{2u\,du}{u^4 + 1} \end{align*}

$\bg_white \text{Thus, } I = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{u^2 + 1}{u} \times \frac{2u\,du}{u^4 + 1} = 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du$
We need to factorise the denominator:

\bg_white \begin{align*} \text{Now, } u^4 + 1 &= u^2\left(u^2 + \frac{1}{u^2}\right) = u^2\left(u^2 + 2 + \frac{1}{u^2} - 2\right) \\ &= u^2\left[\left(u + \frac{1}{u}\right)^2 - \left(\sqrt{2}\right)^2\right] = u^2\left(u + \frac{1}{u} + \sqrt{2}\right)\left(u + \frac{1}{u} - \sqrt{2}\right) \\ &= \left(u^2 + u\sqrt{2} + 1\right)\left(u^2 - u\sqrt{2} + 1\right) \end{align*}

The integrand can now be decomposed using partial fractions:

\bg_white \begin{align*} \text{Let} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{Au + B}{u^2 + u\sqrt{2} + 1} + \frac{Cu + D}{u^2 - u\sqrt{2} + 1} \qquad \text{where A, B, C, and D are real constants} \\ \\ u^2 + 1 &= (Au + B)\left(u^2 - u\sqrt{2} + 1\right) + (Cu + D)\left(u^2 + u\sqrt{2} + 1\right) \\ \\ \text{Equate coefficients of u^3:} \qquad 0 &= A + C \qquad \qquad \implies \qquad C = -A \\ \text{Put u = 0:} \qquad 1 &= B + D \qquad \qquad \implies \qquad D = 1 - B \\ \text{Equate coefficients of u:} \qquad 0 &= A -B\sqrt{2} + C + D\sqrt{2} \qquad \qquad \implies \qquad B = D = \cfrac{1}{2} \\ \text{Equate coefficients of u^2:} \qquad 1 &= -A\sqrt{2} + B + C\sqrt{2} + D \qquad \qquad \implies \qquad A = C = 0 \\ \\ \text{Thus,} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right) \end{align*}

\bg_white \begin{align*} \text{Hence, I can be found:} \qquad I &= 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du \qquad \text{from above} \\ &= 2\int \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right)\ \!du \\ &= \int \frac{1}{\left(u + \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}} + \frac{1}{\left(u - \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}}\ \!du \\ \\ &= \frac{1}{1 \times \frac{1}{\sqrt{2}}} \left[\tan^{-1}{\left(\frac{u + \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)} + \tan^{-1}{\left(\frac{u - \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)}\right] + C' \qquad \text{for some constant C'} \\ \\ &= \sqrt{2} \left[\tan^{-1}{\left(u\sqrt{2} + 1\right)} + \tan^{-1}{\left(u\sqrt{2} - 1\right)}\right] + C' \\ \\ \text{Thus,} \qquad \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx &= \sqrt{2} \left[\tan^{-1}{\left(\sqrt{2\tan{x}} + 1\right)} + \tan^{-1}{\left(\sqrt{2\tan{x}} - 1\right)}\right] + C' \end{align*}
also what application did u use to do ur working

#### Luukas.2

##### Well-Known Member
also what application did u use to do ur working
I typed it in the box for posting replies.

Note that the original solution posted:

$\bg_white \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \sqrt{2}\bigg[\sin^{-1}{\left(\sin{x}-\cos{x}\right)}\bigg] + C$

does works on some domains - for example, on $\bg_white 0 < x < \frac{\pi}{2}$.

However, for the domain $\bg_white \pi < x < \frac{3\pi}{2}$, the integral is

$\bg_white \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \sqrt{2}\bigg[\sin^{-1}{\left(\cos{x}-\sin{x}\right)}\bigg] + C$

This tells me that there is an issue with signs or in making the assumption that $\bg_white \sqrt{u^2} = u$ when, in fact $\bg_white \sqrt{u^2} = |u|$ and is only $\bg_white u$ when $\bg_white u \ge 0$.

Note, for example, that I did not make the substitution $\bg_white u^2 = \tan{x}$ as it would follow that $\bg_white \sqrt{\tan{x}} = |u|$... instead, I substituted $\bg_white u = \sqrt{\tan{x}}$ and avoided a potential problem. Far too many papers include substitutions that raise problems that are then ignored, yielding correct answers but from technically-flawed working.

#### Luukas.2

##### Well-Known Member
Now for a follow up question: hence or otherwise integrate sqrt(tanx)
$\bg_white \int \sqrt{\tan{x}}\ dx = \int u \times \frac{2u\,du}{u^4 + 1} = \int \frac{2u^2}{u^4 + 1}\ \!du \qquad \text{using the substitution u = \sqrt{\tan{x}}}$

The partial fractions result will now yield both inverse tan and log terms.

Alternatively, focus on

$\bg_white \int \sqrt{\cot{x}}\ dx = \int \frac{1}{u} \times \frac{2u\,du}{u^4 + 1} = \int \frac{2}{u^4 + 1}\ \!du \qquad \text{using the substitution u = \sqrt{\tan{x}}}$

and then subtract the result from the integral found earlier in this thread.

#### SB257426

##### Very Important User
I typed it in the box for posting replies.

Note that the original solution posted:

$\bg_white \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \sqrt{2}\bigg[\sin^{-1}{\left(\sin{x}-\cos{x}\right)}\bigg] + C$

does works on some domains - for example, on $\bg_white 0 < x < \frac{\pi}{2}$.

However, for the domain $\bg_white \pi < x < \frac{3\pi}{2}$, the integral is

$\bg_white \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \sqrt{2}\bigg[\sin^{-1}{\left(\cos{x}-\sin{x}\right)}\bigg] + C$

This tells me that there is an issue with signs or in making the assumption that $\bg_white \sqrt{u^2} = u$ when, in fact $\bg_white \sqrt{u^2} = |u|$ and is only $\bg_white u$ when $\bg_white u \ge 0$.

Note, for example, that I did not make the substitution $\bg_white u^2 = \tan{x}$ as it would follow that $\bg_white \sqrt{\tan{x}} = |u|$... instead, I substituted $\bg_white u = \sqrt{\tan{x}}$ and avoided a potential problem. Far too many papers include substitutions that raise problems that are then ignored, yielding correct answers but from technically-flawed working.

#### member 6003

##### Member
$\bg_white \text{Let } I = \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx = \int \sqrt{\tan{x}} + \frac{1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx$

\bg_white \begin{align*} \text{Let} \qquad u &= \sqrt{\tan{x}} = \(\tan{x})^{\frac{1}{2}} \\ du &= \frac{1}{2} \times (\tan{x})^{-\frac{1}{2}} \times \sec^2{x}\,dx \\ &= \frac{\tan^2{x} + 1}{2\sqrt{\tan{x}}}\,dx \\ dx &= \frac{2u\,du}{u^4 + 1} \end{align*}

$\bg_white \text{Thus, } I = \int \frac{\tan{x} + 1}{\sqrt{\tan{x}}}\ \!dx = \int \frac{u^2 + 1}{u} \times \frac{2u\,du}{u^4 + 1} = 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du$
We need to factorise the denominator:

\bg_white \begin{align*} \text{Now, } u^4 + 1 &= u^2\left(u^2 + \frac{1}{u^2}\right) = u^2\left(u^2 + 2 + \frac{1}{u^2} - 2\right) \\ &= u^2\left[\left(u + \frac{1}{u}\right)^2 - \left(\sqrt{2}\right)^2\right] = u^2\left(u + \frac{1}{u} + \sqrt{2}\right)\left(u + \frac{1}{u} - \sqrt{2}\right) \\ &= \left(u^2 + u\sqrt{2} + 1\right)\left(u^2 - u\sqrt{2} + 1\right) \end{align*}

The integrand can now be decomposed using partial fractions:

\bg_white \begin{align*} \text{Let} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{Au + B}{u^2 + u\sqrt{2} + 1} + \frac{Cu + D}{u^2 - u\sqrt{2} + 1} \qquad \text{where A, B, C, and D are real constants} \\ \\ u^2 + 1 &= (Au + B)\left(u^2 - u\sqrt{2} + 1\right) + (Cu + D)\left(u^2 + u\sqrt{2} + 1\right) \\ \\ \text{Equate coefficients of u^3:} \qquad 0 &= A + C \qquad \qquad \implies \qquad C = -A \\ \text{Put u = 0:} \qquad 1 &= B + D \qquad \qquad \implies \qquad D = 1 - B \\ \text{Equate coefficients of u:} \qquad 0 &= A -B\sqrt{2} + C + D\sqrt{2} \qquad \qquad \implies \qquad B = D = \cfrac{1}{2} \\ \text{Equate coefficients of u^2:} \qquad 1 &= -A\sqrt{2} + B + C\sqrt{2} + D \qquad \qquad \implies \qquad A = C = 0 \\ \\ \text{Thus,} \qquad \cfrac{u^2 + 1}{u^4 + 1} &= \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right) \end{align*}

\bg_white \begin{align*} \text{Hence, I can be found:} \qquad I &= 2\int \frac{u^2 + 1}{u^4 + 1}\ \!du \qquad \text{from above} \\ &= 2\int \frac{1}{2}\left(\frac{1}{u^2 + u\sqrt{2} + 1} + \frac{1}{u^2 - u\sqrt{2} + 1}\right)\ \!du \\ &= \int \frac{1}{\left(u + \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}} + \frac{1}{\left(u - \frac{1}{\sqrt{2}}\right)^2 + \frac{1}{2}}\ \!du \\ \\ &= \frac{1}{1 \times \frac{1}{\sqrt{2}}} \left[\tan^{-1}{\left(\frac{u + \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)} + \tan^{-1}{\left(\frac{u - \frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}\right)}\right] + C' \qquad \text{for some constant C'} \\ \\ &= \sqrt{2} \left[\tan^{-1}{\left(u\sqrt{2} + 1\right)} + \tan^{-1}{\left(u\sqrt{2} - 1\right)}\right] + C' \\ \\ \text{Thus,} \qquad \int \sqrt{\tan{x}} + \sqrt{\cot{x}}\ \!dx &= \sqrt{2} \left[\tan^{-1}{\left(\sqrt{2\tan{x}} + 1\right)} + \tan^{-1}{\left(\sqrt{2\tan{x}} - 1\right)}\right] + C' \end{align*}
Good answer but there's an easier way than doing partial fraction decomposition, so I thought I might share it:

$\bg_white I = 2\int \frac{u^2+1}{u^4+1}du$
$\bg_white I = 2\int \frac{\frac{1}{u^2}+1}{u^2+\frac{1}{u^2}}du$
The logic is basically trying to find a way to cancel the nominator with a substitution so $\bg_white dt=1+\frac{1}{u^2}du \implies t=u-\frac{1}{u}$
$\bg_white I = 2\int \frac{\frac{1}{u^2}+1}{u^2+\frac{1}{u^2} -2(u)(\frac{1}{u})+2}du$
$\bg_white I = 2\int \frac{\frac{1}{u^2}+1}{(u-\frac{1}{u})^2+2}du$
then making the substitution,
$\bg_white I = 2\int \frac{1}{t^2+2} dt$
which should lead to the same solution but simplified with the tan inverses combined

#### unofficiallyred12

##### Member
but when u divide both sides by u^2, a problem is gonna be created when u = 0 so the answers are not actually the same

#### unofficiallyred12

##### Member
$\bg_white \int \sqrt{\tan{x}}\ dx = \int u \times \frac{2u\,du}{u^4 + 1} = \int \frac{2u^2}{u^4 + 1}\ \!du \qquad \text{using the substitution u = \sqrt{\tan{x}}}$

The partial fractions result will now yield both inverse tan and log terms.

Alternatively, focus on

$\bg_white \int \sqrt{\cot{x}}\ dx = \int \frac{1}{u} \times \frac{2u\,du}{u^4 + 1} = \int \frac{2}{u^4 + 1}\ \!du \qquad \text{using the substitution u = \sqrt{\tan{x}}}$

and then subtract the result from the integral found earlier in this thread.
nice, i was intending for it to be done by sqrt(tanx) = 1/2 (sqrttanx + sqrtcotx + sqrttanx - sqrtcotx) tho