# A hard definite integral with trignometric

How could we get a closed form for this one? $$\displaystyle\int_{0}^{\frac{\pi }{2}}{{{x}^{2}}\sqrt{\tan x}\sin \left( 2x \right)\text{d}x}$$

-
Why do you expect there to be one? A quick numeric computation and a look at the inverse symbolic calculator gives no match for the number (1.1057733282580962321535756282112900456642421892605) –  mrf Jan 23 '13 at 10:38
@mrf the answer is in terms of pai and logs. I dont know what substitution or other methods are involved. –  Ryan Jan 23 '13 at 10:47
Using @rlgordonma's method, the final result can be written in terms of elementary functions and is given by $\frac{\pi \left(5 \pi ^2-6 \pi (\log (4)-2)-3 (8+(\log (4)-4) \log (4))\right)}{96 \sqrt{2}}$. –  Fabian Jan 23 '13 at 11:21
@Fabian: I get precisely what you get. I take it we have Mathematica in common? And I can simplify what I have presented and present the actual result if it is wanted. –  Ron Gordon Jan 23 '13 at 11:52
@rigordonma I am really interested how to get these value :) –  Ryan Jan 23 '13 at 13:20
show 1 more comment

The general method of attack on an integral like this is to recognize that the $x^2$ could be ignored for the time being upon expressing the integral in terms of a suitable parameter which may then be twice differentiated. To wit, after a little manipulatin, I find:

$$\displaystyle \int_{0}^{\frac{\pi}{2}} dx \: {x}^2 \sqrt{\tan x} \sin \left( 2x \right) = 2 \Im{ \int_{0}^{\frac{\pi}{2}} dx \: x^2 e^{i x} \sqrt{\sin{x} \cos{x}}}$$

So consider the following integral:

$$J(\alpha) = \int_{0}^{\frac{\pi}{2}} dx \: e^{i \alpha x} \sqrt{\sin{x} \cos{x}}$$

Note that the integral we seek is

$$\displaystyle \int_{0}^{\frac{\pi}{2}} dx \: {x}^2 \sqrt{\tan x} \sin \left( 2x \right) = -2 \Im{\left [ \frac{\partial^2}{\partial \alpha^2} J(\alpha) \right ]_{\alpha = 1}}$$

It turns out that there is, in fact, a closed for for $J(\alpha)$:

$$J(\alpha) = -\frac{\left(\frac{1}{16}+\frac{i}{16}\right) \sqrt{\frac{\pi }{2}} \left ( e^{\frac{i \pi a}{2}}-i\right) \Gamma \left(\frac{a-1}{4}\right)}{\Gamma \left ( \frac{a+5}{4} \right )}$$

Plugging this into the above expression, you will find terms including polylogs and harmonic numbers, which I will spare you unless explicitly asked for. But this is how you would get a closed-form expression for your integral.

EDIT

The integral is even nicer when we consider

$$J(\alpha) = \int_{0}^{\frac{\pi}{2}} dx \: \sin{\alpha x} \sqrt{\sin{x} \cos{x}}$$

Then

$$J(\alpha) = \frac{\pi ^{3/2} \sin \left(\frac{\pi a}{4}\right)}{8 \Gamma \left(\frac{5-a}{4}\right) \Gamma \left(\frac{5+a}{4}\right)}$$

and

$$\left [ \frac{\partial^2}{\partial \alpha^2} J(\alpha) \right ]_{\alpha = 1} = \frac{\pi \left(-5 \pi ^2+6 \pi (\log (4)-2)+3 (8+(\log (4)-4) \log (4))\right)}{192 \sqrt{2}}$$

The integral we seek is then

$$\int_0^{\frac{\pi}{2}} dx \: x^2 \sqrt{\tan{x}} \sin{(2 x)} = -2 \left [ \frac{\partial^2}{\partial \alpha^2} J(\alpha) \right ]_{\alpha = 1} = \frac{\pi \left(-24+12 \pi +5 \pi ^2-3 \log ^2(4)+12 \log (4)-6 \pi \log (4)\right)}{96 \sqrt{2}}$$

It turns out that the numerical value of the latter value is about $1.10577$, which agrees with the numerical approximation of the integral mentioned by @mrf and verified in Mathematica.

-
Very nice! That was surprising, at least to me. –  mrf Jan 23 '13 at 13:03
@mrf: Thanks. That means a lot given what I've seen you do here. –  Ron Gordon Jan 23 '13 at 20:18

Let $\displaystyle f(z) = \log^{2}(z) \Big( \frac{z-1}{1+z} \Big)^{1/2}$ and integrate around the upper half of the unit circle that is indented at $z=0,1,$ and $-1$.

I'm going to use the principal branches of $\log z, \log(z-1)$, and $\log(z+1)$ so that there is a branch cut on $(-\infty, 1]$.

The contributions from the indentations around the branch points can be shown to be vanishing small.

So

$$\int_{-1}^{0} \log^{2}(|x| + i \pi)\Big( \frac{(1-x)e^{\pi i}}{1+x} \Big)^{\frac{1}{2}}\ dx \ + \int_{0}^{1} \log^{2}(x) \Big(\frac{(1-x)e^{\pi i}}{1+x} \Big)^{1/2} \ dx$$

$$\ + i \int_{0}^{\pi} \log^{2}(e^{it}) \Big(\frac{e^{i t}-1}{1+e^{i t}} \Big)^{1/2} e^{it} \ dt = 0$$



