I want to evaluate $$\int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx$$
First,I tried to evaluate like this:
$$\int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx=\int_{0}^{\frac{\pi}{2}}x^2\left(\frac{1+\cos x}{\sin x}\right)\frac{dx}{1+\cos x}=\int_{0}^{\frac{\pi}{2}}x^2\left(\frac{1+\cos x}{\sin x}\right)d\left(\frac{\sin x}{1+\cos x}\right)$$
$$=\int_{0}^{\frac{\pi}{2}}x^2d\log\left(\frac{\sin x}{1+\cos x}\right)=x^2\log\left(\frac{\sin x}{1+\cos x}\right)|_{0}^{\frac{\pi}{2}}-2\int_{0}^{\frac{\pi}{2}}x\log\left(\frac{\sin x}{1+\cos x}\right)dx$$
$$=0+2\int_{0}^{\frac{\pi}{2}}x\log\left(\frac{1+\cos x}{\sin x}\right)dx=2\int_{0}^{\frac{\pi}{2}}x\log\left(1+\cos x\right)dx-2\int_{0}^{\frac{\pi}{2}}x\log\left(\sin x\right)dx$$
$$=2\int_{0}^{\frac{\pi}{2}}x\log\cot \left(\frac{x}{2}\right)dx=8\int_{0}^{\frac{\pi}{4}}x\log\cot xdx$$
but I can't proceed next step,help me,thanks.
Answer
At the price of special functions, the antiderivative could be computed
$$I=\int\frac{x^2}{ \sin x}\,dx=-4 i x \text{Li}_2\left(e^{i x}\right)+i x \text{Li}_2\left(e^{2 i x}\right)+4
\text{Li}_3\left(e^{i x}\right)-\frac{1}{2} \text{Li}_3\left(e^{2 i x}\right)-2
x^2 \tanh ^{-1}\left(e^{i x}\right)$$ where appear the polylogarithm functions.
$$\lim_{x\to \frac{\pi }{2}} \, I=2 \pi C\qquad \text{and} \qquad\lim_{x\to 0} \, I=\frac{7 }{2}\zeta (3)\implies \int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx=2 \pi C-\frac{7 }{2}\zeta (3)$$ as given by Wolfram Alpha. This evaluates a $\approx 1.54798$.
For a fast approximation, we could use the superb approximation $$\sin(x) \simeq \frac{16 (\pi -x) x}{5 \pi ^2-4 (\pi -x) x}\qquad (0\leq x\leq\pi)$$ which was proposed by Mahabhaskariya of Bhaskara I, a seventh-century Indian mathematician (have a look here).
This would make
$$I \approx J= - \int \left(\frac{x^2}{4}+\frac{5 \pi ^3}{16 (x-\pi )}+\frac{5 \pi ^2}{16} \right)\,dx=-\frac{x^3}{12}-\frac{5 \pi ^2 x}{16}-\frac{5}{16} \pi ^3 \log (\pi -x)+\frac{19
\pi ^3}{48}$$
$$\lim_{x\to \frac{\pi }{2}} \, J=\frac{\pi ^3}{48} \left(11-15 \log \left(\frac{\pi }{2}\right)\right)\qquad \text{and} \qquad\lim_{x\to 0} \, J
=\frac{\pi ^3}{48} (19-15 \log (\pi ))$$ leading to the approximation
$$\int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx\approx \frac{\pi ^3}{48} (15 \log (2)-8)\approx 1.54851$$ which is not too bad.
Tha advantage of such approximation is that it allows a fast evaluation of
$$K(t)=\int_{0}^{t}\frac{x^2}{ \sin x}dx$$ The table below compares the approximation to the exact result
$$\left(
\begin{array}{ccc}
t & \text{approximation} & \text{exact} \\
\frac{\pi }{20} & 0.01221 & 0.01236 \\
\frac{\pi }{10} & 0.04936 & 0.04976 \\
\frac{3 \pi }{20} & 0.11258 & 0.11312 \\
\frac{\pi }{5} & 0.20358 & 0.20409 \\
\frac{\pi }{4} & 0.32475 & 0.32508 \\
\frac{3 \pi }{10} & 0.47939 & 0.47945 \\
\frac{7 \pi }{20} & 0.67196 & 0.67176 \\
\frac{2 \pi }{5} & 0.90847 & 0.90807 \\
\frac{9 \pi }{20} & 1.19701 & 1.19650 \\
\frac{\pi }{2} & 1.54851 & 1.54798 \\
\frac{11 \pi }{20} & 1.97802 & 1.97746 \\
\frac{3 \pi }{5} & 2.50657 & 2.50583 \\
\frac{13 \pi }{20} & 3.16447 & 3.16315 \\
\frac{7 \pi }{10} & 3.99696 & 3.99445 \\
\frac{3 \pi }{4} & 5.07529 & 5.07091 \\
\frac{4 \pi }{5} & 6.52008 & 6.51359 \\
\frac{17 \pi }{20} & 8.55922 & 8.55230 \\
\frac{9 \pi }{10} & 11.7067 & 11.7077 \\
\frac{19 \pi }{20} & 17.6067 & 17.6510
\end{array}
\right)$$
No comments:
Post a Comment