A Daunting Integral

Calculus Level 2

0 π 2 tan x d x \large \int_0^\frac \pi 2\sqrt{\tan{x}}\ dx

Evaluate this integral.


The answer is 2.221.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

7 solutions

Pratik Rathore
Jun 20, 2018

Let I = 0 π 2 tan x d x I = \int_{0}^{\frac{\pi}{2}} \sqrt{\tan x} \,dx

We make the substitution u = π 2 x u = \frac{\pi}{2} - x , which gives I = 0 π 2 cot x d x I = \int_{0}^{\frac{\pi}{2}} \sqrt{\cot x} \,dx

Adding the two integrals together, we have

2 I = 0 π 2 tan x + cot x d x = 0 π 2 sin x cos x + cos x sin x d x = 0 π 2 sin x + cos x cos x sin x d x 2I = \int_{0}^{\frac{\pi}{2}} \sqrt{\tan x} + \sqrt{\cot x} \,dx = \int_{0}^{\frac{\pi}{2}} \sqrt{\frac{\sin x}{\cos x}} + \sqrt{\frac{\cos x}{\sin x}} \,dx = \int_{0}^{\frac{\pi}{2}} \frac{\sin x + \cos x}{\sqrt{\cos x \sin x}} \,dx

Now we make the substitution u = sin x cos x u = \sin x - \cos x . We see that d u = ( sin x + cos x ) d x du = ( \sin x + \cos x ) \, dx and cos x sin x = 1 u 2 2 \cos x \sin x = \frac{1-u^{2}}{2} . Therefore,

0 π 2 sin x + cos x cos x sin x d x = 1 1 2 1 u 2 d u = 2 arcsin ( u ) 1 1 = π 2 \int_{0}^{\frac{\pi}{2}} \frac{\sin x + \cos x}{\sqrt{\cos x \sin x}} \,dx = \int_{-1}^{1} \frac{\sqrt{2}}{\sqrt{1-u^{2}}} \,du = \sqrt{2} \arcsin(u) \big|_{-1}^{1} = \pi \sqrt{2}

Then 2 I = π 2 I = π 2 2 2I = \pi \sqrt{2} \implies I = \boxed{\frac{\pi \sqrt{2}}{2}} .

This is exactly the simplest method I've seen.

Kelvin Hong - 2 years, 11 months ago

How did you figure out that cos(x)sin(x) = (1-u^2)/2?

Giuseppe Vitiello - 2 years, 11 months ago

Log in to reply

(sin x - cos x)^2 =1 - 2sinxcosx 1-u^2= 2sinx cosx thus (1-u^2)\2=sinxcosx

Cubexyz 1 - 2 years, 11 months ago

This is a nice method. I solved with a different method.

Valdemar Domingos - 2 years, 11 months ago

very simple, very effective method

ari krishna - 3 months, 2 weeks ago
Mark Hennings
Jun 4, 2018

0 1 2 π tan x d x = 0 1 2 π sin 1 2 x cos 1 2 x d x = 1 2 B ( 3 4 , 1 4 ) = 1 2 Γ ( 3 4 ) Γ ( 1 4 ) = 1 2 π c o s e c 1 4 π = π 2 \int_0^{\frac12\pi} \sqrt{\tan x}\,dx \; = \; \int_0^{\frac12\pi} \sin^{\frac12}x \cos^{-\frac12}x\,dx \; = \; \tfrac12B(\tfrac34,\tfrac14) \; = \; \tfrac12\Gamma(\tfrac34)\Gamma(\tfrac14) \; = \; \tfrac12\pi \mathrm{cosec}\,\tfrac14\pi \; = \; \boxed{\tfrac{\pi}{\sqrt{2}}}

1
2
3
4
5
6
7
8
9
from scipy.integrate import quad
# The function quad is provided to integrate a function of one variable between two points. 
from math import sqrt, tan, pi

def integrand(x):
    return sqrt(tan(x))

ans, err = quad(integrand, 0, 0.5*pi)
print ans

1
2.22144146908

Michael Fitzgerald - 2 years, 11 months ago

Very nice succinct answer. Here's a much less impressive Pythonic solution

Michael Fitzgerald - 2 years, 11 months ago

1
2
3
4
5
6
7
from scipy.integrate import quad
# Let z = sqrt(tan(x))
def integrand(z):
    return z**2/(1+z**4)

ans, err = quad(integrand, float('-inf'), float('inf'))
print ans

1
2.22144146908

Michael Fitzgerald - 2 years, 11 months ago

Using substitution

Michael Fitzgerald - 2 years, 11 months ago

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#Solution #3

from scipy.integrate import quad
from math import sqrt
# u = pi/2 - x
def integrand(u):
    Two_I = sqrt(2)/sqrt(1-u**2)
    return Two_I/2

ans, err = quad(integrand, -1, 1)
print ans

1
2.22144146908

Michael Fitzgerald - 2 years, 11 months ago

Log in to reply

None of this is a real solving for the integral... I can also use any software calculator, Mathematica, Symbolab, etc... and with this I'm not solving the integral. What's the point?

Valdemar Domingos - 2 years, 11 months ago

Log in to reply

I guess losing the WC soccer wasn't enough, you want to lose here as well? Where's your solution?

Michael Fitzgerald - 2 years, 11 months ago

May I ask what the B and the capital gamma stand for?

Larry Gu - 2 years, 11 months ago

Log in to reply

