# Calculate $\int_{0}^{\pi\over 2}{dx\over {1+\sqrt{\tan x}}}$

I need to calculate $$\int_{0}^{\pi\over 2}{dx\over {1+\sqrt{\tan x}}}$$

In this section of the course where this problem is, we have seen 2 techniques: integration by parts and substitution, so I am assuming the solution has to make use of one of those somewhere.

• Attempt to use integration by parts: We define $$f(x):={1\over 1+\sqrt{\tan x}}$$ and $$g(x):=x$$

We then have $$\int_{0}^{\pi\over 2}{dx\over {1+\sqrt{\tan x}}}=\int_{0}^{\pi\over 2}fg'=(fg)({\pi\over 2})-(fg)(0)-\int_{0}^{\pi\over 2}f'g$$

but f'(x) is a relatively complicated expression and doing this seems to only make matters worse.

• Attempt to use substitution: We define $$g(x):=\sqrt{\tan x}$$ in an attempt to get the form $$\int_{0}^{\pi\over 2}{g'(x)\over 1+g(x)}$$

but then again this derivative is a complicated expression which only seems to make the problem tougher. I am just not seeing how to simplify.

• Try the substitution $t=\pi/2-x$ Oct 29, 2019 at 16:18
• The result should be $$\frac{\pi}{4}$$ Oct 29, 2019 at 16:19

Let $$I(a)=\int_{0}^\frac{\pi}{2}\frac{1}{1+\tan^a(x)}dx$$ Enforcing the substitution $$t=\frac{\pi}{2}-x\implies dt=-dx$$ $$I(a)=\int_{0}^\frac{\pi}{2}\frac{1}{1+\cot^a(t)}dt=\int_{0}^\frac{\pi}{2}\frac{\tan^a(t)}{1+\tan^a(t)}dt$$ Adding the two representations of $$I(a)$$: $$2I(a)=\int_{0}^\frac{\pi}{2}dt=\frac{\pi}{2}$$ Solving for $$I(a)$$: $$I(a)=\frac{\pi}{4}$$ Plugging $$a=\frac{1}{2}\implies I\left(\frac{1}{2}\right)=\frac{\pi}{4}$$