0

$$\int_0^{\frac{\pi}{2}} \frac{x}{\sin{x}}dx$$ I tried using $$\int_0^{\frac{\pi}{2}} \frac{2ix}{e^{ix}-e^{-ix}}dx$$ And then factoring and making use of the Geometric Series $$\int_0^{\frac{\pi}{2}} \frac{2ix}{e^{-ix}(e^{2ix}-1)}dx$$ $$-\int_0^{\frac{\pi}{2}} \frac{2ixe^{ix}}{1-e^{2ix}}dx$$ $$-2i\sum_{n=0}^{\infty}\int_0^{\frac{\pi}{2}} e^{ix(2n+1)}dx$$ Then the series comes out to be $$-2i\sum_{n=0}^{\infty} \bigg(\frac{\pi e^{i\pi n}n}{(2n+1)^2} + \frac{ie^{i\pi n}}{(2n+1)^2} - \frac{1}{(2n+1)^2} + \frac{\pi e^{i\pi n}}{2(2n+1)^2}\bigg)$$

$$-2i\sum_{n=0}^{\infty} \bigg(\frac{(-1)^n \pi n}{(2n+1)^2} + \frac{(-1)^n i}{(2n+1)^2} - \frac{1}{(2n+1)^2} + \frac{(-1)^n \pi}{2(2n+1)^2}\bigg)$$

I think this simplifies a little to be $$-2i\sum_{n=0}^{\infty} \bigg(\frac{(-1)^n \pi n}{(2n+1)^2} + iG - \frac{1}{(2n+1)^2} + \frac{\pi}{2}G\bigg)$$ But I'm unsure how to evaluate the two remaining terms. Can someone help me find these or is there another elegant method to solve this integral that I missed?

  • Wolfam claims it equals $2C$ for $C$ the Catalan constant but it would have been helpful for you to provide this reference value in the main post – FShrike May 22 '23 at 17:23
  • You've made a few typos but I've also presented you with a way to continue your approach – FShrike May 22 '23 at 18:00

2 Answers2

3

Here is a simple solution: $$I=\int_0^{\frac{\pi}{2}}\frac{x}{\sin x} dx=$$ $$=\frac12\int_0^{\frac{\pi}{2}}\frac{x}{\sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)}dx=$$ $$=\frac12\int_0^{\frac{\pi}{2}}\frac{x}{\tan\left(\frac{x}{2}\right)\cos^2\left(\frac{x}{2}\right)}dx=$$ now let $y=\tan\left(\frac{x}{2}\right)$, so we have $dy=\sec^2\left(\frac{x}{2}\right) \cdot \frac12 dx=\frac{1}{\cos^2\left(\frac{x}{2}\right)}\cdot \frac12 dx$ and $x=2\arctan y$. Now $I$ becomes: $$I=2\int_0^1\frac{\arctan y}{y} dy=$$ $$=2\int_0^1\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}y^{2n+1}\cdot\frac{1}{y} dy=$$ $$=2\int_0^1\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}y^{2n}dy=$$ $$=2\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}\int_0^1y^{2n}dy=$$ $$=2\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^2}=2G$$ where we used the definition of $G$: $$G=\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^2}$$

Zima
  • 4,125
2

A way to continue with your approach is left below.


$\newcommand{\d}{\,\mathrm{d}}$Define a logarithm $\log:\Bbb C^\star\to\Bbb C$ as induced by the choice of argument $-\pi<\arg\le\pi$.

It is claimed that: $$\int_0^{\pi/2}x\csc x\d x=2C$$This is probably very doable with some substitutions and real analytic tricks but I find the complex methods more fun. It suffices to show that: $$J:=\int_{-\pi/2}^{\pi/2}x\csc x\d x\overset{?}{=}4C$$Or, where $\gamma$ is the semicircular contour from $-i$ up to $1$ and then to $i$: $$J=\int_{-\pi/2}^{\pi/2}\frac{-2i\cdot\log(e^{ix})}{(e^{ix})^2-1}(ie^{ix})\d x=-2i\cdot\oint_\gamma\frac{\log s}{s^2-1}\d s$$

