33
$\begingroup$

Which is the easiest way to evaluate $\int \limits_{0}^{\pi/2} (\sqrt{\tan x} +\sqrt{\cot x})$?

I have reduced this problem to $ 2\int_0^{\pi/2} \sqrt{\tan x} \ dx$

but now, evaluating this integral is giving me some problems, simply substituting $u=\tan(x)$ and then $\mathrm{d}u=\sec^2(x)\mathrm{d}x \Rightarrow \frac{\mathrm{d}u}{1+u^2}=\mathrm{d}x$ and which in turn gives something a bit ugly, I was wondering which is the most elegant way to evaluate this?

8 Answers 8

39

${\int_0^{\frac{\pi}{2}} \sqrt{\tan x}dx + \sqrt{\cot x}dx}$ $={\int_0^{\frac{\pi}{2}}\frac{\sin x + \cos x}{\sqrt{\sin x \cos x}}dx = \int_0^{\frac{\pi}{2}} \frac{\sin x + \cos x}{\frac{\sqrt{2\sin{x}\cos{x}}}{\sqrt{2}}}dx = \sqrt{2}\int_0^{\frac{\pi}{2}} \frac{ \sin{x} + \cos{x}}{\sqrt{1 - (1 - 2 \sin{x} \cos{x})}}dx}$ ${=\sqrt{2}\int_0^{\frac{\pi}{2}} \frac{ \sin{x} + \cos{x}}{\sqrt{1 - (\sin{x} - \cos{x})^2}}dx}$

Let ${t = \sin{x} - \cos{x}}$, $\Large {{\small{dx}} = \frac{dt}{\sin{x} + \cos{x}}}$ ${x \to \frac{\pi}{2} \implies t = (\sin{x} - \cos{x}) \to 1}$ ${x \to 0 \implies t = (\sin{x} - \cos{x}) \to -1}$

$\sqrt{2}\int_{-1}^{1} \frac{1}{\sqrt{1 - t^2}}dt = \sqrt{2}\left[\sin^{-1}{t}\right]_{-1}^{1} = \sqrt{2}\left[\frac{\pi}{2} - \left(- \frac{\pi}{2} \right) \right] = \sqrt{2} \pi $


I think this might be the simplest approach.

  • 0
    It is really the simplest approach +12016-05-07
20

I would argue the easiest way is to use the Gamma function. Notice that by making the change $x=\sin^2(u)$ we get that $\int_0^1 x^{-\frac{1}{4}}(1-x)^{-\frac{3}{4}}dx=2\int_0^{\pi/2}\sqrt{\tan(x)}dx$ Then this is $B\left(\frac{1}{4},\frac{3}{4}\right)=\Gamma\left(\frac{1}{4}\right)\Gamma\left(\frac{3}{4}\right)=\frac{\pi}{\sin\left(\frac{\pi}{4}\right)}=\sqrt{2}\pi.$

  • 0
    @Eric Spreen: Thanks, edited.2016-05-07
15

Let $u=\sqrt{\tan(x)}$. Then $u^2 = \tan(x)$ and $2 u \mathrm{d} u = (1+ \tan^2(x)) \mathrm{d} x$. Thus $ \int_0^{\frac{\pi}{2}} \sqrt{\tan(x)} \mathrm{d} x = \int_0^\infty \frac{2u^2}{1+u^4} \mathrm{d} u $ Since $1+u^4 = (1 + \sqrt{2} u + u^2)( 1- \sqrt{2} u + u^2)$, partial fraction decomposition applies: $ \frac{2u^2}{1+u^4} = \frac{1}{\sqrt{2}} \left( \frac{u}{u^2-\sqrt{2} u+1}-\frac{u}{u^2+\sqrt{2} u+1} \right) $ Hence $ \begin{eqnarray} \int \frac{2u^2}{1+u^4} \mathrm{d} u &=& \frac{1}{2 \sqrt{2}} \log \left(\frac{u^2-\sqrt{2} u+1}{u^2+\sqrt{2} u+1}\right) + \\ &\phantom{=}& \frac{\tan ^{-1}\left(\sqrt{2} u+1\right) -\tan ^{-1}\left(1-\sqrt{2} u\right) }{\sqrt{2}} \end{eqnarray} $ Applying the fundamental theorem of calculus: $ \int_0^{\pi/2} \sqrt{\tan(x)} \mathrm{d} x = \frac{\pi}{\sqrt{2}} $

  • 0
    I would add a step after getting the integral in terms of u. Write $u^{4}+1 =(u^{4}+2u^{2}+1)-2u^{2} = (u^{2}+1)^{2}-(\sqrt{2}u)^{2}$. The claimed factorization then follows immediately.2016-03-06
8

Hint: subtituting $u=\sin^2 x$ you will get the beta function, you will also need some basic properties of beta and gamma functions

  • 0
    However this question was in my school, and we haven't learnt gamma function yet! so that's not the easiest way!2015-12-03
7