$$\int_{-1}^{0} \log^{2}(|x| + {i \pi})\Big( \frac{(1-x)e^{i \pi}}{1+x} \Big)^{\frac{1}{2}} \ dx = i \int_{0}^{1} \Big(\log x + i \pi \Big)^{2} \Big(\frac{1+x}{1-x} \Big)^{1/2} \ dx$$

$$= i \int_{0}^{1}\Big(\log^{2} (x) + 2 \pi i \log x - \pi^{2} \Big) \frac{1+x}{\sqrt{1-x^{2}}} \ dx$$



$$\int_{0}^{1} \log^{2}(x) \Big(\frac{(1-x)e^{\pi i}}{1+x} \Big)^{1/2} \ dx = i \int_{0}^{1} \log^{2}(x) \frac{1-x}{\sqrt{1-x^{2}}} \ dx$$



$$i \int_{0}^{\pi} \log^{2}(e^{it}) \Big(\frac{e^{i t}-1}{1-e^{i t}} \Big)^{1/2} e^{it} \ dt = -i \int_{0}^{\pi} t^{2} \sqrt{i \tan t/2} \ e^{it} \ dt$$

$$= - i e^{i \pi/4} \int_{0}^{\pi} t^{2} \sqrt{\tan t/2} \ e^{it} \ dt$$

 So we have

$$e^{i \pi /4} \int_{0}^{\pi} t^{2} \sqrt{\tan t/2} \ e^{it} \ dt = 2 \int_{0}^{1} \frac{\log^{2}(x)}{\sqrt{1-x^{2}}} \ dx + 2 \pi i \int_{0}^{1} \frac{\log x}{\sqrt{1-x^{2}}} \ dx$$

$$+ 2 \pi i \int_{0}^{1} \frac{x \log x}{\sqrt{1-x^{2}}} - \pi^{2} \int_{0}^{1} \frac{1}{\sqrt{1-x^{2}}} \ dx - \pi^{2} \int_{0}^{1} \frac{x}{\sqrt{1-x^{2}}} \ dx$$



Now we can use the fact that

$$\int_{0}^{1} \frac{x^{a}}{\sqrt{1-x^{2}}} \ dx = \frac{1}{2} \int_{0}^{1} u^{a/2+1/2-1} (1-u)^{1/2-1} \ du = \frac{1}{2} B \left( \frac{1}{2}, \frac{a}{2}+ \frac{1}{2} \right)$$

to evaluate all of the integrals on the right.



$$\int_{0}^{1} \frac{\log^{2}(x)}{\sqrt{1-x^{2}}} = \frac{d^{2}}{da^{2}} \frac{1}{2} B \left( \frac{1}{2}, \frac{a}{2}+ \frac{1}{2} \right) \Big|_{a=0}$$

$$= \frac{1}{8} B \left( \frac{1}{2}, \frac{1}{2} \right) \Big[ \Big( \psi (\frac{1}{2} ) - \psi_{1}(1) \Big)^{2} + \psi_{1}(\frac{1}{2}) - \psi_{1}(1) \Big] = \frac{\pi^{3}}{24} + \frac{\log^{2} 4}{8}$$



$$\int_{0}^{1} \frac{\log x}{\sqrt{1-x^{2}}} \ dx = \frac{1}{2} \frac{d}{da} \frac{1}{2} B \left( \frac{1}{2}, \frac{a}{2}+ \frac{1}{2} \right) \Big|_{a=0}$$

$$= \frac{1}{4} B \left( \frac{1}{2}, \frac{1}{2} \right) \left( \psi(\frac{1}{2}) - \psi(1) \right) = - \frac{\pi \log 2}{2}$$



$$\int_{0}^{1} \frac{x \log x}{\sqrt{1-x^{2}}} \ dx = \frac{1}{2} \frac{d}{da} \frac{1}{2} B \left( \frac{1}{2}, \frac{a}{2}+ \frac{1}{2} \right) \Big|_{a=1}$$

$$= \frac{1}{4} B \left( \frac{1}{2}, 1 \right) \left( \psi(1) - \psi(\frac{3}{2}) \right) = \log 2 -1$$



$$\int_{0}^{1} \frac{1}{\sqrt{1-x^{2}}} \ dx = \frac{\pi}{2}$$



$$\int_{0}^{1} \frac{x}{\sqrt{1-x^{2}}} \ dx = 1$$



Then

$$\int_{0}^{\pi} t^{2} \sqrt{\tan t/2} \ e^{it} \ dt = e^{-i \pi /4} \Big( \frac{\pi^{3}}{12} + \frac{\pi \log^{2} 4}{4} - i \pi^{2} \log 2 + 2 \pi i \log 2 - 2 \pi i - \frac{\pi^{3}}{2} - \pi^{2} \Big)$$

or

$$\int_{0}^{\pi /2} t^{2} \sqrt{\tan t} \ e^{2it} \ dt = \frac{e^{-i \pi /4}}{8} \Big( \frac{\pi^{3}}{12} + \frac{\pi \log^{2} 4}{4} - i \pi^{2} \log 2 + 2 \pi i \log 2 - 2 \pi i - \frac{\pi^{3}}{2} - \pi^{2} \Big)$$



The final step is then to extract the imaginary parts on both sides of the equation.

-