The beta and gamma functions respectively. The Gamma function is defined by Γ ( x ) = 0 t x 1 e t d t x > 0 \Gamma(x) \; = \; \int_0^\infty t^{x-1}e^{-t}\,dt \hspace{2cm} x > 0 and is an extension of the factorial function, since Γ ( n + 1 ) = n ! n = 0 , 1 , 2 , 3 , . . . \Gamma(n+1) = n! \hspace{2cm} n = 0,1,2,3,... (the fact that Γ ( 1 ) = 1 \Gamma(1) = 1 is one important reason why we put 0 ! = 1 0! = 1 ). The beta function is B ( a , b ) = Γ ( a ) Γ ( b ) Γ ( a + b ) B(a,b) \; =\; \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}

Mark Hennings - 2 years, 11 months ago

Log in to reply

Sir can you explain what is 't' in the Gamma function?

Aman thegreat - 2 years, 11 months ago

Log in to reply

@Aman Thegreat It’s just the dummy variable I am using to integrate with.

Mark Hennings - 2 years, 11 months ago
Alex Jones
Jun 18, 2018

Desmos exists.

Ron Nissim
Jun 4, 2018

After preforming the substitution z = tan x z=\sqrt{\tan{x}} the integral becomes 0 2 z 2 1 + z 4 d z \int_{0}^{\infty} \frac{2z^2}{1+z^4} dz . Since f ( z ) = z 2 1 + z 4 f(z)=\frac{z^2}{1+z^4} is an even function, 0 2 z 2 1 + z 4 d z = z 2 1 + z 4 d z \int_{0}^{\infty} \frac{2z^2}{1+z^4} dz=\int_{-\infty}^{\infty}\frac{z^2}{1+z^4} dz . Now turning to complex analysis z 2 1 + z 4 d z Γ z 2 1 + z 4 d z \int_{-\infty}^{\infty} \frac{z^2}{1+z^4} dz \to \oint_\Gamma \frac{z^2}{1+z^4} dz as R R\to\infty where Γ \Gamma is taken to be the counterclockwise path along the interval [ R , R ] [-R,R] on the real axis and the semi-circle on the upper half plane centered at the origin with radius R R . This is because f ( z ) f(z) is a meromorphic function on the complex plane and lim z π z f ( z ) = 0 \lim_{|z|\to\infty} \pi z f(z) = 0 (Therefore the integral vanishes on the semi-circle part of the path due to the M L ML Inequality). Now we can use the residue theorem and L'Hopital's rule to find that Γ z 2 1 + z 4 d z = 2 π i i r e s ( f ( z ) , z i ) = 2 π i ( lim z e π i 4 ( z e π i 4 ) f ( z ) + lim z e 3 π i 4 ( z e 3 π i 4 ) f ( z ) ) = π 2 2.221 \oint_\Gamma \frac{z^2}{1+z^4} dz = 2\pi i \sum_{i} res(f(z),z_i) = 2\pi i (\lim_{z\to e^{\frac{\pi i}{4}}} (z-e^{\frac{\pi i}{4}})f(z) + \lim_{z\to e^{\frac{3\pi i}{4}}} (z-e^{\frac{3\pi i}{4}})f(z))= \boxed{\frac{\pi}{\sqrt{2}}} \approx 2.221 . (The points z i z_i are the poles of f ( z ) f(z) on the upper half of the complex plane).

The substitution z = u 1 z = u^{-1} shows that 0 2 z 2 1 + z 4 d z = 0 2 1 + z 4 d z \int_0^\infty \frac{2z^2}{1 + z^4}\,dz \; = \; \int_0^\infty \frac{2}{1+z^4}\,dz and hence 0 2 z 2 1 + z 4 = 1 2 0 2 ( z 2 + 1 ) z 4 + 1 d z = 1 2 0 ( 1 z 2 + 2 z + 1 + 1 z 2 2 z + 1 ) d z = 1 2 [ tan 1 ( 2 z + 1 ) + tan 1 ( 2 u 1 ) ] 0 = π 2 \begin{aligned} \int_0^\infty \frac{2z^2}{1 + z^4} & = \; \frac12\int_0^\infty\frac{2(z^2+1)}{z^4+1}\,dz \; = \; \frac12\int_0^\infty \left(\frac{1}{z^2 + \sqrt{2}z + 1} + \frac{1}{z^2 - \sqrt{2}z + 1}\right)\,dz \\ & = \; \frac{1}{\sqrt{2}}\Big[\tan^{-1}(\sqrt{2}z+1) + \tan^{-1}(\sqrt{2}u-1) \Big]_0^\infty \; = \; \frac{\pi}{\sqrt{2}} \end{aligned} if you want a derivation without using contour integration.

Mark Hennings - 3 years ago

Log in to reply

Neat! You have a u u in there that should be a z z .

Jeremy Galvagni - 2 years, 11 months ago
한얼 이
Jun 21, 2018

Wolfram Alpha says

Devansh Sehta
Jun 20, 2018

0 2 t 2 1 + t 4 d t = 0 2 1 + t 4 d t \displaystyle \int_{0}^{\infty} \frac{2t^2}{1+t^4} dt = \int_{0}^{\infty} \frac{2}{1+t^4} dt (taking t=1/x)

0 1 + t 2 1 + t 4 d t \displaystyle \int_{0}^{\infty} \frac{1+t^2}{1+t^4}dt (now dividing numerator and denominator by t² and taking x=t-1/t)

1 x ² + 2 d x = π 2 \displaystyle \int_{-\infty}^{\infty} \frac{1}{x²+2}dx=\frac{\pi}{\sqrt2}

Vinod Kumar
Jun 19, 2018

Used wolfram alpha free widget for definite integral to get the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...