We will employing the substitution $u=\sqrt{\tan x}$: u'= \frac{1+\tan^2 x}{2 \sqrt{\tan x}} and $2\int_0^{\pi/2} \sqrt{\tan x}\,dx = 4 \int_0^\infty \frac{u^2}{1+u^4} du= 2 \int_{-\infty}^\infty \frac{u^2}{1+u^4} du.$ The last integral has two poles ($u_1 = e^{i\pi/4}$, $u_2=e^{i3\pi/4}$) in the upper complex half-plane. The corresponding residue are $\text{Res}_{u=u_1} \frac{u^2}{1+u^4} = -\frac{u_2}{4} \qquad\qquad \text{Res}_{u=u_1} \frac{u^2}{1+u^4} = -\frac{u_1}{4}. $

Thus the value of the integral is $2\int_0^{\pi/2} \sqrt{\tan x}\,dx =- \pi i (u_1+u_2)=\sqrt{2}\pi$

  • 0
    Whilst the question does ask for elegance, I didn't see this as a hel$p$ful answer at the time. Maybe I was wrong, and I acted rashly.2012-01-19
7

$ \int_0^{\frac{\pi}{2}} \sqrt{\tan(x)} \mathrm{d} x = \int_0^\infty \frac{2u^2}{1+u^4} \mathrm{d} u $

$ = \int^{\infty}_0 \frac{u^2+1}{1+u^4} + \frac{u^2-1}{1+u^4} \mathrm{d} u $

$ = \int^{\infty}_0 \frac{\mathrm{d} (u-1/u)}{ (u-1/u)^2 +2 } + \int^{\infty}_0 \frac{\mathrm{d} (u+1/u)}{ (u+1/u)^2 -2 } $

and these have simple primitives in terms of arctan and logs. I like the Beta function approach or residues better, but this is something a high schooler can do.

2

Using the fact that $\cot(x)=\tan\left(\frac\pi2-x\right)$, we get $ \begin{align} \int_0^{\pi/2}\left(\sqrt{\tan(x)}+\sqrt{\cot(x)}\right)\mathrm{d}x &=2\int_0^{\pi/2}\sqrt{\tan(x)}\,\mathrm{d}x\tag{1}\\ &=2\int_0^{\pi/2}\frac{\sqrt{\tan(x)}}{1+\tan^2(x)}\,\mathrm{d}\tan(x)\tag{2}\\ &=2\int_0^\infty\frac{u^{1/2}}{1+u^2}\,\mathrm{d}u\tag{3}\\ &=\int_0^\infty\frac{t^{-1/4}}{1+t}\,\mathrm{d}t\tag{4}\\[3pt] &=\mathrm{B}\left(\frac34,\frac14\right)\tag{5}\\ &=\frac{\Gamma\left(\frac34\right)\Gamma\left(\frac14\right)}{\Gamma(1)}\tag{6}\\[3pt] &=\pi\csc\left(\frac\pi4\right)\tag{7}\\[9pt] &=\pi\sqrt2\tag{8} \end{align} $ Explanation:
$(1)$: use $\cot(x)=\tan\left(\frac\pi2-x\right)$
$(2)$: $\mathrm{d}\tan(x)=\left(1+\tan^2(x)\right)\mathrm{d}x$
$(3)$: substitute $u=\tan(x)$
$(4)$: substitute $t=u^2$
$(5)$: apply the Beta Function
$(6)$: write the Beta function in terms of the Gamma function
$(7)$: apply Euler's Reflection Formula
$(8)$: evaluate $(7)$

1

Often it is much easier to first evaluate the indefinite integral in terms of $x$ and then evaluate the definite integral by using the Fundamental Theorem and then substituting the limit.

$\int \left(\sqrt{\tan x} + \sqrt{\cot x}\right)\, \mathrm dx= \sqrt2 \arctan\left\{\frac{\tan x - 1}{\sqrt{2\,\tan x}}\right\}$

Then use $\int_a^b f(x)\,\mathrm dx= F(b)- F(a)\,,$

\begin{align}\int_{0}^{\pi/2}\, \left(\sqrt{\tan x} + \sqrt{\cot x}\right)\, \mathrm dx&= \sqrt2 \arctan\left\{\frac{\tan\left(\frac{\pi}{2}\right) - 1}{\sqrt{2\,\tan \left(\frac{\pi}{2}\right)}}\right\}- \sqrt2 \arctan\left\{\frac{\tan 0 - 1}{\sqrt{2\,\tan 0}}\right\}\\ & = \sqrt2 \arctan\left\{\frac{\sqrt{\tan\left(\frac{\pi}{2}\right)} - \frac{1}{\sqrt{\tan\left(\frac{\pi}{2}\right)}}}{\sqrt{2}}\right\}- \sqrt 2\arctan\left\{\frac{\sqrt{\tan0} - \frac{1}{\sqrt{\tan 0}}}{\sqrt{2}}\right\}\\ &= \sqrt 2\arctan(\infty)- \sqrt 2\arctan(-\infty)\\ &= \sqrt {2}\left(\frac{\pi}{2} + \frac{\pi}{2}\right)\\ & = \sqrt 2 \pi\;.\end{align}