# How to decide convergence of Integrals

I got this doubt while evaluating the integrals:

$$I=\int_{0}^{\frac{\pi}{2}}\ln(\sin x)\sin xdx$$ and

$$J=\int_{0}^{\frac{\pi}{4}}\csc xdx$$

Now even though the integrand $$f(x)=\ln(\sin x)\sin x$$ is not defined at $$x=0$$ which is the lower limit, still it has a finite answer.

But integrand in $$J$$ is not defined at $$x=0$$ and integral is infinite.

So how to identify without explicitly evaluating?

• Comparison test is definite a way to go. – Sangchul Lee Mar 24 at 17:57

$$\begin{eqnarray} \lim_{x\to0^+}\ln(\sin x)\sin x&=&\lim_{x\to0^+}\frac{\ln(\sin x)}{\csc x}\\ &=&\lim_{x\to0^+}\frac{\cot x}{(-\csc x\cot x)}\\ &=&\lim_{x\to0^+}(-\sin x)\\ &=&0 \end{eqnarray}$$
Here is the graph of $$y=\ln(\sin x)\sin x$$
• In this case, the discontinuity at $x=0$ was a removable discontinuity. But such is not the case at $x=0$ for $\csc x$ because of the vertical asymptote. However, even in the case where there is a vertical asymptote the integral may still converge. For example, $\int_0^1\dfrac{1}{\sqrt{x}}\,dx$. – John Wayland Bales Mar 24 at 18:20
For the second integral $$J$$, the integrand goes to $$\infty$$ as $$x\to 0$$. Roughly $$\frac{1}{\sin x} = \frac{1}{x}$$. From the examples $$\int_0^1 x^{-a} dx$$ we know that $$a=1$$ is divergent, albeit borderline so. Since $$\sin x = x - \frac{1}{3!}x^3 \pm ...$$ we have $$\sin x \leq x$$ for $$x>0$$ small (from elementary trigonometry, or since the tail of a (edit: convergent) alternating series with terms of decreasing value is dominated by any previous term). Thus $$\frac{1}{\sin x} \geq \frac{1}{x}$$ and the integral $$J$$ is divergent.