# Need help with these two integral

\displaystyle\begin{align} & \int_{0}^{\infty }{{{\text{e}}^{-x}}\left| \sin x \right|}\text{d}x \\ & \int_{0}^{\pi }{\cos \left( nx \right)\ln \left( 2\sin \frac{x}{2} \right)\text{d}x} \\ \end{align}

-
what have you tried? –  RussH Jan 26 '13 at 9:42
Do you want to know about the convergent or divergent? Or you wanna find the probable values? –  Babak S. Jan 26 '13 at 9:50
If you split the first integral into intervals where $\sin$ has constant sign, you will end up with a geometric series that you can compute. –  mrf Jan 26 '13 at 10:08
@mrf : Thx mrf, I will hav a try –  Ryan Jan 26 '13 at 10:22
@Ryan As implied by Babak's comment, you should clarify what is it exactly you want on your question. –  Git Gud Jan 26 '13 at 10:56

\begin{align*} \int_{0}^{\pi}{\cos\left(nx\right)\ln\left(2\sin\frac{x}{2}\right)\text{d}x}&=\int_{0}^{\pi}{\ln\left(2\sin\frac{x}{2}\right)\text{d}\dfrac{\sin\left(nx\right)}{n}} \\&=\left[\dfrac{\sin\left(nx\right)}{n}\ln\left(2\sin\frac{x}{2}\right)\right]_{0+}^\pi-\dfrac{1}{2n}\int_0^\pi \sin\left(nx\right)\cot\dfrac{x}{2}\text{d}x \\&=-\dfrac{1}{n}\int_0^\frac{\pi}{2} \sin\left(2nx\right)\cot x\text{d}x \end{align*}
notice that, for $n\geq 1$
\begin{align*} \int_0^\frac{\pi}{2} \sin\left(2(n+1)x\right)\cot x\text{d}x-\int_0^\frac{\pi}{2}\sin\left(2nx\right)\cot x\text{d}x&=2\int_0^\frac{\pi}{2} \cos\left((2n+1)x\right)\cos x\text{d}x \\&=\int_0^\frac{\pi}{2} \left\{\cos\left((2n+2)x\right)+\cos\left(2nx\right)\right\}\text{d}x \\&=0 \end{align*}
$\displaystyle \int_0^\frac{\pi}{2}\sin\left(2x\right)\cot x\text{d}x=2\int_0^\frac{\pi}{2}\cos^2 x\text{d}x=\frac{\pi}{2}$.
Hence, $$\int_{0}^{\pi}{\cos\left(nx\right)\ln\left(2\sin\frac{x}{2}\right)\text{d}x}=-\frac{\pi}{2n}$$