试计算 $\dps{\int_0^{\cfrac{\pi}{2}}\cfrac{x^2}{\sin^2x}\rd x}$.
解答: $$\beex \bea \int_0^{\cfrac{\pi}{2}}\cfrac{x^2}{\sin^2x}\rd x &=-\int_0^{\cfrac{\pi}{2}} x^2\rd \cot x\\ &=2\int_0^{\cfrac{\pi}{2}} x \cot x\rd x\\ &=2\int_0^{\cfrac{\pi}{2}} x\rd \ln \sin x\\ &=-2\int_0^{\cfrac{\pi}{2}} \ln \sin x\rd x. \eea \eeex$$ 往求 $$\beex \bea \int_0^{\cfrac{\pi}{2}} \ln \sin x\rd x &=\int_0^{\cfrac{\pi}{2}} \ln \cos x\rd x\quad\sex{\cfrac{\pi}{2}-x\leftrightsquigarrow x}\\ &=\cfrac{1}{2}\int_0^{\cfrac{\pi}{2}} \ln \sin x+\ln \cos x\rd x\\ &=\cfrac{1}{2}\int_0^{\cfrac{\pi}{2}} \ln \sin 2x\rd x-\cfrac{\pi}{4}\ln 2\\ &=\cfrac{1}{4}\int_0^{\cfrac{\pi}{2}} \ln \sin 2x\rd x-\cfrac{\pi}{4}\ln 2\quad\sex{2x\leftrightsquigarrow x}\\ &=\cfrac{1}{4}\sez{ \int_0^{\cfrac{\pi}{2}} \ln \sin x\rd x+\int_0^{\cfrac{\pi}{2}} \ln \cos x\rd x }-\cfrac{\pi}{4}\ln 2\\&\quad\sex{x-\cfrac{\pi}{2}\leftrightsquigarrow x}\\ &=\cfrac{1}{2}\int_0^{\cfrac{\pi}{2}} \ln \sin x-\cfrac{\pi}{4}\ln 2. \eea \eeex$$ 于是 $$\bex \int_0^{\cfrac{\pi}{2}} \ln\sin x\rd x=-\cfrac{\pi}{2}\ln 2,\quad \int_0^{\cfrac{\pi}{2}} \cfrac{x^2}{\sin^2x}\rd x=\pi \ln 2. \eex$$