By homotopy invariance and the fact that the integrand is holomorphic away from $(-\infty,0]$, we can restate the integral of that contour as one over the following contour(s): fix $0<\delta<1$. Define a contour $\ell_1$ that runs from $-i\to-i\delta$ in a straight line; define a contour $\ell_2$ that runs from $i\delta\to i$ in a straight line, and define a contour $\gamma'$ that runs from $-i\delta$ to $\delta$ to $i\delta$ in a semicircle of radius $\delta$. Then: $$\begin{align}J&=-2i\cdot\left(\int_{\ell_1}\frac{\log s}{s^2-1}\d s+\int_{\ell_2}\frac{\log s}{s^2-1}\d s+\int_{\gamma'}\frac{\log s}{s^2-1}\d s\right)\\&=-2i\cdot\left(i\int_\delta^1\frac{\log(-it)}{-t^2-1}\d t+i\int_\delta^1\frac{\log(it)}{-t^2-1}\d t+i\delta\cdot\int_{-\pi/2}^{\pi/2}\frac{\log(\delta\cdot e^{i\phi})}{\delta^2e^{2i\phi}-1}\cdot e^{i\phi}\d\phi\right)\\&=\underset{o(1),\,\delta\to0^+}{\underbrace{2\delta\cdot\int_{-\pi/2}^{\pi/2}\frac{\ln\delta+i\phi}{\delta^2e^{2i\phi}-1}\d\phi}}-4\int_\delta^1\frac{\ln t}{1+t^2}\d t\end{align}$$

And this will be true for any $0<\delta<1$. Let's decide to take limits as $\delta\to0^+$. Considering $\delta\ln\delta\to0$ as we do that, it's clear that the the first term vanishes. Therefore: $$\begin{align}J&=-4\int_0^1\frac{\ln t}{1+t^2}\d t\\&=-4\sum_{n\ge0}(-1)^n\int_0^1\ln t\cdot t^{2n}\d t\\&=4\sum_{n\ge0}(-1)^n\int_0^\infty t\cdot e^{-(2n+1)t}\d t\\&=4\sum_{n\ge0}\frac{(-1)^n}{(2n+1)^2}\int_0^\infty t\cdot e^{-t}\d t\\&=4C\end{align}$$


You made some typos in the last few expressions, but assuming your working is correct then you have arrived at: $$\int_0^{\pi/2}x\csc x\d x=-2i\left(iC+\frac{\pi}{2}C+\sum_{n\ge0}\left((-1)^n\cdot\frac{\pi n}{(2n+1)^2}-\frac{1}{(2n+1)^2}\right)\right)$$

To show that this equals $2C$, you need only show that: $$\sum_{n\ge0}\left(\frac{1}{(2n+1)^2}-(-1)^n\cdot\frac{\pi n}{(2n+1)^2}\right)=\frac{\pi}{2}C$$Or that: $$\sum_{n\ge0}(-1)^n\cdot\frac{n}{(2n+1)^2}=\frac{\pi}{8}-\frac{1}{2}C$$Using the known value of $\zeta(2)$ (for an explicit evaluation of $\sum_{n\ge0}(2n+1)^{-2}$, see e.g. here, though this is an easy corollary of the evaluation of $\zeta(2)$).

We can rewrite the summand as: $$\frac{1}{2}\cdot(-1)^n\cdot\frac{2n+1-1}{(2n+1)^2}=\frac{1}{2}\cdot\left(\frac{(-1)^n}{2n+1}-\frac{(-1)^n}{(2n+1)^2}\right)$$And now the claim is clear using this known value.

FShrike
  • 46,840
  • 3
  • 35
  • 94