The integral $\int_0^{\frac{\pi}{2}}\left(\frac{x}{\sin x}\right)^2\text{d}x$

How to evaluate : $$\int_0^{\frac{\pi}{2}}\left(\frac{x}{\sin x}\right)^2\text{d}x$$ I was wondering how would you use a series expansion?


Solution 1:

Integrate $x^2 \csc^2(x)$ by parts and you get $$2\int_0^{\pi \over 2} x\cot(x)$$ Do it again and you get $$-2\int_0^{\pi \over 2} \ln(\sin x)$$ This is a famous integral (see the first answer in Computing the integral of $\log(\sin x)$) The result is $$\pi \ln 2$$

Solution 2:

Use Bernoulli's form of integration by parts formula $$\int udv = uv - u'v_1 + u''v_2 - ...$$

where $u',u''..$ are successive differentiation of the function $u(x)$ and $v_1, v_2 ..$ are successive integrals of the function $v(x)$.

We get $$\int_0^{\frac{\pi}{2}}\left(\frac{x}{\sin x}\right)^2\text{d}x = [-(x^2 \cot x)]_0^{\pi/2} + [2x \log(\sin x)]_0^{\pi/2} - 2 \int_0^{\frac{\pi}{2}} \log(\sin x) = \pi \log(2)$$

The first two integrals give 0 and the last integral is already computed in the post: Computing the integral of $\log(\sin x)$

Solution 3:

$$\int_0^{\frac{\pi}{2}} \frac{x^2}{\sin^2 x}\, dx=\left[x^2\, (-\cot x)\right]_0^{\frac{\pi}{2}}+\int_0^{\frac{\pi}{2}} 2x\cot x\, dx = \Big[2x\log\sin x\Big]_0^{\frac{\pi}{2}}-\int_0^{\frac{\pi}{2}} 2\log \sin x\, dx=\pi \log 2$$

Solution 4:

Maple seems to get the answer using the Fundamental Theorem of Calculus, using the antiderivative $$ {\frac {-2\,i{x}^{2}}{{{\rm e}^{2\,ix}}-1}}+2\,x\ln \left( 1-{{\rm e} ^{ix}} \right) +2\,x\ln \left( 1+{{\rm e}^{ix}} \right) -2\,i{x}^{2}- 2\,i\,{\rm polylog} \left( 2,{{\rm e}^{ix}} \right) -2\,i\,{\rm polylog} \left( 2,-{{\rm e}^{ix}} \right) $$