I have trouble evaluating $$I=\int_0^{\pi/2}\dfrac{x^2}{\sin x}dx$$ What I did was I applied integration by parts where $u=x^2$ and $dv=\csc x dx$, thereby obtaining $$I=-2\int_0^{\pi/2}x\ln\left(\tan\dfrac{x}{2}\right)dx$$ However, I don't know how to solve this integral. Any ideas are welcome.
-
Note that $\ln \Big( \tan{\frac{x}{2}} \Big) = \ln \Big( \sin{\frac{x}{2}} \Big) - \ln \Big( \cos{\frac{x}{2}} \Big)$. This question is the second integral (after substitution); I assume the first is similar. – legionwhale Apr 11 '23 at 02:47
-
Integral calculator gives results in terms of the polylog function so... probably not pretty. https://www.integral-calculator.com/#expr=x%5E2%2Fsin%28x%29&lbound=0&ubound=pi%2F2 – Sean Roberson Apr 11 '23 at 02:48
-
https://math.stackexchange.com/questions/2714146/evaluate-int-0-frac-pi2-fracx2-sin-xdx?noredirect=1 – Accelerator Apr 11 '23 at 03:29
-
$\ln(\tan x)=-2\sum_{n=0}^\infty\frac{\cos((4n+2)x)}{2n+1}$ – Ali Shadhar Apr 15 '23 at 11:10
2 Answers
Let $t= \tan\frac{x}{2} $ \begin{align}J=&\int_0^{\pi/2}x\ln\left(\tan\dfrac{x}{2}\right)dx\\ =&\ 4\int_0^1 \frac{\tan^{-1}t\ln t}{1+t^2}\ \overset{t\to 1/t}{dt} =4 \int_1^\infty \frac{(\frac\pi2-\tan^{-1}t)(-\ln t)}{1+t^2}\ dt\\ =&-\pi\int_1^\infty \frac{\ln t}{1+t^2}dt+ 2 \int_0^\infty \frac{\tan^{-1}t\ln t}{1+t^2}dt=-\pi G+2K \end{align} where \begin{align} K=&\int_0^\infty \frac{\tan^{-1}t\ln t}{1+t^2} dt \\ =& \int_0^\infty \frac{\ln t}{1+t^2} \int_0^1 \frac t{1+ t^2 y^2}dy \overset{t^2\to t}{dt}\\ =& \ \frac14\int_0^1 \int_0^\infty \frac{\ln t}{(1+t)(1+ t y^2)} \overset{t\to 1/(y^2t)}{dt ~dy}\\ =& \ \frac14\int_0^1 \int_0^\infty \frac{-\ln t -2\ln y}{(1+t)(1+ t y^2)}dt ~dy \\ =& \ \frac14\int_0^1 \int_0^\infty \frac{-\ln y}{(1+t)(1+ t y^2)}dt ~dy\\ =& \ \frac12\int_0^1 \frac{\ln^2 y}{1-y^2}dy = \frac12\cdot \frac74\zeta(3)=\frac 78\zeta(3) \end{align} Thus $J= -\pi G +\frac74\zeta(3)$ and $$I=\int_0^{\pi/2}\dfrac{x^2}{\sin x}\ dx =-2J= 2\pi G -\frac72\zeta(3)$$

- 97,352
You could also make a series using $$\frac 1 {\sin(x)}=\frac 1x+2\sum_{n=0}^\infty (-1)^n \,\frac{\left(2^{2 n+1}-1\right) B_{2 n+2}}{(2 n+2)!}x^{2n+1}$$ leading to $$\int \frac {x^2} {\sin(x)}\,dx=\frac 12x^2+\sum_{n=0}^\infty (-1)^n \,\frac{\left(2^{2 n+1}-1\right) B_{2 n+2}}{(n+2) (2 n+2)!}\,x^{2n+4}$$ The definite integral converges very fast since, asymptotically, the ratio of two consecutive terms tends to $\frac 14$. The infinite summation leads to the result already given by @Quanto $$I=\int_0^{\frac \pi 2}\dfrac{x^2}{\sin (x)}dx=2 \pi C-\frac{7 }{2}\zeta (3)=1.54798$$
If you compute the partial sums, you get this number adding $6$ terms only.
Using the above series, you can approximate very accurtely compute $\forall k>0$ $$I_k=\int_0^{\frac \pi 2}\dfrac{x^{k+1}}{\sin (x)}dx $$
For the fun of using my favored $1400^+$ years old approximation of the sine function $$\int_0^{\frac \pi 2}\dfrac{x^2}{\sin (x)}dx \sim \int_0^{\frac \pi 2} \frac{x \left(5 \pi ^2-4 (\pi -x) x\right)}{16 (\pi -x)}\,dx=\frac{30 \log (2)-16}{96} \pi ^3 =1.54851$$

- 260,315